
/* /web/static/tests/legacy/ignore_missing_deps_start.js */
window.__odooIgnoreMissingDependencies=true;;

/* /base/static/tests/test_ir_model_fields_translation.js */
odoo.define('@base/../tests/test_ir_model_fields_translation',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");function checkLoginColumn(translation){return[stepUtils.showAppsMenuItem(),{content:"Settings",trigger:'a[data-menu-xmlid="base.menu_administration"]',run:'click',},{content:"Open Users & Companies",trigger:'[data-menu-xmlid="base.menu_users"]',run:"click",},{content:"Open Users",trigger:'[data-menu-xmlid="base.menu_action_res_users"]',run:"click",},{content:`Login column should be ${translation}`,trigger:`[data-name="login"] span:contains("${translation}")`,}]}
registry.category("web_tour.tours").add('ir_model_fields_translation_en_tour',{url:'/odoo',steps:()=>checkLoginColumn('Login')});registry.category("web_tour.tours").add('ir_model_fields_translation_en_tour2',{url:'/odoo',steps:()=>checkLoginColumn('Login2')});registry.category("web_tour.tours").add('ir_model_fields_translation_fr_tour',{url:'/odoo',steps:()=>checkLoginColumn('Identifiant')});registry.category("web_tour.tours").add('ir_model_fields_translation_fr_tour2',{url:'/odoo',steps:()=>checkLoginColumn('Identifiant2')});return __exports;});;

/* /web/static/tests/legacy/helpers/cleanup.js */
odoo.define('@web/../tests/legacy/helpers/cleanup',[],function(require){'use strict';let __exports={};const cleanups=[];__exports.registerCleanup=registerCleanup;function registerCleanup(callback){cleanups.push(callback);}
if(window.QUnit){QUnit.on("OdooAfterTestHook",(info)=>{if(QUnit.config.debug){return;}
let cleanup;while((cleanup=cleanups.pop())){try{cleanup(info);}catch(error){console.error(error);}}});const validElements=[{tagName:"DIV",attr:"id",value:"qunit",keep:true},{tagName:"DIV",attr:"id",value:"qunit-fixture",keep:true},{tagName:"SCRIPT",attr:"id",value:""},{tagName:"DIV",attr:"class",value:"o_notification_manager"},{tagName:"DIV",attr:"class",value:"tooltip fade bs-tooltip-auto"},{tagName:"DIV",attr:"class",value:"tooltip fade bs-tooltip-auto show"},{tagName:"DIV",attr:"class",value:"tooltip tooltip-field-info fade bs-tooltip-auto"},{tagName:"DIV",attr:"class",value:"tooltip tooltip-field-info fade bs-tooltip-auto show",},{tagName:"DIV",attr:"class",value:"ui-helper-hidden-accessible"},{tagName:"UL",attr:"class",value:"ui-menu ui-widget ui-widget-content ui-autocomplete ui-front",},{tagName:"UL",attr:"class",value:"ui-menu ui-widget ui-widget-content ui-autocomplete dropdown-menu ui-front",},];QUnit.on("OdooAfterTestHook",function(info){if(QUnit.config.debug){return;}
const failed=info.testReport.getStatus()==="failed";const toRemove=[];for(const bodyChild of document.body.children){const tolerated=validElements.find((e)=>e.tagName===bodyChild.tagName&&bodyChild.getAttribute(e.attr)===e.value);if(!failed&&!tolerated){QUnit.pushFailure(`Body still contains undesirable elements:\n${bodyChild.outerHTML}`);}
if(!tolerated||!tolerated.keep){toRemove.push(bodyChild);}}
const qunitFixture=document.getElementById("qunit-fixture");if(qunitFixture.children.length){toRemove.push(...qunitFixture.children);}
for(const el of toRemove){el.remove();}
document.body.classList.remove("modal-open");});}
return __exports;});odoo.define(`@web/../tests/helpers/cleanup`,['@web/../tests/legacy/helpers/cleanup'],function(require){return require('@web/../tests/legacy/helpers/cleanup');});;

/* /web/static/tests/legacy/helpers/utils.js */
odoo.define('@web/../tests/legacy/helpers/utils',['@web/core/templates','@web/core/browser/browser','@web/core/browser/feature_detection','@web/core/network/download','@web/core/popover/popover','@web/core/utils/concurrency','@web/core/utils/patch','@web/core/utils/ui','@web/core/l10n/translation','@web/../tests/legacy/helpers/cleanup','@web/env','@odoo/owl'],function(require){'use strict';let __exports={};const{getTemplate}=require("@web/core/templates");const{browser}=require("@web/core/browser/browser");const{isMacOS}=require("@web/core/browser/feature_detection");const{download}=require("@web/core/network/download");const{getPopoverForTarget}=require("@web/core/popover/popover");const{Deferred}=require("@web/core/utils/concurrency");const{patch}=require("@web/core/utils/patch");const{isVisible}=require("@web/core/utils/ui");const{appTranslateFn}=require("@web/core/l10n/translation");const _t=(str,...args)=>appTranslateFn(str,"web",...args);const{registerCleanup}=require("@web/../tests/legacy/helpers/cleanup");const{customDirectives,globalValues}=require("@web/env");const{App,onError,onMounted,onPatched,onRendered,onWillDestroy,onWillPatch,onWillRender,onWillStart,onWillUnmount,onWillUpdateProps,useComponent,}=require("@odoo/owl");__exports.patchDate=patchDate;function patchDate(year,month,day,hours,minutes,seconds,ms=0){var RealDate=window.Date;var actualDate=new RealDate();var fakeDate=new RealDate(year,month,day,hours,minutes,seconds,ms);if(!(luxon.Settings.defaultZone instanceof luxon.FixedOffsetZone)){throw new Error("luxon.Settings.defaultZone must be a FixedOffsetZone");}
const browserOffset=-fakeDate.getTimezoneOffset();const patchedOffset=luxon.Settings.defaultZone.offset();const offsetDiff=patchedOffset-browserOffset;const correctedMinutes=fakeDate.getMinutes()-offsetDiff;fakeDate.setMinutes(correctedMinutes);var timeInterval=actualDate.getTime()-fakeDate.getTime();window.Date=(function(NativeDate){function Date(Y,M,D,h,m,s,ms){var length=arguments.length;let date;if(arguments.length>0){date=length==1&&String(Y)===Y?new NativeDate(Date.parse(Y)):length>=7?new NativeDate(Y,M,D,h,m,s,ms):length>=6?new NativeDate(Y,M,D,h,m,s):length>=5?new NativeDate(Y,M,D,h,m):length>=4?new NativeDate(Y,M,D,h):length>=3?new NativeDate(Y,M,D):length>=2?new NativeDate(Y,M):length>=1?new NativeDate(Y):new NativeDate();date.constructor=Date;return date;}else{date=new NativeDate();var time=date.getTime();time-=timeInterval;date.setTime(time);return date;}}
for(var key in NativeDate){Date[key]=NativeDate[key];}
Date.now=function(){var date=new NativeDate();var time=date.getTime();time-=timeInterval;return time;};Date.UTC=NativeDate.UTC;Date.prototype=NativeDate.prototype;Date.prototype.constructor=Date;Date.parse=NativeDate.parse;return Date;})(Date);registerCleanup(()=>{window.Date=RealDate;});}
__exports.patchTimeZone=patchTimeZone;function patchTimeZone(offset){patchWithCleanup(luxon.Settings,{defaultZone:luxon.FixedOffsetZone.instance(offset)});}
__exports.patchWithCleanup=patchWithCleanup;function patchWithCleanup(obj,patchValue){const unpatch=patch(obj,patchValue);registerCleanup(()=>{unpatch();});}
__exports.getFixture=getFixture;function getFixture(){if(!window.QUnit){return document;}
if(QUnit.config.debug){return document.body;}else{return document.getElementById("qunit-fixture");}}
__exports.nextTick=nextTick;async function nextTick(){await new Promise((resolve)=>window.requestAnimationFrame(resolve));await new Promise((resolve)=>setTimeout(resolve));}
__exports.makeDeferred=makeDeferred;function makeDeferred(){return new Deferred();}
__exports.findElement=findElement;function findElement(el,selector){let target=el;if(selector){const els=el.querySelectorAll(selector);if(els.length===0){throw new Error(`No element found (selector: ${selector})`);}
if(els.length>1){throw new Error(`Found ${els.length} elements, instead of 1 (selector: ${selector})`);}
target=els[0];}
return target;}
const mapBubblingEvent=(args)=>({...args,bubbles:true});const mapNonBubblingEvent=(args)=>({...args,bubbles:false});const mapBubblingPointerEvent=(args={})=>({clientX:args.pageX,clientY:args.pageY,...args,bubbles:true,cancelable:true,view:window,});const mapNonBubblingPointerEvent=(args)=>({...mapBubblingPointerEvent(args),bubbles:false,cancelable:false,});const mapCancelableTouchEvent=(args={})=>({...args,bubbles:true,cancelable:true,composed:true,rotation:0.0,touches:args.touches?[...args.touches.map((e)=>new Touch(e))]:undefined,view:window,zoom:1.0,});const mapNonCancelableTouchEvent=(args)=>({...mapCancelableTouchEvent(args),cancelable:false,});const mapKeyboardEvent=(args)=>({...args,bubbles:true,cancelable:true,});const getEventConstructor=(eventType)=>{switch(eventType){case"auxclick":case"click":case"contextmenu":case"dblclick":case"mousedown":case"mouseup":case"mousemove":case"mouseover":case"mouseout":{return[MouseEvent,mapBubblingPointerEvent];}
case"mouseenter":case"mouseleave":{return[MouseEvent,mapNonBubblingPointerEvent];}
case"pointerdown":case"pointerup":case"pointermove":case"pointerover":case"pointerout":{return[PointerEvent,mapBubblingPointerEvent];}
case"pointerenter":case"pointerleave":{return[PointerEvent,mapNonBubblingPointerEvent];}
case"focusin":{return[FocusEvent,mapBubblingEvent];}
case"focus":case"blur":{return[FocusEvent,mapNonBubblingEvent];}
case"cut":case"copy":case"paste":{return[ClipboardEvent,mapBubblingEvent];}
case"keydown":case"keypress":case"keyup":{return[KeyboardEvent,mapKeyboardEvent];}
case"drag":case"dragend":case"dragenter":case"dragstart":case"dragleave":case"dragover":case"drop":{return[DragEvent,mapBubblingEvent];}
case"input":{return[InputEvent,mapBubblingEvent];}
case"compositionstart":case"compositionend":{return[CompositionEvent,mapBubblingEvent];}
case"scroll":{return[UIEvent,mapNonBubblingEvent];}
case"touchstart":case"touchend":case"touchmove":{return[TouchEvent,mapCancelableTouchEvent];}
case"touchcancel":{return[TouchEvent,mapNonCancelableTouchEvent];}
default:{return[Event,mapBubblingEvent];}}};__exports.triggerEvent=triggerEvent;function triggerEvent(el,selector,eventType,eventInit,options={}){const errors=[];const target=findElement(el,selector);if(typeof eventType!=="string"){errors.push("event type must be a string");}
if(!target){errors.push("cannot find target");}else if(!options.skipVisibilityCheck&&!isVisible(target)){errors.push("target is not visible");}
if(errors.length){throw new Error(`Cannot trigger event${eventType ? `"${eventType}"` : ""}${
                selector ? `(with selector"${selector}")` : ""
            }: ${errors.join(" and ")}`);}
const[Constructor,processParams]=getEventConstructor(eventType);const event=new Constructor(eventType,processParams(eventInit));target.dispatchEvent(event);if(window.QUnit&&QUnit.config.debug){const group=`%c[${event.type.toUpperCase()}]`;console.groupCollapsed(group,"color: #b52c9b");console.log(target,event);console.groupEnd(group,"color: #b52c9b");}
if(options.sync){return event;}else{return nextTick().then(()=>event);}}
__exports.triggerEvents=triggerEvents;function triggerEvents(el,selector,eventDefs,options={}){const events=[...eventDefs].map((eventDef)=>{const[eventType,eventInit]=Array.isArray(eventDef)?eventDef:[eventDef,{}];return triggerEvent(el,selector,eventType,eventInit,options);});if(options.sync){return events;}else{return nextTick().then(()=>events);}}
__exports.triggerScroll=triggerScroll;async function triggerScroll(target,coordinates={left:null,top:null},canPropagate=true){const isScrollable=(target.scrollHeight>target.clientHeight&&target.clientHeight>0)||(target.scrollWidth>target.clientWidth&&target.clientWidth>0);if(!isScrollable&&!canPropagate){return;}
if(isScrollable){const canScrollFrom={left:coordinates.left>target.scrollLeft?target.scrollLeft+target.clientWidth<target.scrollWidth:target.scrollLeft>0,top:coordinates.top>target.scrollTop?target.scrollTop+target.clientHeight<target.scrollHeight:target.scrollTop>0,};const scrollCoordinates={};Object.entries(coordinates).forEach(([key,value])=>{if(value!==null&&canScrollFrom[key]){scrollCoordinates[key]=value;delete coordinates[key];}});target.scrollTo(scrollCoordinates);await triggerEvent(target,null,"scroll");if(!canPropagate||!Object.entries(coordinates).length){return;}}
target.parentElement?triggerScroll(target.parentElement,coordinates):triggerEvent(window,null,"scroll");await nextTick();}
__exports.click=click;function click(el,selector,{mouseEventInit={},skipDisabledCheck=false,skipVisibilityCheck=false}={}){if(!skipDisabledCheck&&el.disabled){throw new Error("Can't click on a disabled button");}
return triggerEvents(el,selector,["pointerdown","mousedown","focus","focusin","pointerup","mouseup",["click",mouseEventInit],],{skipVisibilityCheck});}
__exports.clickCreate=clickCreate;function clickCreate(htmlElement){if(htmlElement.querySelectorAll(".o_control_panel_main_buttons .o_form_button_create").length){return click(htmlElement,".o_control_panel_main_buttons .o_form_button_create");}else if(htmlElement.querySelectorAll(".o_control_panel_main_buttons .o_list_button_create").length){return click(htmlElement,".o_control_panel_main_buttons .o_list_button_create");}else{throw new Error("No edit button found to be clicked.");}}
__exports.clickEdit=clickEdit;function clickEdit(htmlElement){if(htmlElement.querySelectorAll(".o_list_button_edit").length){return click(htmlElement,".o_list_button_edit");}else{throw new Error("No edit button found to be clicked.");}}
__exports.clickSave=clickSave;async function clickSave(htmlElement){if(htmlElement.querySelectorAll(".o_form_status_indicator").length){await mouseEnter(htmlElement,".o_form_status_indicator");}
if(htmlElement.querySelectorAll(".o_form_button_save").length){return click(htmlElement,".o_form_button_save");}
const listSaveButtons=htmlElement.querySelectorAll(".o_list_button_save");if(listSaveButtons.length){return listSaveButtons.length>=2?click(listSaveButtons[1]):click(listSaveButtons[0]);}else{throw new Error("No save button found to be clicked.");}}
__exports.clickDiscard=clickDiscard;async function clickDiscard(htmlElement){if(htmlElement.querySelectorAll(".o_form_status_indicator").length){await mouseEnter(htmlElement,".o_form_status_indicator");}
if(htmlElement.querySelectorAll(".o_form_button_cancel").length){return click(htmlElement,".o_form_button_cancel");}else if($(htmlElement).find(".o_list_button_discard:visible").length){return click($(htmlElement).find(".o_list_button_discard:visible").get(0));}else{throw new Error("No discard button found to be clicked.");}}
__exports.mouseEnter=mouseEnter;async function mouseEnter(el,selector,coordinates){const target=el.querySelector(selector)||el;const atPos=coordinates||{clientX:target.getBoundingClientRect().left+target.getBoundingClientRect().width/2,clientY:target.getBoundingClientRect().top+target.getBoundingClientRect().height/2,};return triggerEvents(target,null,["pointerenter","mouseenter"],atPos);}
__exports.mouseLeave=mouseLeave;async function mouseLeave(el,selector){const target=el.querySelector(selector)||el;return triggerEvents(target,null,["pointerleave","mouseleave"]);}
__exports.editInput=editInput;async function editInput(el,selector,value){const input=findElement(el,selector);if(!(input instanceof HTMLInputElement||input instanceof HTMLTextAreaElement)){throw new Error("Only 'input' and 'textarea' elements can be edited with 'editInput'.");}
if(!["text","textarea","email","search","color","number","file","tel"].includes(input.type)){throw new Error(`Type "${input.type}" not supported by 'editInput'.`);}
const eventOpts={};if(input.type==="file"){const files=Array.isArray(value)?value:[value];const dataTransfer=new DataTransfer();for(const file of files){if(!(file instanceof File)){throw new Error(`File input value should be one or several File objects.`);}
dataTransfer.items.add(file);}
input.files=dataTransfer.files;eventOpts.skipVisibilityCheck=true;}else{input.value=value;}
await triggerEvents(input,null,["input","change"],eventOpts);if(input.type==="file"){await nextTick();await nextTick();}}
__exports.editSelect=editSelect;function editSelect(el,selector,value){const select=findElement(el,selector);if(select.tagName!=="SELECT"){throw new Error("Only select tag can be edited with selectInput.");}
select.value=value;return triggerEvent(select,null,"change");}
__exports.editSelectMenu=editSelectMenu;async function editSelectMenu(el,selector,value){const dropdown=el.querySelector(selector);await click(dropdown.querySelector(".dropdown-toggle"));for(const item of Array.from(el.querySelectorAll(".o_select_menu_menu .dropdown-item"))){if(item.textContent===value){return click(item);}}}
__exports.triggerHotkey=triggerHotkey;async function triggerHotkey(hotkey,addOverlayModParts=false,eventAttrs={}){eventAttrs.key=hotkey.split("+").pop();if(/shift/i.test(hotkey)){eventAttrs.shiftKey=true;}
if(/control/i.test(hotkey)){if(isMacOS()){eventAttrs.metaKey=true;}else{eventAttrs.ctrlKey=true;}}
if(/alt/i.test(hotkey)||addOverlayModParts){if(isMacOS()){eventAttrs.ctrlKey=true;}else{eventAttrs.altKey=true;}}
if(!("bubbles"in eventAttrs)){eventAttrs.bubbles=true;}
const[keydownEvent,keyupEvent]=await triggerEvents(document.activeElement,null,[["keydown",eventAttrs],["keyup",eventAttrs],],{skipVisibilityCheck:true});return{keydownEvent,keyupEvent};}
__exports.mockDownload=mockDownload;function mockDownload(cb){patchWithCleanup(download,{_download:cb});}
const hushConsole=__exports.hushConsole=Object.create(null);for(const propName of Object.keys(window.console)){hushConsole[propName]=()=>{};}
__exports.mockSendBeacon=mockSendBeacon;function mockSendBeacon(mock){patchWithCleanup(navigator,{sendBeacon:(url,blob)=>{return mock(url,blob)!==false;},});}
__exports.mockTimeout=mockTimeout;function mockTimeout(){const timeouts=new Map();let currentTime=0;let id=1;patchWithCleanup(browser,{setTimeout(fn,delay=0){timeouts.set(id,{fn,scheduledFor:delay+currentTime,id});return id++;},clearTimeout(id){timeouts.delete(id);},});return{execRegisteredTimeouts(){for(const{fn}of timeouts.values()){fn();}
timeouts.clear();},async advanceTime(duration){await nextTick();currentTime+=duration;for(const{fn,scheduledFor,id}of timeouts.values()){if(scheduledFor<=currentTime){fn();timeouts.delete(id);}}
await nextTick();},};}
__exports.mockAnimationFrame=mockAnimationFrame;function mockAnimationFrame(){const callbacks=new Map();let currentTime=0;let id=1;patchWithCleanup(browser,{requestAnimationFrame(fn){callbacks.set(id,{fn,scheduledFor:16+currentTime,id});return id++;},cancelAnimationFrame(id){callbacks.delete(id);},performance:{now:()=>currentTime},});return{execRegisteredAnimationFrames(){for(const{fn}of callbacks.values()){fn(currentTime);}
callbacks.clear();},async advanceFrame(count=1){await nextTick();currentTime+=16*count;for(const{fn,scheduledFor,id}of callbacks.values()){if(scheduledFor<=currentTime){fn(currentTime);callbacks.delete(id);}}
await nextTick();},};}
__exports.mount=mount;async function mount(Comp,target,config={}){let{props,env}=config;env=env||{};const configuration={env,getTemplate,test:true,props,customDirectives,globalValues,};if(env.services&&"localization"in env.services){configuration.translateFn=_t;}
const app=new App(Comp,configuration);registerCleanup(()=>app.destroy());return app.mount(target);}
__exports.destroy=destroy;function destroy(comp){comp.__owl__.app.destroy();}
__exports.findChildren=findChildren;function findChildren(comp,predicate=(e)=>e){const queue=[];[].unshift.apply(queue,Object.values(comp.__owl__.children));while(queue.length>0){const curNode=queue.pop();if(predicate(curNode)){return curNode;}
[].unshift.apply(queue,Object.values(curNode.component.__owl__.children));}}
__exports.useChild=useChild;function useChild(){const node=useComponent().__owl__;const setChild=()=>{const componentNode=Object.values(node.children)[0];node.component.child=componentNode.component;};onMounted(setChild);onPatched(setChild);}
__exports.useLogLifeCycle=useLogLifeCycle;function useLogLifeCycle(logFn,name=""){const component=useComponent();let loggedName=`${component.constructor.name}`;if(name){loggedName=`${component.constructor.name} ${name}`;}
onError(()=>{logFn(`onError ${loggedName}`);});onMounted(()=>{logFn(`onMounted ${loggedName}`);});onPatched(()=>{logFn(`onPatched ${loggedName}`);});onRendered(()=>{logFn(`onRendered ${loggedName}`);});onWillDestroy(()=>{logFn(`onWillDestroy ${loggedName}`);});onWillPatch(()=>{logFn(`onWillPatch ${loggedName}`);});onWillRender(()=>{logFn(`onWillRender ${loggedName}`);});onWillStart(()=>{logFn(`onWillStart ${loggedName}`);});onWillUnmount(()=>{logFn(`onWillUnmount ${loggedName}`);});onWillUpdateProps(()=>{logFn(`onWillUpdateProps ${loggedName}`);});}
function getDifferentParents(n1,n2){const parents=[n2];while(parents[0].parentNode){const parent=parents[0].parentNode;if(parent.contains(n1)){break;}
parents.unshift(parent);}
return parents;}
__exports.dragAndDrop=dragAndDrop;async function dragAndDrop(from,to,position){const{drop}=await drag(from);await drop(to,position);}
__exports.drag=drag;async function drag(from,pointerType="mouse"){const assertIsDragging=(fn,endDrag)=>{return{async[fn.name](...args){if(dragEndReason){throw new Error(`Cannot execute drag helper '${fn.name}': drag sequence has been ended by '${dragEndReason}'.`);}
await fn(...args);if(endDrag){dragEndReason=fn.name;}},}[fn.name];};const cancel=assertIsDragging(async function cancel(){await triggerEvent(window,null,"keydown",{key:"Escape"});},true);const drop=assertIsDragging(async function drop(to,position){if(to){await moveTo(to,position);}
await triggerEvent(target||source,null,"pointerup",targetPosition);},true);const getEl=(selector)=>selector instanceof Element?selector:fixture.querySelector(selector);const getTargetPosition=(position)=>{const tRect=target.getBoundingClientRect();const tPos={clientX:Math.floor(tRect.x),clientY:Math.floor(tRect.y),};if(position&&typeof position==="object"){tPos.clientX+=position.x||0;tPos.clientY+=position.y||0;}else{const positions=typeof position==="string"?position.split("-"):[];if(positions.includes("left")){tPos.clientX-=1;}else if(positions.includes("right")){tPos.clientX+=Math.ceil(tRect.width)+1;}else{tPos.clientX+=Math.floor(tRect.width/2);}
if(positions.includes("top")){tPos.clientY-=1;}else if(positions.includes("bottom")){tPos.clientY+=Math.ceil(tRect.height)+1;}else{tPos.clientY+=Math.floor(tRect.height/2);}}
return tPos;};const moveTo=assertIsDragging(async function moveTo(to,position){target=getEl(to);if(!target){return;}
targetPosition=getTargetPosition(position);await triggerEvent(source,null,"pointermove",{...targetPosition,button:-1});for(const parent of getDifferentParents(source,target)){triggerEvent(parent,null,"pointerenter",targetPosition);}
await nextTick();return dragHelpers;},false);const dragHelpers={cancel,drop,moveTo};const fixture=getFixture();const source=getEl(from instanceof Element?from:fixture.querySelector(from));const sourceRect=source.getBoundingClientRect();let dragEndReason=null;let target;let targetPosition;await triggerEvent(source,null,"pointerdown",{pointerType,clientX:sourceRect.x+sourceRect.width/2,clientY:sourceRect.y+sourceRect.height/2,});return dragHelpers;}
__exports.getDropdownMenu=getDropdownMenu;function getDropdownMenu(target,togglerSelector){if(!(target instanceof HTMLElement)){throw new Error(`getDropdownMenu: target is not an HTMLElement.`);}
let el=togglerSelector instanceof HTMLElement?togglerSelector:target.querySelector(togglerSelector);if(el&&!el.classList.contains("o-dropdown")){el=el.querySelector(".o-dropdown");}
if(!el){throw new Error(`getDropdownMenu: Could not find element "${togglerSelector}".`);}
return getPopoverForTarget(el);}
__exports.clickDropdown=clickDropdown;async function clickDropdown(target,fieldName){const dropdownInput=target.querySelector(`[name='${fieldName}'] .dropdown input`);dropdownInput.focus();await nextTick();await click(dropdownInput);}
__exports.clickOpenedDropdownItem=clickOpenedDropdownItem;async function clickOpenedDropdownItem(target,fieldName,itemContent){const dropdowns=target.querySelectorAll(`[name='${fieldName}'] .dropdown .dropdown-menu`);if(dropdowns.length===0){throw new Error(`No dropdown found for field ${fieldName}`);}else if(dropdowns.length>1){throw new Error(`Found ${dropdowns.length} dropdowns for field ${fieldName}`);}
const dropdownItems=dropdowns[0].querySelectorAll("li");const indexToClick=Array.from(dropdownItems).map((html)=>html.textContent).indexOf(itemContent);if(indexToClick===-1){throw new Error(`The element '${itemContent}' does not exist in the dropdown`);}
await click(dropdownItems[indexToClick]);}
__exports.selectDropdownItem=selectDropdownItem;async function selectDropdownItem(target,fieldName,itemContent){await clickDropdown(target,fieldName);await clickOpenedDropdownItem(target,fieldName,itemContent);}
__exports.getNodesTextContent=getNodesTextContent;function getNodesTextContent(nodes){return Array.from(nodes).map((n)=>n.textContent);}
__exports.clickOpenM2ODropdown=clickOpenM2ODropdown;async function clickOpenM2ODropdown(el,fieldName,selector){const m2oSelector=`${selector || ""} .o_field_many2one[name=${fieldName}] input`;const matches=el.querySelectorAll(m2oSelector);if(matches.length!==1){throw new Error(`cannot open m2o: selector ${selector} has been found ${matches.length} instead of 1`);}
await click(matches[0]);return matches[0];}
__exports.clickM2OHighlightedItem=clickM2OHighlightedItem;async function clickM2OHighlightedItem(el,fieldName,selector){const m2oSelector=`${selector || ""} .o_field_many2one[name=${fieldName}] input`;const matches=el.querySelectorAll(m2oSelector);if(matches.length!==1){throw new Error(`cannot open m2o: selector ${selector} has been found ${matches.length} instead of 1`);}
return click(matches[0].parentElement.querySelector("li"));}
__exports.addRow=addRow;async function addRow(target,selector){await click(target.querySelector(`${selector ? selector : ""} .o_field_x2many_list_row_add a`));}
__exports.removeRow=removeRow;async function removeRow(target,index){await click(target.querySelectorAll(".o_list_record_remove")[index]);}
return __exports;});odoo.define(`@web/../tests/helpers/utils`,['@web/../tests/legacy/helpers/utils'],function(require){return require('@web/../tests/legacy/helpers/utils');});;

/* /web/static/tests/legacy/utils.js */
odoo.define('@web/../tests/legacy/utils',['@web/core/utils/ui','@web/../tests/helpers/cleanup','@web/../tests/helpers/utils'],function(require){'use strict';let __exports={};const{isVisible}=require("@web/core/utils/ui");const{registerCleanup}=require("@web/../tests/helpers/cleanup");const{click:webClick,getFixture,makeDeferred,triggerEvents:webTriggerEvents,}=require("@web/../tests/helpers/utils");function createFakeDataTransfer(files){return{dropEffect:"all",effectAllowed:"all",files,items:[],types:["Files"],};}
__exports.click=click;async function click(selector,options={}){const{shiftKey}=options;delete options.shiftKey;await contains(selector,{click:{shiftKey},...options});}
__exports.dragenterFiles=dragenterFiles;async function dragenterFiles(selector,files,options){await contains(selector,{dragenterFiles:files,...options});}
__exports.dragoverFiles=dragoverFiles;async function dragoverFiles(selector,files,options){await contains(selector,{dragoverFiles:files,...options});}
__exports.dropFiles=dropFiles;async function dropFiles(selector,files,options){await contains(selector,{dropFiles:files,...options});}
__exports.inputFiles=inputFiles;async function inputFiles(selector,files,options){await contains(selector,{inputFiles:files,...options});}
__exports.pasteFiles=pasteFiles;async function pasteFiles(selector,files,options){await contains(selector,{pasteFiles:files,...options});}
__exports.focus=focus;async function focus(selector,options){await contains(selector,{setFocus:true,...options});}
__exports.insertText=insertText;async function insertText(selector,content,options={}){const{replace=false}=options;delete options.replace;await contains(selector,{...options,insertText:{content,replace}});}
__exports.scroll=scroll;async function scroll(selector,scrollTop,options){await contains(selector,{setScroll:scrollTop,...options});}
__exports.triggerEvents=triggerEvents;async function triggerEvents(selector,events,options){await contains(selector,{triggerEvents:events,...options});}
function log(ok,message){if(window.QUnit){QUnit.assert.ok(ok,message);}else{if(ok){console.log(message);}else{console.error(message);}}}
let hasUsedContainsPositively=false;if(window.QUnit){QUnit.testStart(()=>(hasUsedContainsPositively=false));}
class Contains{constructor(selector,options={}){this.selector=selector;this.options=options;this.options.count??=1;this.options.targetParam=this.options.target;this.options.target??=getFixture();let selectorMessage=`${this.options.count} of "${this.selector}"`;if(this.options.visible!==undefined){selectorMessage=`${selectorMessage} ${
                this.options.visible ? "visible" : "invisible"
            }`;}
if(this.options.targetParam){selectorMessage=`${selectorMessage} inside a specific target`;}
if(this.options.parent){selectorMessage=`${selectorMessage} inside a specific parent`;}
if(this.options.contains){selectorMessage=`${selectorMessage} with a specified sub-contains`;}
if(this.options.text!==undefined){selectorMessage=`${selectorMessage} with text "${this.options.text}"`;}
if(this.options.textContent!==undefined){selectorMessage=`${selectorMessage} with textContent "${this.options.textContent}"`;}
if(this.options.value!==undefined){selectorMessage=`${selectorMessage} with value "${this.options.value}"`;}
if(this.options.scroll!==undefined){selectorMessage=`${selectorMessage} with scroll "${this.options.scroll}"`;}
if(this.options.after!==undefined){selectorMessage=`${selectorMessage} after a specified element`;}
if(this.options.before!==undefined){selectorMessage=`${selectorMessage} before a specified element`;}
this.selectorMessage=selectorMessage;if(this.options.contains&&!Array.isArray(this.options.contains[0])){this.options.contains=[this.options.contains];}
if(this.options.count){hasUsedContainsPositively=true;}else if(!hasUsedContainsPositively){throw new Error(`Starting a test with "contains" of count 0 for selector "${this.selector}" is useless because it might immediately resolve. Start the test by checking that an expected element actually exists.`);}
this.successMessage=undefined;this.executeError=undefined;}
run(){this.done=false;this.def=makeDeferred();this.scrollListeners=new Set();this.onScroll=()=>this.runOnce("after scroll");if(!this.runOnce("immediately")){this.timer=setTimeout(()=>this.runOnce("Timeout of 5 seconds",{crashOnFail:true}),5000);this.observer=new MutationObserver((mutations)=>{try{this.runOnce("after mutations");}catch(e){this.def.reject(e);}});this.observer.observe(this.options.target,{attributes:true,childList:true,subtree:true,});registerCleanup(()=>{if(!this.done){this.runOnce("Test ended",{crashOnFail:true});}});}
return this.def;}
runOnce(whenMessage,{crashOnFail=false,executeOnSuccess=true}={}){const res=this.select();if(res?.length===this.options.count||crashOnFail){this.observer?.disconnect();clearTimeout(this.timer);for(const el of this.scrollListeners??[]){el.removeEventListener("scroll",this.onScroll);}
this.done=true;}
if(res?.length===this.options.count){this.successMessage=`Found ${this.selectorMessage} (${whenMessage})`;if(executeOnSuccess){this.executeAction(res[0]);}
return res;}else{this.executeError=()=>{let message=`Failed to find ${this.selectorMessage} (${whenMessage}).`;message=res?`${message} Found ${res.length} instead.`:`${message} Parent not found.`;if(this.parentContains){if(this.parentContains.successMessage){log(true,this.parentContains.successMessage);}else{this.parentContains.executeError();}}
log(false,message);this.def?.reject(new Error(message));for(const childContains of this.childrenContains||[]){if(childContains.successMessage){log(true,childContains.successMessage);}else{childContains.executeError();}}};if(crashOnFail){this.executeError();}}}
executeAction(el){let message=this.successMessage;if(this.options.click){message=`${message} and clicked it`;webClick(el,undefined,{mouseEventInit:this.options.click,skipDisabledCheck:true,skipVisibilityCheck:true,});}
if(this.options.dragenterFiles){message=`${message} and dragentered ${this.options.dragenterFiles.length} file(s)`;const ev=new Event("dragenter",{bubbles:true});Object.defineProperty(ev,"dataTransfer",{value:createFakeDataTransfer(this.options.dragenterFiles),});el.dispatchEvent(ev);}
if(this.options.dragoverFiles){message=`${message} and dragovered ${this.options.dragoverFiles.length} file(s)`;const ev=new Event("dragover",{bubbles:true});Object.defineProperty(ev,"dataTransfer",{value:createFakeDataTransfer(this.options.dragoverFiles),});el.dispatchEvent(ev);}
if(this.options.dropFiles){message=`${message} and dropped ${this.options.dropFiles.length} file(s)`;const ev=new Event("drop",{bubbles:true});Object.defineProperty(ev,"dataTransfer",{value:createFakeDataTransfer(this.options.dropFiles),});el.dispatchEvent(ev);}
if(this.options.inputFiles){message=`${message} and inputted ${this.options.inputFiles.length} file(s)`;const dataTransfer=new window.DataTransfer();for(const file of this.options.inputFiles){dataTransfer.items.add(file);}
el.files=dataTransfer.files;const versionRaw=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);const chromeVersion=versionRaw?parseInt(versionRaw[2],10):false;if(!chromeVersion||chromeVersion>=73){el.dispatchEvent(new Event("change"));}}
if(this.options.insertText!==undefined){message=`${message} and inserted text "${this.options.insertText.content}" (replace: ${this.options.insertText.replace})`;el.focus();if(this.options.insertText.replace){el.value="";el.dispatchEvent(new window.KeyboardEvent("keydown",{key:"Backspace"}));el.dispatchEvent(new window.KeyboardEvent("keyup",{key:"Backspace"}));el.dispatchEvent(new window.InputEvent("input"));}
for(const char of this.options.insertText.content){el.value+=char;el.dispatchEvent(new window.KeyboardEvent("keydown",{key:char}));el.dispatchEvent(new window.KeyboardEvent("keyup",{key:char}));el.dispatchEvent(new window.InputEvent("input"));}
el.dispatchEvent(new window.InputEvent("change"));}
if(this.options.pasteFiles){message=`${message} and pasted ${this.options.pasteFiles.length} file(s)`;const ev=new Event("paste",{bubbles:true});Object.defineProperty(ev,"clipboardData",{value:createFakeDataTransfer(this.options.pasteFiles),});el.dispatchEvent(ev);}
if(this.options.setFocus){message=`${message} and focused it`;el.focus();}
if(this.options.setScroll!==undefined){message=`${message} and set scroll to "${this.options.setScroll}"`;el.scrollTop=this.options.setScroll==="bottom"?el.scrollHeight:this.options.setScroll;}
if(this.options.triggerEvents){message=`${message} and triggered "${this.options.triggerEvents.join(", ")}" events`;webTriggerEvents(el,null,this.options.triggerEvents,{skipVisibilityCheck:true,});}
if(this.parentContains){log(true,this.parentContains.successMessage);}
log(true,message);for(const childContains of this.childrenContains){log(true,childContains.successMessage);}
this.def?.resolve();}
select(){const target=this.selectParent();if(!target){return;}
const baseRes=[...target.querySelectorAll(this.selector)].map((el)=>(this.options.shadowRoot?el.shadowRoot:el)).filter((el)=>el);this.childrenContains=[];const res=baseRes.filter((el,currentIndex)=>{let condition=(this.options.textContent===undefined||el.textContent.trim()===this.options.textContent)&&(this.options.value===undefined||el.value===this.options.value)&&(this.options.scroll===undefined||(this.options.scroll==="bottom"?Math.abs(el.scrollHeight-el.clientHeight-el.scrollTop)<=1:Math.abs(el.scrollTop-this.options.scroll)<=1));if(condition&&this.options.text!==undefined){if(el.textContent.trim()!==this.options.text&&[...el.querySelectorAll("*")].every((el)=>el.textContent.trim()!==this.options.text)){condition=false;}}
if(condition&&this.options.contains){for(const param of this.options.contains){const childContains=new Contains(param[0],{...param[1],target:el});if(!childContains.runOnce(`as child of el ${currentIndex + 1})`,{executeOnSuccess:false,})){condition=false;}
this.childrenContains.push(childContains);}}
if(condition&&this.options.visible!==undefined){if(isVisible(el)!==this.options.visible){condition=false;}}
if(condition&&this.options.after){const afterContains=new Contains(this.options.after[0],{...this.options.after[1],target,});const afterEl=afterContains.runOnce(`as "after"`,{executeOnSuccess:false,})?.[0];if(!afterEl||!(el.compareDocumentPosition(afterEl)&Node.DOCUMENT_POSITION_PRECEDING)){condition=false;}
this.childrenContains.push(afterContains);}
if(condition&&this.options.before){const beforeContains=new Contains(this.options.before[0],{...this.options.before[1],target,});const beforeEl=beforeContains.runOnce(`as "before"`,{executeOnSuccess:false,})?.[0];if(!beforeEl||!(el.compareDocumentPosition(beforeEl)&Node.DOCUMENT_POSITION_FOLLOWING)){condition=false;}
this.childrenContains.push(beforeContains);}
return condition;});if(this.options.scroll!==undefined&&this.scrollListeners&&baseRes.length===this.options.count&&res.length!==this.options.count){for(const el of baseRes){if(!this.scrollListeners.has(el)){this.scrollListeners.add(el);el.addEventListener("scroll",this.onScroll);}}}
return res;}
selectParent(){if(this.options.parent){this.parentContains=new Contains(this.options.parent[0],{...this.options.parent[1],target:this.options.target,});return this.parentContains.runOnce(`as parent`,{executeOnSuccess:false})?.[0];}
return this.options.target;}}
__exports.contains=contains;async function contains(selector,options){await new Contains(selector,options).run();}
const stepState={expectedSteps:null,deferred:null,timeout:null,currentSteps:[],clear(){clearTimeout(this.timeout);this.timeout=null;this.deferred=null;this.currentSteps=[];this.expectedSteps=null;},check({crashOnFail=false}={}){const success=this.expectedSteps.length===this.currentSteps.length&&this.expectedSteps.every((s,i)=>s===this.currentSteps[i]);if(!success&&!crashOnFail){return;}
QUnit.config.current.assert.verifySteps(this.expectedSteps);if(success){this.deferred.resolve();}else{this.deferred.reject(new Error("Steps do not match."));}
this.clear();},};if(window.QUnit){QUnit.testStart(()=>registerCleanup(()=>{if(stepState.expectedSteps){stepState.check({crashOnFail:true});}else{stepState.clear();}}));}
__exports.step=step;function step(step){stepState.currentSteps.push(step);QUnit.config.current.assert.step(step);if(stepState.expectedSteps){stepState.check();}}
__exports.assertSteps=assertSteps;function assertSteps(steps){if(stepState.expectedSteps){stepState.check({crashOnFail:true});}
stepState.expectedSteps=steps;stepState.deferred=makeDeferred();stepState.timeout=setTimeout(()=>stepState.check({crashOnFail:true}),2000);stepState.check();return stepState.deferred;}
return __exports;});odoo.define(`@web/../tests/utils`,['@web/../tests/legacy/utils'],function(require){return require('@web/../tests/legacy/utils');});;

/* /web/static/tests/tours/favorite_management_tour.js */
odoo.define('@web/../tests/tours/favorite_management_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("test_favorite_management",{url:"/odoo/apps",steps:()=>[{trigger:".o_kanban_renderer:not(:has(.o_kanban_record:contains(France - Localizations)))",},{trigger:".o_facet_remove",run:"click",},{trigger:".o_kanban_renderer:has(.o_kanban_record:contains(France - Localizations))",},{trigger:".o_searchview_dropdown_toggler",run:"click",},{trigger:".o_favorite_menu .o_accordion > .o_menu_item",run:"click",},{trigger:".o_favorite_menu .o_accordion_values .o_input",run:"edit Apps1",},{trigger:".o_save_favorite",run:"click",},{trigger:".o_searchview_facet .o_facet_value:contains(Apps1)",},{trigger:".o_group_by_menu > .o-dropdown-item:contains(Category)",run:"click",},{trigger:".o_kanban_header:contains(Account Charts)",},{trigger:".o_favorite_menu .o_accordion_values .o_input",run:"edit Apps2",},{trigger:".o_save_favorite",run:"click",},{trigger:".o_favorite_menu .o-dropdown-item:contains(Apps2)",},{trigger:".o_favorite_menu .o-dropdown-item:contains(Apps1) i:not(:visible)",run:"click",},{trigger:".o_field_domain > div > div",run:"click",},{trigger:".o_tree_editor_row:contains(New Rule) > a",run:"click",},{trigger:".o_form_button_save",run:"click",},{trigger:".o_back_button > a",run:"click",},{trigger:".o_facet_values:contains('Apps2')",},{trigger:".o_kanban_header:contains(Account Charts)",},{trigger:".o_searchview_dropdown_toggler",run:"click",},{trigger:".o_favorite_menu .o-dropdown-item:contains(Apps1)",run:"click",},{trigger:".o_kanban_record:not(.o_kanban_ghost):only",},{trigger:".o_favorite_menu .o-dropdown-item:contains(Apps1) i:not(:visible)",run:"click",},{trigger:".o_form_view .o_cp_action_menus .o-dropdown",run:"click",},{trigger:".o_popover > .o-dropdown-item:contains(Delete)",run:"click",},{trigger:".o_technical_modal button:contains(Delete)",run:"click",},{trigger:".o_searchview_dropdown_toggler",run:"click",},{trigger:".o_favorite_menu .o-dropdown-item:contains(Apps2)",},{content:"There should not be any facet inside the search bar",trigger:"body:not(:has(.o_searchview_facet))",},{content:"The Apps1 filter should be deleted",trigger:"body:not(:has(.o_favorite_menu .o-dropdown-item:contains(Apps1)))",},],});return __exports;});;

/* /web/static/tests/tours/test_user_group_settings_tour.js */
odoo.define('@web/../tests/tours/test_user_group_settings_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("test_user_group_settings",{url:"/odoo/settings?debug=assets,tests",steps:()=>[{trigger:'button[data-menu-xmlid="base.menu_users"]',content:"open user menu",run:"click",},{trigger:'a[data-menu-xmlid="base.menu_action_res_groups_privilege"]',content:"open privilege menu",run:"click",},{trigger:'th.o_group_name:contains("Master Data")',},{trigger:"button.o_list_button_add",content:"click on new button",run:"click",},{trigger:'.o_field_char[name="name"] input',content:"insert a privilege name",run:"edit Privi Foo",},{trigger:".o_field_x2many_list_row_add a",content:"add groups (open modal)",run:"click",},{trigger:".o_create_button",content:"create the first group",run:"click",},{trigger:'.o_field_char[name="name"] input[placeholder="Group Name"]',content:"insert the first group name",run:"edit Bar User",},{trigger:"footer .o_form_button_save_new",content:"create the second group",run:"click",},{trigger:"body .o_notebook_content:contains(bar user)",},{trigger:'.o_field_char[name="name"] input[placeholder="Group Name"]',content:"insert the second group name",run:"edit Bar Manager",},{trigger:'a[name="inherit_groups"]',content:"get implied groups",run:"click",},{trigger:'div[name="implied_ids"] .o_field_x2many_list_row_add a',content:"switch to implied",run:"click",},{trigger:".o_searchview_input",content:"search 'Bar' groups",run:"edit Bar",},{trigger:".o_searchview_autocomplete .o-dropdown-item.focus",content:"Validate search",run:"click",},{trigger:'.o_data_cell:contains("Bar User"):last',content:"click to implied group 'Bar User'",run:"click",},{trigger:"footer .o_form_button_save",content:"save group and close modal",run:"click",},{trigger:"body:not(:has(.modal:visible)) .o_notebook_content:contains(bar user):contains(bar manager)",},{trigger:'button[data-menu-xmlid="base.menu_users"]',content:"open user menu",run:"click",},{trigger:'a[data-menu-xmlid="base.menu_action_res_users"]',content:"open users & companies menu",run:"click",},{trigger:".o_list_renderer:contains(marc demo):contains(mitchell admin)",},{trigger:'.o_data_row:contains(Marc Demo) .o_field_cell[name="name"]',content:"open users menu",run:"click",},{trigger:'.o_last_breadcrumb_item:contains("Marc Demo")',content:"check if is demo user",},{trigger:'.o_field_widget[name="group_ids"] .o_cell:has(label:contains("Privi Foo")) + .o_cell .o_select_menu input',content:"Add 'Bar Manager' access to demo user",run:`click`,},{trigger:`.o-dropdown--menu .o_select_menu_item:contains("Bar Manager")`,run:"click",},{trigger:'.o_field_widget[name="group_ids"] .o_cell:has(label:contains("Privi Foo")) + .o_cell .o_group_info_button',content:"open group information for the new group",run:"click",},{trigger:'.o_popover:contains("Privi Foo") a:contains("Bar Manager")',content:"open the group from the info button",run:"click",},{trigger:'.o_last_breadcrumb_item:contains("Bar Manager")',content:"check if is Bar Manager group",},{trigger:'.o_field_many2many[name="user_ids"] .o_data_cell:contains("Marc Demo")',content:"check if demo user has this group",},],});return __exports;});;

/* /web/static/tests/tours/user_switch_tour.js */
odoo.define('@web/../tests/tours/user_switch_tour',['@web/core/registry','@bus/workers/websocket_worker','@odoo/owl'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{WORKER_STATE}=require("@bus/workers/websocket_worker");const{whenReady}=require("@odoo/owl");function logout(){return[{trigger:".o_web_client .o_navbar",async run(){await whenReady();await new Promise((resolve)=>requestAnimationFrame(resolve));await new Promise((resolve)=>{const bus=odoo.__WOWL_DEBUG__.root.env.services.bus_service;bus.addEventListener("BUS:CONNECT",resolve,{once:true});if(bus.workerState===WORKER_STATE.CONNECTED){resolve();}});},},{content:"check we're logged in",trigger:".o_user_menu .dropdown-toggle",run:"click",},{content:"click the Log out button",trigger:".dropdown-item[data-menu=logout]",run:"click",expectUnloadPage:true,},{trigger:".oe_website_login_container, .o_database_list",},];}
registry.category("web_tour.tours").add("test_user_switch",{url:"/odoo",steps:()=>[...logout(),{content:"check if the login input is empty",trigger:"input#login:empty",},{content:"check if the password input is empty",trigger:"input#password:empty",},{content:"Should contains the user switch button",trigger:".oe_login_form .o_user_switch_btn",run:"click",},{content:"Click on Marc Demo on the quick login page",trigger:".o_user_switch:not(:has(.list-group-item:nth-child(2))) .list-group-item:contains('Marc Demo')",run:"click",},{content:"Check user choice button to back on the quick login page",trigger:".oe_login_form .o_user_switch_btn",run:"click",},{content:"Display the login form",trigger:".o_user_switch .fa-user-circle-o",run:"click",},{content:"fill the login",trigger:"input#login",run:"edit admin",},{content:"fill the password",trigger:"input#password",run:"edit admin",},{content:"click on login button",trigger:'button:contains("Log in")',run:"click",expectUnloadPage:true,},...logout(),{content:"Check if there is Mitchell Admin in user list selection",trigger:".o_user_switch .list-group-item:nth-child(1):contains('Mitchell Admin')",},{content:"Check if there is Marc Demo in user list selection",trigger:".o_user_switch .list-group-item:nth-child(2):contains('Marc Demo')",},{content:"Choice demo",trigger:".o_user_switch .list-group-item:contains('Marc Demo')",run:"click",},{content:"check the login for demo",trigger:"input#login:value('demo')",},{content:"fill the password",trigger:"input#password",run:"edit demo",},{content:"Check back button to back on the quick login page",trigger:".oe_login_form .o_user_switch_btn",run:"click",},{content:"Check have 2 users",trigger:".o_user_switch .list-group-item:nth-child(2)",},{content:"Click on Mitchell Admin",trigger:".o_user_switch .list-group-item:nth-child(1):contains('Mitchell Admin')",run:"click",},{content:"check the login for admin",trigger:"input#login:value('admin')",},{content:"fill the password",trigger:"input#password",run:"edit admin",},{content:"Check back button to back on the quick login page",trigger:".oe_login_form .o_user_switch_btn",run:"click",},{content:"Display the login form",trigger:".o_user_switch .fa-user-circle-o",run:"click",},{content:"the login form is display",trigger:"form.oe_login_form:not(.d-none)",},{content:"check if the login input is empty",trigger:"input#login:empty",},{content:"check if the password input is empty",trigger:"input#password:empty",},{content:"Back to user switch",trigger:".oe_login_form .o_user_switch_btn",run:"click",},{content:"Remove the admin user from page",trigger:".o_user_switch .d-flex:first-child .fa-times",run:"click",},{content:"only one user is left on quick login",trigger:".o_user_switch:not(:has(.list-group-item:nth-child(2))) .list-group-item:contains('Marc Demo')",},],});return __exports;});;

/* /web_tour/static/src/js/tour_automatic/tour_helpers.js */
odoo.define('@web_tour/js/tour_automatic/tour_helpers',[],function(require){'use strict';let __exports={};const TourHelpers=__exports.TourHelpers=class TourHelpers{constructor(anchor){this.anchor=anchor;this.delay=20;return new Proxy(this,{get(target,prop,receiver){const value=Reflect.get(target,prop,receiver);if(typeof value==="function"&&prop!=="constructor"){return value.bind(target);}
return value;},});}}
return __exports;});;

/* /web/static/lib/hoot-dom/helpers/dom.js */
odoo.define('@web/../lib/hoot-dom/helpers/dom',['@web/../lib/hoot-dom/hoot_dom_utils','@web/../lib/hoot-dom/helpers/time'],function(require){'use strict';let __exports={};const{getTag,isFirefox,isInstanceOf,isIterable,parseRegExp}=require("@web/../lib/hoot-dom/hoot_dom_utils");const{waitUntil}=require("@web/../lib/hoot-dom/helpers/time");const{document,DOMParser,Error,innerWidth,innerHeight,Map,Number:{isInteger:$isInteger,isNaN:$isNaN,parseInt:$parseInt,parseFloat:$parseFloat},Object:{entries:$entries,keys:$keys,values:$values},RegExp,String:{raw:$raw},window,}=globalThis;function applyFilters(filters,nodes){for(const filter of filters){const filteredGroupNodes=[];for(let i=0;i<nodes.length;i++){const result=matchFilter(filter,nodes,i);if(result===true){filteredGroupNodes.push(nodes[i]);}else if(result){filteredGroupNodes.push(result);}}
nodes=filteredGroupNodes;if(globalFilterDescriptors.has(filter)){globalFilterDescriptors.get(filter).push(nodes.length);}else if(selectorFilterDescriptors.has(filter)){selectorFilterDescriptors.get(filter).push(nodes.length);}}
return nodes;}
function compilePseudoClassRegex(){const customKeys=[...customPseudoClasses.keys()].filter((k)=>k!=="has"&&k!=="not");return new RegExp(`:(${customKeys.join("|")})`);}
function elementsMatch(elements,selector){if(!elements.length){return false;}
return parseSelector(selector).some((selectorParts)=>{const[baseSelector,...filters]=selectorParts.at(-1);for(let i=0;i<elements.length;i++){if(baseSelector&&!elements[i].matches(baseSelector)){return false;}
if(!filters.every((filter)=>matchFilter(filter,elements,i))){return false;}}
return true;});}
function ensureCount(options){options={...options};if(!("eq"in options||"first"in options||"last"in options)){options.first=true;}
return options;}
function ensureElement(node){if(node){if(isDocument(node)){return node.documentElement;}
if(isWindow(node)){return node.document.documentElement;}
if(isElement(node)){return node;}}
return null;}
function extractLayers(nodes,level,keepInlineTextNodes){const layers=[];for(const node of nodes){if(node.nodeType===Node.COMMENT_NODE){continue;}
if(node.nodeType===Node.TEXT_NODE){const textContent=node.nodeValue.replaceAll(/\n/g,"");const trimmedTextContent=textContent.trim();if(trimmedTextContent){const inline=textContent===trimmedTextContent;layers.push({inline,level,value:{textContent:trimmedTextContent}});}
continue;}
const[open,close]=node.outerHTML.replace(`>${node.innerHTML}<`,">\n<").split("\n");const layer={inline:false,level,value:{open,close}};layers.push(layer);const childLayers=extractLayers(node.childNodes,level+1,false);if(keepInlineTextNodes&&childLayers.length===1&&childLayers[0].inline){layer.value.textContent=childLayers[0].value.textContent;}else{layers.push(...childLayers);}}
return layers;}
function filterUniqueNodes(nodesToFilter){const nodes=[];for(const node of nodesToFilter){if(isQueryableNode(node)&&!nodes.includes(node)){nodes.push(node);}}
return nodes;}
function generateStringFromLayers(layers,tabSize){const result=[];let layerIndex=0;while(layers.length>0){const layer=layers[layerIndex];const{level,value}=layer;const pad=" ".repeat(tabSize*level);let nextLayerIndex=layerIndex+1;if(value.open){if(value.textContent){result.push(`${pad}${value.open}${value.textContent}${value.close}`);layers.splice(layerIndex,1);nextLayerIndex--;}else{result.push(`${pad}${value.open}`);delete value.open;}}else{if(value.close){result.push(`${pad}${value.close}`);}else if(value.textContent){result.push(`${pad}${value.textContent}`);}
layers.splice(layerIndex,1);nextLayerIndex--;}
if(nextLayerIndex>=layers.length){layerIndex=nextLayerIndex-1;continue;}
const nextLayer=layers[nextLayerIndex];if(nextLayerIndex===0||nextLayer.level>layers[nextLayerIndex-1].level){layerIndex=nextLayerIndex;}else{layerIndex=nextLayerIndex-1;}}
return result.join("\n");}
function getFiltersDescription(modifierInfo){const description=[];for(const[modifier,content,count=0]of modifierInfo){const makeLabel=MODIFIER_SUFFIX_LABELS[modifier];const elements=plural("element",count);if(typeof makeLabel==="function"){description.push(`${count} ${elements} ${makeLabel(content)}`);}else{description.push(`${count} ${modifier} ${elements}`);}
if(!count){break;}}
return description;}
function getInlineNodeText(node){return getNodeText(node,{inline:true});}
function getNodeContent(node){switch(getTag(node)){case"input":case"option":case"textarea":return getNodeValue(node);case"select":return[...node.selectedOptions].map((node)=>getNodeValue(node)).join(",");}
return getNodeText(node);}
function getNodeIframe(node){const doc=node.contentDocument;return doc&&doc.readyState!=="loading"?doc:false;}
function getNodeShadowRoot(node){return node.shadowRoot;}
function getQueryFilter(pseudoClass,content){const makeQueryFilter=customPseudoClasses.get(pseudoClass);try{return makeQueryFilter(content);}catch(err){let message=`error while parsing pseudo-class ':${pseudoClass}'`;const cause=String(err?.message||err);if(cause){message+=`: ${cause}`;}
throw new HootDomError(message);}}
function getRawValue(node){return node.value;}
function getStringContent(string){return string.match(R_QUOTE_CONTENT)?.[2]||string;}
function getWaitForMessage(){const message=`expected at least 1 element after %timeout%ms and ${lastQueryMessage}`;lastQueryMessage="";return message;}
function getWaitForNoneMessage(){const message=`expected 0 elements after %timeout%ms and ${lastQueryMessage}`;lastQueryMessage="";return message;}
function hasNodeCount(count,_node,_i,nodes){return count===nodes.length;}
function isChar(char){return!!char&&R_CHAR.test(char);}
function isDocument(object){return object?.nodeType===Node.DOCUMENT_NODE;}
function isElement(object){return object?.nodeType===Node.ELEMENT_NODE;}
function isNodeHaving(selector,node){return!!_queryAll(selector,{root:node}).length;}
function isNodeHidden(node){return!isNodeVisible(node);}
function isNodeInteractive(node){return(getStyle(node).pointerEvents!=="none"&&!node.closest?.("[inert]")&&!getParentFrame(node)?.inert);}
function isNodeNotMatching(selector,node){return!matches(node,selector);}
function isNodeSelected(node){return!!node.selected;}
function isOnlyNode(_node,_i,nodes){return nodes.length===1;}
function isQueryableNode(node){return QUERYABLE_NODE_TYPES.includes(node.nodeType);}
function isRootElement(el){return el&&R_ROOT_ELEMENT.test(el.nodeName||"");}
function isShadowRoot(el){return el.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!!el.host;}
function isWindow(object){return object?.window===object&&object.constructor.name==="Window";}
function isWhiteSpace(char){return!!char&&R_HORIZONTAL_WHITESPACE.test(char);}
function makePseudoClassMatcher(getContent,exact){return function makePartialMatcher(content){const regex=parseRegExp(content);if(isInstanceOf(regex,RegExp)){return function stringMatches(node){return regex.test(getContent(node));};}else{const lowerContent=content.toLowerCase();if(exact){return function stringEquals(node){return getContent(node).toLowerCase()===lowerContent;};}else{return function stringContains(node){return getContent(node).toLowerCase().includes(lowerContent);};}}};}
function matchFilter(filter,nodes,index){if(typeof filter==="number"){if(filter<0){return filter+nodes.length===index;}else{return filter===index;}}
const node=nodes[index];if(typeof filter==="function"){return filter(node,index,nodes);}else{return!!node.matches?.(String(filter));}}
function nodeFlatMap(nodes,flatMapFn){const result=[];for(const node of nodes){const nodeList=flatMapFn(node);if(isNode(nodeList)){result.push(nodeList);}else if(isIterable(nodeList)){result.push(...nodeList);}}
return result;}
function parseNumberTuple(value,propsA,propsB){let result=[];if(value&&typeof value==="object"){if(isIterable(value)){[result[0],result[1]]=[...value];}else{for(const prop of propsA){result[0]??=value[prop];}
for(const prop of propsB){result[1]??=value[prop];}}}else{result=[value,value];}
return result.map($parseFloat);}
function parseRawArgs(args){return args[0]?.raw?[$raw(...args)]:args;}
function parseSelector(selector){function addToSelector(selector){registerChar=false;const index=currentPart.length-1;if(typeof currentPart[index]==="string"){currentPart[index]+=selector;}else{currentPart.push(selector);}}
const firstPart=[""];const firstGroup=[firstPart];const groups=[firstGroup];const parens=[0,0];let currentGroup=groups.at(-1);let currentPart=currentGroup.at(-1);let currentPseudo=null;let currentQuote=null;let registerChar=true;for(let i=0;i<selector.length;i++){const char=selector[i];registerChar=true;switch(char){case",":{if(!currentQuote&&!currentPseudo){groups.push([[""]]);currentGroup=groups.at(-1);currentPart=currentGroup.at(-1);registerChar=false;}
break;}
case" ":case"\t":case"\n":case"\r":case"\f":case"\v":{if(!currentQuote&&!currentPseudo){if(currentPart[0]||currentPart.length>1){currentGroup.push([""]);currentPart=currentGroup.at(-1);}
registerChar=false;}
break;}
case`'`:case`"`:{if(char===currentQuote){currentQuote=null;}else if(!currentQuote){currentQuote=char;}
break;}
case">":case"+":case"~":{if(!currentQuote&&!currentPseudo){while(isWhiteSpace(selector[i+1])){i++;}
addToSelector(char);}
break;}
case":":{if(!currentQuote&&!currentPseudo){let pseudo="";while(isChar(selector[i+1])){pseudo+=selector[++i];}
if(customPseudoClasses.has(pseudo)){if(selector[i+1]==="("){parens[0]++;i++;registerChar=false;}
currentPseudo=[pseudo,""];}else{addToSelector(char+pseudo);}}
break;}
case"(":{if(!currentQuote){parens[0]++;}
break;}
case")":{if(!currentQuote){parens[1]++;}
break;}}
if(currentPseudo){if(parens[0]===parens[1]){const[pseudo,content]=currentPseudo;if(pseudo==="iframe"&&!currentPart[0].startsWith("iframe")){currentPart[0]=`iframe${currentPart[0]}`;}
const filter=getQueryFilter(pseudo,getStringContent(content));selectorFilterDescriptors.set(filter,[pseudo,content]);currentPart.push(filter);currentPseudo=null;}else if(registerChar){currentPseudo[1]+=selector[i];}}else if(registerChar){addToSelector(selector[i]);}}
return groups;}
function parseXml(xmlString,type){const wrapperTag=type==="html"?"body":"templates";const doc=parser.parseFromString(`<${wrapperTag}>${xmlString}</${wrapperTag}>`,`text/${type}`);if(doc.getElementsByTagName("parsererror").length){const trimmed=xmlString.length>80?xmlString.slice(0,80)+"…":xmlString;throw new HootDomError(`error while parsing ${trimmed}: ${getNodeText(
                doc.getElementsByTagName("parsererror")[0]
            )}`);}
return doc.getElementsByTagName(wrapperTag)[0].childNodes;}
function pixelValueToNumber(val){return $parseFloat(val.endsWith("px")?val.slice(0,-2):val);}
function plural(word,count){return count===1?word:`${word}s`;}
function queryWithCustomSelector(nodes,selector){const selectorGroups=parseSelector(selector);const foundNodes=[];for(const selectorParts of selectorGroups){let groupNodes=nodes;for(const selectorPart of selectorParts){let baseSelector=selectorPart[0];let nodeGetter;switch(baseSelector[0]){case"+":{nodeGetter=NEXT_SIBLING;break;}
case">":{nodeGetter=DIRECT_CHILDREN;break;}
case"~":{nodeGetter=NEXT_SIBLINGS;break;}}
if(nodeGetter){baseSelector=baseSelector.slice(1);}
nodeGetter||=DESCENDANTS;const currentGroupNodes=nodeFlatMap(groupNodes,(node)=>nodeGetter(node,baseSelector));groupNodes=applyFilters(selectorPart.slice(1),currentGroupNodes);}
foundNodes.push(...groupNodes);}
return filterUniqueNodes(foundNodes);}
function registerQueryMessage(filteredNodes,expectedCount){lastQueryMessage="";const filteredCount=filteredNodes.length;const invalidCount=$isInteger(expectedCount)&&filteredCount!==expectedCount;if(shouldRegisterQueryMessage||invalidCount){const globalModifierInfo=[...globalFilterDescriptors.values()];lastQueryMessage+=`found ${filteredCount} ${plural("element", filteredCount)}`;if(invalidCount){lastQueryMessage+=` instead of ${expectedCount}`;}
const rootModifierInfo=globalModifierInfo.shift();const[,rootContent,initialCount=0]=rootModifierInfo;if(typeof rootContent==="string"){lastQueryMessage+=`: ${initialCount} matching ${JSON.stringify(rootContent)}`;if(selectorFilterDescriptors.size){const selectorModifierInfo=[...selectorFilterDescriptors.values()];lastQueryMessage+=` (${getFiltersDescription(selectorModifierInfo).join(" > ")})`;}}else if(filteredCount!==initialCount){lastQueryMessage+=`: ${initialCount} ${plural("element", initialCount)}`;}
if(initialCount){lastQueryMessage+=getFiltersDescription(globalModifierInfo).map((part)=>`, including ${part}`).join("");}}else{lastQueryMessage="";}
if(queryAllLevel<=1){globalFilterDescriptors.clear();selectorFilterDescriptors.clear();}
return invalidCount?lastQueryMessage:"";}
function _guardedQueryAll(target,options){try{return _queryAll(target,options);}catch(error){queryAllLevel=0;shouldRegisterQueryMessage=false;globalFilterDescriptors.clear();selectorFilterDescriptors.clear();throw error;}}
function _queryAll(target,options){queryAllLevel++;const{count,root,...modifiers}=options||{};if(count!==null&&count!==undefined&&(!$isInteger(count)||count<=0)){throw new HootDomError(`invalid 'count' option: should be a positive integer`);}
let nodes=[];let selector;if(typeof target==="string"){if(target){nodes=root?_queryAll(root):[getDefaultRoot()];}
selector=target.trim();}else if(isIterable(target)&&!isNode(target)){nodes=filterUniqueNodes(target);}else if(target){nodes=filterUniqueNodes([target]);}
globalFilterDescriptors.set("root",["",target]);if(selector&&nodes.length){if(rCustomPseudoClass.test(selector)){nodes=queryWithCustomSelector(nodes,selector);}else{nodes=filterUniqueNodes(nodeFlatMap(nodes,(node)=>DESCENDANTS(node,selector)));}}
globalFilterDescriptors.get("root").push(nodes.length);if(modifiers.visible&&modifiers.displayed){throw new HootDomError(`cannot use more than one visibility modifier ('visible' implies 'displayed')`);}
const modifierFilters=[];for(const[modifier,content]of $entries(modifiers)){if(content===false||!customPseudoClasses.has(modifier)){continue;}
const filter=getQueryFilter(modifier,content);modifierFilters.push(filter);globalFilterDescriptors.set(filter,[modifier,content]);}
const filteredNodes=applyFilters(modifierFilters,nodes);const message=registerQueryMessage(filteredNodes,count);if(message){throw new HootDomError(message);}
queryAllLevel--;return filteredNodes;}
function _queryOne(target,options){return _guardedQueryAll(target,{...options,count:1})[0];}
function _waitForFirst(target,options,isLast){shouldRegisterQueryMessage=isLast;const result=_guardedQueryAll(target,options)[0];shouldRegisterQueryMessage=false;return result;}
function _waitForNone(target,options,isLast){shouldRegisterQueryMessage=isLast;const result=_guardedQueryAll(target,options).length===0;shouldRegisterQueryMessage=false;return result;}
class HootDomError extends Error{name="HootDomError";}
const R_CHAR=/[\w-]/;const R_HORIZONTAL_WHITESPACE=/[\r\t\f \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/g;const R_LINEBREAK=/\s*\n+\s*/g;const R_QUOTE_CONTENT=/^\s*(['"])?([^]*?)\1\s*$/;const R_ROOT_ELEMENT=/^(HTML|HEAD|BODY)$/;const R_SCROLLABLE_OVERFLOW=/\bauto\b|\bscroll\b/;const MODIFIER_SUFFIX_LABELS={contains:(content)=>`with text "${content}"`,eq:(content)=>`at index ${content}`,has:(content)=>`containing selector "${content}"`,not:(content)=>`not matching "${content}"`,value:(content)=>`with value "${content}"`,viewPort:()=>"in viewport",};const QUERYABLE_NODE_TYPES=[Node.ELEMENT_NODE,Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE];const parser=new DOMParser();function DIRECT_CHILDREN(node,selector){const children=[];for(const childNode of node.childNodes){if(childNode.matches?.(selector)){children.push(childNode);}}
return children;}
function DESCENDANTS(node,selector){return node.querySelectorAll?.(selector||"*");}
function NEXT_SIBLING(node,selector){const sibling=node.nextElementSibling;return sibling?.matches?.(selector)&&sibling;}
function NEXT_SIBLINGS(node,selector){const siblings=[];while((node=node.nextElementSibling)){if(node.matches?.(selector)){siblings.push(node);}}
return siblings;}
const globalFilterDescriptors=new Map();const selectorFilterDescriptors=new Map();const observers=new Map();const currentDimensions={width:innerWidth,height:innerHeight,};let getDefaultRoot=()=>document;let lastQueryMessage="";let shouldRegisterQueryMessage=false;let queryAllLevel=0;const customPseudoClasses=new Map();customPseudoClasses.set("contains",makePseudoClassMatcher(getInlineNodeText,false)).set("count",(strCount)=>{const count=$parseInt(strCount);if(!$isInteger(count)||count<=0){throw new HootDomError(`expected count to be a positive integer (got "${strCount}")`);}
return hasNodeCount.bind(null,count);}).set("displayed",()=>isNodeDisplayed).set("empty",()=>isEmpty).set("eq",(strIndex)=>{const index=$parseInt(strIndex);if(!$isInteger(index)){throw new HootDomError(`expected index to be an integer (got "${strIndex}")`);}
return index;}).set("first",()=>0).set("focusable",()=>isNodeFocusable).set("has",(selector)=>isNodeHaving.bind(null,selector)).set("hidden",()=>isNodeHidden).set("iframe",()=>getNodeIframe).set("interactive",()=>isNodeInteractive).set("last",()=>-1).set("not",(selector)=>isNodeNotMatching.bind(null,selector)).set("only",()=>isOnlyNode).set("scrollable",(axis)=>isNodeScrollable.bind(null,axis)).set("selected",()=>isNodeSelected).set("shadow",()=>getNodeShadowRoot).set("text",makePseudoClassMatcher(getInlineNodeText,true)).set("value",makePseudoClassMatcher(getRawValue,false)).set("viewPort",()=>isNodeInViewPort).set("visible",()=>isNodeVisible);const rCustomPseudoClass=compilePseudoClassRegex();__exports.cleanupDOM=cleanupDOM;function cleanupDOM(){currentDimensions.width=innerWidth;currentDimensions.height=innerHeight;const remainingObservers=observers.size;if(remainingObservers){for(const{observer}of observers.values()){observer.disconnect();}
observers.clear();}}
__exports.defineRootNode=defineRootNode;function defineRootNode(node){if(typeof node==="function"){getDefaultRoot=node;}else if(node){getDefaultRoot=()=>node;}else{getDefaultRoot=()=>document;}}
__exports.getCurrentDimensions=getCurrentDimensions;function getCurrentDimensions(){return currentDimensions;}
__exports.getDocument=getDocument;function getDocument(node){if(!node){return document;}
return isDocument(node)?node:node.ownerDocument||document;}
__exports.getNodeAttribute=getNodeAttribute;function getNodeAttribute(node,attribute){return node.getAttribute?.(attribute)??null;}
__exports.getNodeValue=getNodeValue;function getNodeValue(node,options){if(options?.raw){return getRawValue(node);}
switch(node.type){case"checkbox":case"radio":return node.checked;case"file":return[...node.files];case"number":case"range":return node.valueAsNumber;case"date":case"datetime-local":case"month":case"time":case"week":return node.valueAsDate.toISOString();default:return node.value||"";}}
__exports.getNodeRect=getNodeRect;function getNodeRect(node,options){if(!isElement(node)){return new DOMRect();}
const rect=node.getBoundingClientRect();const parentFrame=getParentFrame(node);if(parentFrame){const parentRect=getNodeRect(parentFrame);rect.x-=parentRect.x;rect.y-=parentRect.y;}
if(!options?.trimPadding){return rect;}
const style=getStyle(node);const{x,y,width,height}=rect;const[pl,pr,pt,pb]=["left","right","top","bottom"].map((side)=>pixelValueToNumber(style.getPropertyValue(`padding-${side}`)));return new DOMRect(x+pl,y+pt,width-(pl+pr),height-(pt+pb));}
__exports.getNodeText=getNodeText;function getNodeText(node,options){let content;if(typeof node.innerText==="string"){content=node.innerText;}else{content=node.textContent;}
if(!options?.raw){content=content.replace(R_HORIZONTAL_WHITESPACE," ").trim();}
if(options?.inline){content=content.replace(R_LINEBREAK," ");}
return content;}
__exports.getInteractiveNode=getInteractiveNode;function getInteractiveNode(node){let currentEl=ensureElement(node);if(!currentEl){return null;}
while(currentEl&&!isNodeInteractive(currentEl)){currentEl=currentEl.parentElement;}
return currentEl;}
__exports.getStyle=getStyle;function getStyle(node){return isElement(node)?getComputedStyle(node):null;}
__exports.getWindow=getWindow;function getWindow(node){if(!node){return window;}
return isWindow(node)?node:getDocument(node).defaultView;}
__exports.isCheckable=isCheckable;function isCheckable(node){switch(getTag(node)){case"input":return node.type==="checkbox"||node.type==="radio";case"label":return isCheckable(node.control);default:return false;}}
__exports.isEmpty=isEmpty;function isEmpty(value){if(!value){return true;}
if(typeof value==="object"){if(isNode(value)){return isEmpty(getNodeContent(value));}
if(!isIterable(value)){value=$keys(value);}
return[...value].length===0;}
return false;}
__exports.isEventTarget=isEventTarget;function isEventTarget(object){return object&&typeof object.addEventListener==="function";}
__exports.isNode=isNode;function isNode(object){return object&&typeof object.nodeType==="number"&&typeof object.nodeName==="string";}
__exports.isNodeCssVisible=isNodeCssVisible;function isNodeCssVisible(node){const element=ensureElement(node);if(element===getDefaultRoot()||isRootElement(element)){return true;}
const style=getStyle(element);if(style?.visibility==="hidden"||style?.opacity==="0"){return false;}
const parent=element.parentNode;return!parent||isNodeCssVisible(isShadowRoot(parent)?parent.host:parent);}
__exports.isNodeDisplayed=isNodeDisplayed;function isNodeDisplayed(node){const element=ensureElement(node);if(!isInDOM(element)){return false;}
if(isRootElement(element)||element.offsetParent||element.closest("svg")){return true;}
return!isFirefox()&&getStyle(element)?.position==="fixed";}
__exports.isNodeFocusable=isNodeFocusable;function isNodeFocusable(node,options){return(isNodeDisplayed(node)&&node.matches?.(FOCUSABLE_SELECTOR)&&(!options?.tabbable||node.tabIndex>=0));}
__exports.isNodeInViewPort=isNodeInViewPort;function isNodeInViewPort(node){const element=ensureElement(node);const{x,y}=getNodeRect(element);return y>0&&y<currentDimensions.height&&x>0&&x<currentDimensions.width;}
__exports.isNodeScrollable=isNodeScrollable;function isNodeScrollable(axis,node){if(!isElement(node)){return false;}
const isScrollableX=node.clientWidth<node.scrollWidth;const isScrollableY=node.clientHeight<node.scrollHeight;switch(axis){case"both":{if(!isScrollableX||!isScrollableY){return false;}
break;}
case"x":{if(!isScrollableX){return false;}
break;}
case"y":{if(!isScrollableY){return false;}
break;}
default:{if(!isScrollableX&&!isScrollableY){return false;}}}
const overflow=getStyle(node).getPropertyValue("overflow");if(R_SCROLLABLE_OVERFLOW.test(overflow)){return true;}
return false;}
__exports.isNodeVisible=isNodeVisible;function isNodeVisible(node){const element=ensureElement(node);if(!isNodeDisplayed(element)||!isNodeCssVisible(element)){return false;}
let visible=false;const{width,height}=getNodeRect(element);visible=width>0&&height>0;if(!visible&&getStyle(element)?.display==="contents"){for(const child of element.childNodes){if(isNodeVisible(child)){return true;}}}
return visible;}
__exports.parseDimensions=parseDimensions;function parseDimensions(dimensions){return parseNumberTuple(dimensions,["width","w"],["height","h"]);}
__exports.parsePosition=parsePosition;function parsePosition(position){return parseNumberTuple(position,["x","left","clientX","pageX","screenX"],["y","top","clientY","pageY","screenY"]);}
__exports.setDimensions=setDimensions;function setDimensions(width,height){const defaultRoot=getDefaultRoot();if(!$isNaN(width)){currentDimensions.width=width;defaultRoot.style?.setProperty("width",`${width}px`,"important");}
if(!$isNaN(height)){currentDimensions.height=height;defaultRoot.style?.setProperty("height",`${height}px`,"important");}}
__exports.toSelector=toSelector;function toSelector(node,options){const parts={tag:node.nodeName.toLowerCase(),};if(node.id){parts.id=`#${node.id}`;}
if(node.classList?.length){parts.class=`.${[...node.classList].join(".")}`;}
return options?.object?parts:$values(parts).join("");}
const FOCUSABLE_SELECTOR=__exports.FOCUSABLE_SELECTOR=["a[href]","area[href]","button:enabled","details > summary:first-of-type","iframe","input:enabled","select:enabled","textarea:enabled","[tabindex]","[contenteditable=true]",].join(",");__exports.formatXml=formatXml;function formatXml(value,options){const nodes=parseXml(value,options?.type||"xml");const layers=extractLayers(nodes,0,options?.keepInlineTextNodes??false);return generateStringFromLayers(layers,options?.tabSize??4);}
__exports.getActiveElement=getActiveElement;function getActiveElement(node){const doc=getDocument(node);const view=doc.defaultView;const{activeElement}=doc;const{contentDocument,shadowRoot}=activeElement;if(contentDocument&&contentDocument.activeElement!==contentDocument.body){if(contentDocument.activeElement===contentDocument.body){return contentDocument.activeElement;}else{return getActiveElement(contentDocument);}}
if(shadowRoot){return shadowRoot.activeElement;}
if(activeElement===doc.body&&view!==view.parent){return getActiveElement(view.parent.document);}
return activeElement;}
__exports.getFocusableElements=getFocusableElements;function getFocusableElements(options){const parent=_queryOne(options?.root||getDefaultRoot());if(typeof parent.querySelectorAll!=="function"){return[];}
const byTabIndex={};for(const element of parent.querySelectorAll(FOCUSABLE_SELECTOR)){const{tabIndex}=element;if((options?.tabbable&&tabIndex<0)||!isNodeDisplayed(element)){continue;}
if(!byTabIndex[tabIndex]){byTabIndex[tabIndex]=[];}
byTabIndex[tabIndex].push(element);}
const withTabIndexZero=byTabIndex[0]||[];delete byTabIndex[0];return[...$values(byTabIndex).flat(),...withTabIndexZero];}
__exports.getNextFocusableElement=getNextFocusableElement;function getNextFocusableElement(options){const parent=_queryOne(options?.root||getDefaultRoot());const focusableEls=getFocusableElements({...options,parent});const index=focusableEls.indexOf(getActiveElement(parent));return focusableEls[index+1]||null;}
__exports.getParentFrame=getParentFrame;function getParentFrame(node){const doc=getDocument(node);if(!doc){return null;}
const view=doc.defaultView;if(view!==view.parent){for(const iframe of view.parent.document.getElementsByTagName("iframe")){if(iframe.contentWindow===view){return iframe;}}}
return null;}
__exports.getPreviousFocusableElement=getPreviousFocusableElement;function getPreviousFocusableElement(options){const parent=_queryOne(options?.root||getDefaultRoot());const focusableEls=getFocusableElements({...options,parent});const index=focusableEls.indexOf(getActiveElement(parent));return index<0?focusableEls.at(-1):focusableEls[index-1]||null;}
__exports.isDisplayed=isDisplayed;function isDisplayed(target){return _guardedQueryAll(target,{displayed:true}).length>0;}
__exports.isEditable=isEditable;function isEditable(node){return(isElement(node)&&!node.matches?.(":disabled")&&["input","textarea"].includes(getTag(node)));}
__exports.isFocusable=isFocusable;function isFocusable(target){return _guardedQueryAll(target,{focusable:true}).length>0;}
__exports.isInDOM=isInDOM;function isInDOM(target){return ensureElement(target)?.isConnected;}
__exports.isInViewPort=isInViewPort;function isInViewPort(target){return _guardedQueryAll(target,{viewPort:true}).length>0;}
__exports.isScrollable=isScrollable;function isScrollable(target,axis){return _guardedQueryAll(target,{scrollable:axis}).length>0;}
__exports.isVisible=isVisible;function isVisible(target){return _guardedQueryAll(target,{visible:true}).length>0;}
__exports.matches=matches;function matches(target,selector){return elementsMatch(_guardedQueryAll(target),selector);}
__exports.queryAll=queryAll;function queryAll(target,options){[target,options]=parseRawArgs(arguments);return _guardedQueryAll(target,options);}
__exports.queryAllAttributes=queryAllAttributes;function queryAllAttributes(target,attribute,options){return _guardedQueryAll(target,options).map((node)=>getNodeAttribute(node,attribute));}
__exports.queryAllProperties=queryAllProperties;function queryAllProperties(target,property,options){return _guardedQueryAll(target,options).map((node)=>node[property]);}
__exports.queryAllRects=queryAllRects;function queryAllRects(target,options){[target,options]=parseRawArgs(arguments);return _guardedQueryAll(target,options).map(getNodeRect);}
__exports.queryAllTexts=queryAllTexts;function queryAllTexts(target,options){[target,options]=parseRawArgs(arguments);return _guardedQueryAll(target,options).map((node)=>getNodeText(node,options));}
__exports.queryAllValues=queryAllValues;function queryAllValues(target,options){[target,options]=parseRawArgs(arguments);return _guardedQueryAll(target,options).map((node)=>getNodeValue(node,options));}
__exports.queryAny=queryAny;function queryAny(target,options){[target,options]=parseRawArgs(arguments);return _queryOne(target,ensureCount(options));}
__exports.queryAttribute=queryAttribute;function queryAttribute(target,attribute,options){return getNodeAttribute(_queryOne(target,options),attribute);}
__exports.queryFirst=queryFirst;function queryFirst(target,options){[target,options]=parseRawArgs(arguments);return _guardedQueryAll(target,options)[0]||null;}
__exports.queryOne=queryOne;function queryOne(target,options){[target,options]=parseRawArgs(arguments);if($isInteger(options?.count)){throw new HootDomError(`cannot call \`queryOne\` with 'count'=${options.count}: did you mean to use \`queryAll\`?`);}
return _queryOne(target,options);}
__exports.queryRect=queryRect;function queryRect(target,options){[target,options]=parseRawArgs(arguments);return getNodeRect(_queryOne(target,options),options);}
__exports.queryText=queryText;function queryText(target,options){[target,options]=parseRawArgs(arguments);return getNodeText(_queryOne(target,options),options);}
__exports.queryValue=queryValue;function queryValue(target,options){[target,options]=parseRawArgs(arguments);return getNodeValue(_queryOne(target,options),options);}
__exports.waitFor=waitFor;function waitFor(target,options){[target,options]=parseRawArgs(arguments);return waitUntil(_waitForFirst.bind(null,target,options),{message:getWaitForMessage,...options,});}
__exports.waitForNone=waitForNone;function waitForNone(target,options){[target,options]=parseRawArgs(arguments);return waitUntil(_waitForNone.bind(null,target,options),{message:getWaitForNoneMessage,...options,});}
return __exports;});;

/* /web/static/lib/hoot-dom/helpers/events.js */
odoo.define('@web/../lib/hoot-dom/helpers/events',['@web/../lib/hoot-dom/hoot_dom_utils','@web/../lib/hoot-dom/helpers/dom'],function(require){'use strict';let __exports={};const{getColorHex,getTag,isFirefox,isInstanceOf,isIterable}=require("@web/../lib/hoot-dom/hoot_dom_utils");const{getActiveElement,getDocument,getInteractiveNode,getNextFocusableElement,getNodeRect,getNodeValue,getParentFrame,getPreviousFocusableElement,getStyle,getWindow,isCheckable,isEditable,isEventTarget,isNode,isNodeFocusable,parseDimensions,parsePosition,queryAll,queryAny,setDimensions,toSelector,}=require("@web/../lib/hoot-dom/helpers/dom");const{AnimationEvent,ClipboardEvent,CompositionEvent,console:{dir:$dir,groupCollapsed:$groupCollapsed,groupEnd:$groupEnd,log:$log},DataTransfer,document,DragEvent,Error,ErrorEvent,Event,File,FocusEvent,HashChangeEvent,HTMLElement,KeyboardEvent,Math:{ceil:$ceil,max:$max,min:$min},MouseEvent,Number:{isInteger:$isInteger,isNaN:$isNaN,parseFloat:$parseFloat},Object:{assign:$assign,create:$create,defineProperties:$defineProperties,values:$values,},PointerEvent,PromiseRejectionEvent,String,SubmitEvent,Touch,TouchEvent,TypeError,WheelEvent,}=globalThis;const $createRange=document.createRange.bind(document);const $toString=Object.prototype.toString;const $blur=HTMLElement.prototype.blur;HTMLElement.prototype.blur=function mockBlur(){if(runTime.changeTarget&&runTime.changeTarget===this){triggerChange();}
return $blur.call(this,...arguments);};const $focus=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function mockFocus(){if(runTime.changeTarget&&runTime.changeTarget!==this){triggerChange();}
return $focus.call(this,...arguments);};function cancelTrustedEvent(ev){if(ev.isTrusted&&runTime.eventsToIgnore.includes(ev.type)){runTime.eventsToIgnore.splice(runTime.eventsToIgnore.indexOf(ev.type),1);ev.stopPropagation();ev.stopImmediatePropagation();ev.preventDefault();}}
async function changeSelection(target,start,end){if(!isNil(start)&&!isNil(target.selectionStart)){target.selectionStart=start;}
if(!isNil(end)&&!isNil(target.selectionEnd)){target.selectionEnd=end;}}
function constrainScrollX(target,x){let{offsetWidth,scrollWidth}=target;const document=getDocument(target);if(target===document||target===document.documentElement){const iframe=getParentFrame(target);if(iframe){({offsetWidth}=iframe);}}
const maxScrollLeft=scrollWidth-offsetWidth;const{direction}=getStyle(target);const[min,max]=direction==="rtl"?[-maxScrollLeft,0]:[0,maxScrollLeft];return $min($max(x,min),max);}
function constrainScrollY(target,y){let{offsetHeight,scrollHeight}=target;const document=getDocument(target);if(target===document||target===document.documentElement){const iframe=getParentFrame(target);if(iframe){({offsetHeight}=iframe);}}
return $min($max(y,0),scrollHeight-offsetHeight);}
function createDataTransfer(options){const dataTransfer=isInstanceOf(options?.dataTransfer,DataTransfer)?options.dataTransfer:new DataTransfer();for(const file of options?.files||[]){if(!isInstanceOf(file,File)){throw new TypeError(`'DataTransfer.files' list only accepts 'File' objects`);}
dataTransfer.items.add(file);}
for(const[data,type]of options?.items||[]){dataTransfer.items.add(data,type);}
$defineProperties(dataTransfer,{dropEffect:{value:options?.dropEffect||"none",writable:true},effectAllowed:{value:options?.effectAllowed||"all",writable:true},});return dataTransfer;}
function deleteSelection(target){const{selectionStart,selectionEnd,value}=target;return value.slice(0,selectionStart)+value.slice(selectionEnd);}
async function dispatchAndIgnore({target,events,additionalEvents=[],callback,options}){for(const eventType of[...events,...additionalEvents]){runTime.eventsToIgnore.push(eventType);}
callback?.();for(const eventType of events){await _dispatch(target,eventType,options);}}
async function dispatchPointerEvent(target,eventType,eventInit,{mouse,touch}){const pointerEvent=await _dispatch(target,eventType,eventInit);let prevented=isPrevented(pointerEvent);if(hasTouch()){if(touch&&runTime.pointerDownTarget){const[touchEventType,touchEventInit]=touch;await _dispatch(runTime.pointerDownTarget,touchEventType,touchEventInit||eventInit);}}else{if(mouse&&!prevented){const[mouseEventType,mouseEventInit]=mouse;const mouseEvent=await _dispatch(target,mouseEventType,mouseEventInit||eventInit);prevented=isPrevented(mouseEvent);}}
return prevented;}
async function dispatchRelatedEvents(events,eventType,eventInit){for(const event of events){if(!event.target||isPrevented(event)){break;}
await _dispatch(event.target,eventType,eventInit);}}
function ensureArray(value,mapFn){if(Array.isArray(value)){return mapFn?value.map(mapFn):value;}
if(isIterable(value)){return Array.from(value,mapFn);}
return[mapFn?mapFn(value):value];}
function getCurrentEvents(){const eventType=currentEventTypes.at(-1);if(!eventType){return[];}
currentEvents[eventType]||=[];return currentEvents[eventType];}
function getDefaultRunTimeValue(){return{changeTarget:null,changeTargetListeners:[],clipboardData:null,dataTransfer:null,initialValue:null,isComposing:false,key:null,canStartDrag:false,isDragging:false,lastDragOverCancelled:false,clickCount:0,pointerDownTarget:null,pointerDownTimeout:0,pointerTarget:null,position:{},previousPointerDownTarget:null,touchStartPosition:{},fileInput:null,buttons:0,modifierKeys:{},eventsToIgnore:[],};}
function getDifferentParents(el1,el2){if(!el1&&!el2){return[];}else if(!el1&&el2){[el1,el2]=[el2,el1];}
const parents=[el2||el1];while(parents[0].parentElement){const parent=parents[0].parentElement;if(el2&&parent.contains(el1)){break;}
parents.unshift(parent);}
return parents;}
function getEventConstructor(eventType){switch(eventType){case"dblclick":case"mousedown":case"mouseup":case"mousemove":case"mouseover":case"mouseout":return[MouseEvent,mapMouseEvent,BUBBLES|CANCELABLE|VIEW];case"mouseenter":case"mouseleave":return[MouseEvent,mapMouseEvent,VIEW];case"auxclick":case"click":case"contextmenu":case"pointerdown":case"pointerup":case"pointermove":case"pointerover":case"pointerout":return[PointerEvent,mapPointerEvent,BUBBLES|CANCELABLE|VIEW];case"pointerenter":case"pointerleave":case"pointercancel":return[PointerEvent,mapPointerEvent,VIEW];case"blur":case"focus":return[FocusEvent,mapEvent];case"focusin":case"focusout":return[FocusEvent,mapEvent,BUBBLES];case"cut":case"copy":case"paste":return[ClipboardEvent,mapEvent,BUBBLES];case"keydown":case"keyup":return[KeyboardEvent,mapKeyboardEvent,BUBBLES|CANCELABLE|VIEW];case"drag":case"dragend":case"dragenter":case"dragstart":case"dragleave":case"dragover":case"drop":return[DragEvent,mapEvent,BUBBLES|CANCELABLE];case"beforeinput":return[InputEvent,mapInputEvent,BUBBLES|CANCELABLE|VIEW];case"input":return[InputEvent,mapInputEvent,BUBBLES|VIEW];case"compositionstart":case"compositionend":return[CompositionEvent,mapEvent,BUBBLES];case"select":case"selectionchange":return[Event,mapEvent,BUBBLES];case"touchstart":case"touchend":case"touchmove":return[TouchEvent,mapTouchEvent,BUBBLES|CANCELABLE|VIEW];case"touchcancel":return[TouchEvent,mapTouchEvent,BUBBLES|VIEW];case"resize":return[Event,mapEvent];case"submit":return[SubmitEvent,mapEvent,BUBBLES|CANCELABLE];case"wheel":return[WheelEvent,mapWheelEvent,BUBBLES|VIEW];case"animationcancel":case"animationend":case"animationiteration":case"animationstart":{return[AnimationEvent,mapEvent,BUBBLES|CANCELABLE];}
case"error":return[ErrorEvent,mapEvent];case"unhandledrejection":return[PromiseRejectionEvent,mapEvent,CANCELABLE];case"beforeunload":return[Event,mapEvent,CANCELABLE];case"unload":return[Event,mapEvent];case"hashchange":return[HashChangeEvent,mapEvent];default:return[Event,mapEvent,BUBBLES];}}
function getFirstCommonParent(a,b){if(!a||!b||a.ownerDocument!==b.ownerDocument){return null;}
const range=document.createRange();range.setStart(a,0);range.setEnd(b,0);if(range.collapsed){range.setStart(b,0);range.setEnd(a,0);}
return range.commonAncestorContainer;}
function getPointerTarget(element,options,originalTarget){if(!element||options?.interactive===false){return element;}
const interactiveElement=getInteractiveNode(element);if(!interactiveElement&&originalTarget){queryAny(originalTarget,{...options,interactive:true});}
return interactiveElement;}
function getPosition(element,options){const{position,relative}=options||{};const isString=typeof position==="string";const[posX,posY]=parsePosition(position);if(!isString&&!relative&&!$isNaN(posX)&&!$isNaN(posY)){return toEventPosition(posX,posY,position);}
const{x,y,width,height}=getNodeRect(element);let clientX=x;let clientY=y;if(isString){const positions=position.split("-");if(positions.includes("left")){clientX-=1;}else if(positions.includes("right")){clientX+=$ceil(width)+1;}else{clientX+=width/2;}
if(positions.includes("top")){clientY-=1;}else if(positions.includes("bottom")){clientY+=$ceil(height)+1;}else{clientY+=height/2;}}else{if($isNaN(posX)){clientX+=width/2;}else{if(relative){clientX+=posX||0;}else{clientX=posX||0;}}
if($isNaN(posY)){clientY+=height/2;}else{if(relative){clientY+=posY||0;}else{clientY=posY||0;}}}
return toEventPosition(clientX,clientY,position);}
function getStringSelection(target){return($isInteger(target.selectionStart)&&$isInteger(target.selectionEnd)&&[target.selectionStart,target.selectionEnd].join(","));}
function hasTagName(node,...tagNames){return tagNames.includes(getTag(node));}
function hasTouch(){return(globalThis.ontouchstart!==undefined||globalThis.matchMedia("(pointer:coarse)").matches);}
function isDifferentPosition(position){if(!runTime.position||!position){return runTime.position!==position;}
for(const key in position){if(runTime.position[key]!==position[key]){return true;}}
return false;}
function isDictionary(object){return $toString.call(object)==="[object Object]";}
function isNil(value){return value===null||value===undefined;}
function isPrevented(event){return event&&event.defaultPrevented;}
function parseKeyStrokes(keyStrokes,options){return ensureArray(keyStrokes,(key)=>{const lower=key.toLowerCase();return{...options,key:lower.length===1?key:KEY_ALIASES[lower]||key,};});}
function redirectSubmit(ev){if(isPrevented(ev)){return;}
ev.preventDefault();const form=ev.target;globalThis.fetch(form.action,{method:form.method,body:new FormData(form,ev.submitter),});}
function registerButton(eventInit,toggle){let value=0;switch(eventInit.button){case btn.LEFT:{value=1;break;}
case btn.MIDDLE:{value=4;break;}
case btn.RIGHT:{value=2;break;}
case btn.BACK:{value=8;break;}
case btn.FORWARD:{value=16;break;}}
runTime.buttons=$max(runTime.buttons+(toggle?value:-value),0);}
function registerFileInput({target}){const actualTarget=target.shadowRoot?target.shadowRoot.activeElement:target;if(getTag(actualTarget)==="input"&&actualTarget.type==="file"){runTime.fileInput=actualTarget;}else{runTime.fileInput=null;}}
async function registerForChange(target,confirmAction){confirmAction&&=confirmAction.toLowerCase();if(confirmAction==="auto"){confirmAction=getTag(target)==="input"?"enter":"blur";}
const parentDocument=getDocument(target);const parentView=parentDocument.defaultView;if(confirmAction==="enter"&&getTag(target)!=="input"){throw new HootInteractionError(`"enter" confirm action is only supported on <input/> elements`);}
runTime.changeTarget=target;runTime.changeTargetListeners.push(on(parentView,"focusout",triggerChange),on(parentView,"change",removeChangeTargetListeners));switch(confirmAction){case"blur":{await _hover(parentDocument.body,{position:{x:0,y:0}},{originalTarget:target});await _click();break;}
case"enter":{await _press(target,{key:"Enter"});break;}
case"tab":{await _press(target,{key:"Tab"});break;}}}
function registerSpecialKey(eventInit,toggle){switch(eventInit.key){case"Alt":{runTime.modifierKeys.altKey=toggle;break;}
case"Control":{runTime.modifierKeys.ctrlKey=toggle;break;}
case"Meta":{runTime.modifierKeys.metaKey=toggle;break;}
case"Shift":{runTime.modifierKeys.shiftKey=toggle;break;}}}
function removeChangeTargetListeners(){for(const listener of runTime.changeTargetListeners){listener();}
runTime.changeTarget=null;runTime.changeTargetListeners=[];}
function resolve(resolver){return typeof resolver==="function"?resolver():resolver;}
function setPointerDownTarget(target,options){if(runTime.pointerDownTarget){runTime.previousPointerDownTarget=runTime.pointerDownTarget;}
runTime.pointerDownTarget=getPointerTarget(target,options);runTime.canStartDrag=false;}
function setupEvents(type,options){currentEventTypes.push(type);$assign(currentEventInit,options?.eventInit);return function finalizeEvents(){for(const eventType in currentEventInit){delete currentEventInit[eventType];}
const events=new EventList(getCurrentEvents());const currentType=currentEventTypes.pop();delete currentEvents[currentType];if(!allowLogs){return events;}
const groupName=[`%c[${type}]%c dispatched`,`color: ${getColorHex("purple")}`,"",events.length,`events`,];$groupCollapsed(...groupName);for(const event of events){const colors=[getColorHex("text-report-html-tag")];const typeList=[event.type];if(event.key){typeList.push(event.key);}else if(event.button){typeList.push(event.button);}
[...Array(typeList.length)].forEach(()=>colors.push(getColorHex("text-report-string")));const typeString=typeList.map((t)=>`%c"${t}"%c`).join(", ");let message=`%c${event.constructor.name}%c<${typeString}>`;if(event.__bubbleCount){message+=` (${event.__bubbleCount})`;}
const target=event.__originalTarget||event.target;if(isNode(target)){const targetParts=toSelector(target,{object:true});colors.push(getColorHex("text-report-html-tag"));if(targetParts.id){colors.push(getColorHex("text-report-html-id"));}
if(targetParts.class){colors.push(getColorHex("text-report-html-class"));}
const targetString=$values(targetParts).map((part)=>`%c${part}%c`).join("");message+=` @${targetString}`;}
const messageColors=colors.flatMap((color)=>[`color: ${color}; font-weight: normal`,"",]);$groupCollapsed(message,...messageColors);$dir(event);$log(target);$groupEnd();}
$groupEnd();return events;};}
function toEventPosition(clientX,clientY,position){clientX||=0;clientY||=0;return{clientX,clientY,pageX:position?.pageX??clientX,pageY:position?.pageY??clientY,screenX:position?.screenX??clientX,screenY:position?.screenY??clientY,};}
async function triggerChange(){const target=runTime.changeTarget;const hasValueChanged=runTime.initialValue!==target.value;runTime.initialValue=null;removeChangeTargetListeners();if(target&&hasValueChanged){return _dispatch(target,"change");}}
async function triggerClick(target,pointerInit){if(target.disabled){return;}
const eventType=(pointerInit.button??0)===btn.LEFT?"click":"auxclick";const clickEvent=await _dispatch(target,eventType,pointerInit);if(isPrevented(clickEvent)){return;}
if(isFirefox()){switch(getTag(target)){case"label":{target=target.control;if(target){await triggerClick(target,pointerInit);}
break;}
case"option":{const parent=target.parentElement;if(parent&&getTag(parent)==="select"){await _dispatch(parent,"change");}
break;}}}}
async function triggerDrag(target,eventInit){await _dispatch(target,"drag",eventInit);const dragOverEvent=await _dispatch(target,"dragover",eventInit);return isPrevented(dragOverEvent);}
async function triggerFocus(target){const previous=getActiveElement(target);if(previous===target){return;}
if(previous!==target.ownerDocument.body){if(runTime.changeTarget){await triggerChange();}
await dispatchAndIgnore({target:previous,events:["blur","focusout"],callback:$blur.bind(previous),options:{relatedTarget:target},});}
if(isNodeFocusable(target)){const previousSelection=getStringSelection(target);await dispatchAndIgnore({target,events:["focus","focusin"],additionalEvents:["select"],callback:$focus.bind(target),options:{relatedTarget:previous},});if(previousSelection&&previousSelection===getStringSelection(target)){changeSelection(target,target.value.length,target.value.length);}}}
async function _clear(targetResolver,options){await _press(targetResolver,{ctrlKey:true,key:"a"});await _press(targetResolver,{key:"Backspace"},{fullClear:true});await registerForChange(resolve(targetResolver),options?.confirm);}
async function _click(options){await _pointerDown(options);await _pointerUp(options);}
async function _dispatch(target,type,eventInit){eventInit={...eventInit,...currentEventInit[type]};for(const key in eventInit){if(key in DEPRECATED_EVENT_PROPERTIES){throw new HootInteractionError(`cannot dispatch "${type}" event: property "${key}" is deprecated, use "${DEPRECATED_EVENT_PROPERTIES[key]}" instead`);}}
const[Constructor,processParams,flags]=getEventConstructor(type);const params=processParams({composed:true,...eventInit,target,type,});if(flags&BUBBLES){params.bubbles=true;}
if(flags&CANCELABLE){params.cancelable=true;}
if(flags&VIEW){params.view||=getWindow(target);}
const event=new Constructor(type,params);target.dispatchEvent(event);await Promise.resolve();getCurrentEvents().push(event);return event;}
async function _fill(targetResolver,value,options){const initialTarget=resolve(targetResolver);if(getTag(initialTarget)==="input"){switch(initialTarget.type){case"color":case"time":{initialTarget.value=String(value);await _dispatch(initialTarget,"input");await _dispatch(initialTarget,"change");return;}
case"file":{const files=ensureArray(value);if(files.length>1&&!initialTarget.multiple){throw new HootInteractionError(`input[type="file"] does not support multiple files`);}
initialTarget.files=createDataTransfer({files}).files;await _dispatch(initialTarget,"change");return;}
case"range":{const numberValue=$parseFloat(value);if($isNaN(numberValue)){throw new TypeError(`input[type="range"] only accept 'number' values`);}
initialTarget.value=String(numberValue);await _dispatch(initialTarget,"input");await _dispatch(initialTarget,"change");return;}}}
if(options?.instantly){globalThis.navigator.clipboard.writeText(value).catch();await _press(targetResolver,{ctrlKey:true,key:"v"});}else{if(options?.composition){runTime.isComposing=true;await _dispatch(initialTarget,"compositionstart");}
for(const char of String(value)){const key=char.toLowerCase();await _press(targetResolver,{key,shiftKey:key!==char});}
if(options?.composition){runTime.isComposing=false;await _dispatch(initialTarget,"compositionend");}}
await registerForChange(resolve(targetResolver),options?.confirm);}
async function _hover(target,options,hoverOptions){const pointerTarget=getPointerTarget(target,options,hoverOptions.originalTarget);const position=target&&getPosition(target,options);const previousPT=runTime.pointerTarget;const previousPosition=runTime.position;const isDifferentTarget=previousPT!==pointerTarget;if(hoverOptions?.implicit&&!isDifferentTarget&&!isDifferentPosition(position)){return;}
if(runTime.canStartDrag){const dragStartEvent=await _dispatch(previousPT,"dragstart",{dataTransfer:runTime.dataTransfer,});runTime.isDragging=!isPrevented(dragStartEvent);runTime.canStartDrag=false;}
runTime.pointerTarget=pointerTarget;runTime.position=position;if(isDifferentTarget&&previousPT&&(!pointerTarget||!previousPT.contains(pointerTarget))){const leaveEventInit={...previousPosition,relatedTarget:pointerTarget,button:options?.button||0,};if(runTime.isDragging){const leaveEventInitWithDT={...leaveEventInit,dataTransfer:runTime.dataTransfer};runTime.lastDragOverCancelled=await triggerDrag(previousPT,leaveEventInitWithDT);await _dispatch(previousPT,"dragleave",leaveEventInitWithDT);}else{await dispatchPointerEvent(previousPT,"pointermove",leaveEventInit,{mouse:["mousemove"],touch:["touchmove"],});await dispatchPointerEvent(previousPT,"pointerout",leaveEventInit,{mouse:["mouseout"],});const leaveEvents=await Promise.all(getDifferentParents(pointerTarget,previousPT).map((element)=>_dispatch(element,"pointerleave",leaveEventInit)));if(!hasTouch()){await dispatchRelatedEvents(leaveEvents,"mouseleave",leaveEventInit);}}}
if(!pointerTarget){return;}
const enterEventInit={...runTime.position,relatedTarget:previousPT,button:options?.button||0,};if(runTime.isDragging){const enterEventInitWithDT={...enterEventInit,dataTransfer:runTime.dataTransfer};runTime.lastDragOverCancelled=false;if(isDifferentTarget){const dragEnterEvent=await _dispatch(pointerTarget,"dragenter",enterEventInitWithDT);runTime.lastDragOverCancelled=isPrevented(dragEnterEvent);}
runTime.lastDragOverCancelled||=await triggerDrag(pointerTarget,enterEventInitWithDT);}else{if(isDifferentTarget){await dispatchPointerEvent(pointerTarget,"pointerover",enterEventInit,{mouse:["mouseover"],});const enterEvents=await Promise.all(getDifferentParents(previousPT,pointerTarget).map((element)=>_dispatch(element,"pointerenter",enterEventInit)));if(!hasTouch()){await dispatchRelatedEvents(enterEvents,"mouseenter",enterEventInit);}}
await dispatchPointerEvent(pointerTarget,"pointermove",enterEventInit,{mouse:["mousemove"],touch:["touchmove"],});}}
async function _keyDown(targetResolver,eventInit,options){eventInit={...eventInit,...currentEventInit.keydown};registerSpecialKey(eventInit,true);const keyDownTarget=resolve(targetResolver);const repeat=typeof eventInit.repeat==="boolean"?eventInit.repeat:runTime.key===eventInit.key;runTime.key=eventInit.key;const keyDownEvent=await _dispatch(keyDownTarget,"keydown",{...eventInit,repeat,});if(isPrevented(keyDownEvent)){return;}
function insertValue(toInsert,type){const{selectionStart,selectionEnd,value}=inputTarget;inputData=toInsert;inputType=type;if(isNil(selectionStart)&&isNil(selectionEnd)){nextValue||=inputTarget.value;nextValue+=toInsert;}else{nextValue=value.slice(0,selectionStart)+toInsert+value.slice(selectionEnd);if(selectionStart===selectionEnd){nextSelectionStart=nextSelectionEnd=selectionStart+1;}}}
const{ctrlKey,key,shiftKey}=keyDownEvent;const inputTarget=resolve(targetResolver);let inputData=null;let inputType=null;let nextSelectionEnd=null;let nextSelectionStart=null;let nextValue=null;let triggerSelect=false;if(runTime.initialValue===null||keyDownTarget!==inputTarget){runTime.initialValue=inputTarget.value;}
if(isEditable(inputTarget)){switch(key){case"ArrowDown":case"ArrowLeft":case"ArrowUp":case"ArrowRight":{const{selectionStart,selectionEnd,value}=inputTarget;if(isNil(selectionStart)||isNil(selectionEnd)){break;}
const start=key==="ArrowLeft"||key==="ArrowUp";let selectionTarget;if(ctrlKey){selectionTarget=start?0:value.length;}else{selectionTarget=start?selectionStart-1:selectionEnd+1;}
nextSelectionStart=nextSelectionEnd=$max($min(selectionTarget,value.length),0);triggerSelect=shiftKey;break;}
case"Backspace":{const{selectionStart,selectionEnd,value}=inputTarget;if(options?.fullClear){nextValue="";}else if(isNil(selectionStart)||isNil(selectionEnd)){nextValue=value.slice(0,-1);}else if(selectionStart===selectionEnd){nextValue=value.slice(0,selectionStart-1)+value.slice(selectionEnd);}else{nextValue=deleteSelection(inputTarget);}
inputType="deleteContentBackward";break;}
case"Delete":{const{selectionStart,selectionEnd,value}=inputTarget;if(isNil(selectionStart)||isNil(selectionEnd)){nextValue=value.slice(1);}else if(selectionStart===selectionEnd){nextValue=value.slice(0,selectionStart)+value.slice(selectionEnd+1);}else{nextValue=deleteSelection(inputTarget);}
inputType="deleteContentForward";break;}
default:{if(key.length===1&&!ctrlKey){insertValue(shiftKey?key.toUpperCase():key.toLowerCase(),runTime.isComposing?"insertCompositionText":"insertText");}}}}
switch(key){case"a":{if(ctrlKey){if(isEditable(inputTarget)){nextSelectionStart=0;nextSelectionEnd=inputTarget.value.length;triggerSelect=true;}else{const selection=globalThis.getSelection();const range=$createRange();range.selectNodeContents(inputTarget);selection.removeAllRanges();selection.addRange(range);}}
break;}
case"c":{if(ctrlKey){const text=globalThis.getSelection().toString();globalThis.navigator.clipboard.writeText(text).catch();runTime.clipboardData=createDataTransfer(eventInit);await _dispatch(inputTarget,"copy",{clipboardData:runTime.clipboardData});}
break;}
case"Enter":{if(runTime.changeTarget){await triggerChange();}
if(inputTarget.tagName==="TEXTAREA"&&isEditable(inputTarget)){insertValue("\n","insertLineBreak");}
const tag=getTag(inputTarget);const parentForm=inputTarget.closest("form");if(parentForm&&inputTarget.type!=="button"){await _dispatch(parentForm,"submit");}else if(!keyDownEvent.repeat&&(tag==="a"||tag==="button"||(tag==="input"&&inputTarget.type==="button"))){await _dispatch(inputTarget,"click",{button:btn.LEFT});}
break;}
case"Escape":{runTime.dataTransfer=null;runTime.isDragging=false;break;}
case"Tab":{const next=shiftKey?getPreviousFocusableElement({tabbable:true}):getNextFocusableElement({tabbable:true});if(next){await triggerFocus(next);}
break;}
case"v":{if(ctrlKey&&isEditable(inputTarget)){try{nextValue=await globalThis.navigator.clipboard.readText();}catch{}
inputType="insertFromPaste";await _dispatch(inputTarget,"paste",{clipboardData:runTime.clipboardData||createDataTransfer(eventInit),});runTime.clipboardData=null;}
break;}
case"x":{if(ctrlKey&&isEditable(inputTarget)){const text=globalThis.getSelection().toString();globalThis.navigator.clipboard.writeText(text).catch();nextValue=deleteSelection(inputTarget);inputType="deleteByCut";runTime.clipboardData=createDataTransfer(eventInit);await _dispatch(inputTarget,"cut",{clipboardData:runTime.clipboardData});}
break;}}
if(nextValue!==null){inputTarget.value=nextValue;const inputEventInit={data:inputData,inputType,};const beforeInputEvent=await _dispatch(inputTarget,"beforeinput",inputEventInit);if(!isPrevented(beforeInputEvent)){await _dispatch(inputTarget,"input",inputEventInit);}}
changeSelection(inputTarget,nextSelectionStart,nextSelectionEnd);if(triggerSelect){await dispatchAndIgnore({target:inputTarget,events:["select"],});}}
async function _keyUp(targetResolver,eventInit){eventInit={...eventInit,...currentEventInit.keyup};await _dispatch(resolve(targetResolver),"keyup",eventInit);runTime.key=null;registerSpecialKey(eventInit,false);const finalTarget=resolve(targetResolver);if(eventInit.key===" "&&getTag(finalTarget)==="input"&&finalTarget.type==="checkbox"){await triggerClick(finalTarget,{button:btn.LEFT});}}
async function _pointerDown(options){setPointerDownTarget(runTime.pointerTarget,options);if(options?.dataTransfer||options?.files||options?.items){runTime.dataTransfer=createDataTransfer(options);}
const pointerDownTarget=runTime.pointerDownTarget;const eventInit={...runTime.position,...currentEventInit.pointerdown,button:options?.button||btn.LEFT,};registerButton(eventInit,true);if(pointerDownTarget!==runTime.previousPointerDownTarget){runTime.clickCount=0;}
runTime.touchStartPosition={...runTime.position};runTime.touchStartTimeOffset=globalThis.Date.now();const prevented=await dispatchPointerEvent(pointerDownTarget,"pointerdown",eventInit,{mouse:!pointerDownTarget.disabled&&["mousedown",{...eventInit,detail:runTime.clickCount+1},],touch:["touchstart"],});if(prevented){return;}
await triggerFocus(pointerDownTarget);if(eventInit.button===btn.LEFT&&!hasTouch()&&(pointerDownTarget.draggable||runTime.dataTransfer)){runTime.canStartDrag=true;}else if(eventInit.button===btn.RIGHT){await _dispatch(pointerDownTarget,"contextmenu",eventInit);}}
async function _pointerUp(options){const target=runTime.pointerTarget;const isLongTap=globalThis.Date.now()-runTime.touchStartTimeOffset>LONG_TAP_DELAY;const pointerDownTarget=runTime.pointerDownTarget;const pointerUpTarget=getPointerTarget(target,options);const eventInit={...runTime.position,...currentEventInit.pointerup,button:options?.button||btn.LEFT,};registerButton(eventInit,false);if(runTime.isDragging){const eventInitWithDT={...eventInit,dataTransfer:runTime.dataTransfer};runTime.dataTransfer=null;runTime.isDragging=false;if(runTime.lastDragOverCancelled){await _dispatch(pointerUpTarget,"drop",eventInitWithDT);}
await _dispatch(pointerUpTarget,"dragend",eventInitWithDT);return;}
const mouseEventInit={...eventInit,detail:runTime.clickCount+1,};await dispatchPointerEvent(pointerUpTarget,"pointerup",eventInit,{mouse:!pointerUpTarget.disabled&&["mouseup",mouseEventInit],touch:["touchend"],});const touchStartPosition=runTime.touchStartPosition;runTime.touchStartPosition={};if(hasTouch()&&(isDifferentPosition(touchStartPosition)||isLongTap)){return;}
let clickTarget;if(hasTouch()){clickTarget=pointerDownTarget===pointerUpTarget&&pointerUpTarget;}else{clickTarget=getFirstCommonParent(pointerUpTarget,pointerDownTarget);}
if(clickTarget){await triggerClick(clickTarget,mouseEventInit);if(mouseEventInit.button===btn.LEFT){runTime.clickCount++;if(!hasTouch()&&runTime.clickCount%2===0){await _dispatch(clickTarget,"dblclick",mouseEventInit);}}}
setPointerDownTarget(null,options);if(runTime.pointerDownTimeout){globalThis.clearTimeout(runTime.pointerDownTimeout);}
runTime.pointerDownTimeout=globalThis.setTimeout(()=>{runTime.clickCount=0;runTime.pointerDownTimeout=0;},DOUBLE_CLICK_DELAY);}
async function _press(targetResolver,eventInit,options){await _keyDown(targetResolver,eventInit,options);await _keyUp(targetResolver,eventInit);}
async function _select(target,value){const values=ensureArray(value,String);let found=false;for(const option of target.options){option.selected=values.includes(option.value);found||=option.selected;}
if(!value){target.selectedIndex=-1;}else if(!found){throw new HootInteractionError(`error when calling \`select()\`: no option found with value "${values.join(", ")}"`);}
await _dispatch(target,"change");}
class HootInteractionError extends Error{name="HootInteractionError";}
const btn={LEFT:0,MIDDLE:1,RIGHT:2,BACK:3,FORWARD:4,};const CAPTURE={capture:true};const DEPRECATED_EVENT_PROPERTIES={keyCode:"key",which:"key",};const DEPRECATED_EVENTS={keypress:"keydown",mousewheel:"wheel",};const DOUBLE_CLICK_DELAY=500;const GLOBAL_TRUSTED_EVENTS_CANCELERS=[["blur",cancelTrustedEvent,CAPTURE],["focus",cancelTrustedEvent,CAPTURE],["focusin",cancelTrustedEvent,CAPTURE],["focusout",cancelTrustedEvent,CAPTURE],["scroll",cancelTrustedEvent,CAPTURE],["scrollend",cancelTrustedEvent,CAPTURE],["select",cancelTrustedEvent,CAPTURE],];const GLOBAL_FILE_INPUT_REGISTERERS=[["click",registerFileInput,CAPTURE],["focus",registerFileInput,CAPTURE],];const GLOBAL_SUBMIT_FORWARDERS=[["submit",redirectSubmit]];const KEY_ALIASES={alt:"Alt",arrowdown:"ArrowDown",arrowleft:"ArrowLeft",arrowright:"ArrowRight",arrowup:"ArrowUp",backspace:"Backspace",control:"Control",delete:"Delete",enter:"Enter",escape:"Escape",meta:"Meta",shift:"Shift",tab:"Tab",caps:"Shift",cmd:"Meta",command:"Meta",ctrl:"Control",del:"Delete",down:"ArrowDown",esc:"Escape",left:"ArrowLeft",right:"ArrowRight",space:" ",up:"ArrowUp",win:"Meta",};const LONG_TAP_DELAY=500;const currentEvents=$create(null);const currentEventInit=$create(null);const currentEventTypes=[];let allowLogs=false;const runTime=getDefaultRunTimeValue();const BUBBLES=0b1;const CANCELABLE=0b10;const VIEW=0b100;function mapEvent(eventInit){return eventInit;}
function mapMouseEvent(eventInit){return{button:-1,buttons:runTime.buttons,clientX:eventInit.clientX??eventInit.pageX??eventInit.screenX??0,clientY:eventInit.clientY??eventInit.pageY??eventInit.screenY??0,...runTime.modifierKeys,...eventInit,};}
function mapPointerEvent(eventInit){return{...mapMouseEvent(eventInit),button:btn.LEFT,isPrimary:eventInit?.btn?eventInit.btn===btn.LEFT:true,pointerId:1,pointerType:hasTouch()?"touch":"mouse",...eventInit,};}
function mapWheelEvent(eventInit){return{...mapMouseEvent(eventInit),button:btn.LEFT,...eventInit,};}
function mapTouchEvent(eventInit){const touches=eventInit.targetTouches||eventInit.touches||[new Touch({identifier:0,...eventInit})];return{...eventInit,changedTouches:eventInit.changedTouches||touches,target:eventInit.target,targetTouches:eventInit.targetTouches||touches,touches:eventInit.touches||(eventInit.type==="touchend"?[]:touches),};}
function mapInputEvent(eventInit){return{data:null,isComposing:!!runTime.isComposing,...eventInit,};}
function mapKeyboardEvent(eventInit){return{isComposing:!!runTime.isComposing,...runTime.modifierKeys,...eventInit,};}
__exports.check=check;async function check(target,options){const finalizeEvents=setupEvents("check",options);const element=queryAny(await target,options);if(!isCheckable(element)){throw new HootInteractionError(`cannot call \`check()\`: target should be a checkbox or radio input`);}
const checkTarget=getTag(element)==="label"?element.control:element;if(!checkTarget.checked){await _hover(element,options,{implicit:true,originalTarget:target});await _click(options);if(!checkTarget.checked){throw new HootInteractionError(`error when calling \`check()\`: target is not checked after interaction`);}}
return finalizeEvents();}
__exports.cleanupEvents=cleanupEvents;function cleanupEvents(){if(runTime.pointerDownTimeout){globalThis.clearTimeout(runTime.pointerDownTimeout);}
removeChangeTargetListeners();$assign(runTime,getDefaultRunTimeValue());}
__exports.clear=clear;async function clear(options){const finalizeEvents=setupEvents("clear",options);const activeElement=getActiveElement();if(!hasTagName(activeElement,"select")&&!isEditable(activeElement)){throw new HootInteractionError(`cannot call \`clear()\`: target should be editable or a <select> element`);}
if(isEditable(activeElement)){await _clear(getActiveElement,options);}else{await _select(activeElement,"");}
return finalizeEvents();}
__exports.click=click;async function click(target,options){const finalizeEvents=setupEvents("click",options);const element=queryAny(await target,options);await _hover(element,options,{implicit:true,originalTarget:target});await _click(options);return finalizeEvents();}
__exports.dblclick=dblclick;async function dblclick(target,options){const finalizeEvents=setupEvents("dblclick",options);const element=queryAny(await target,options);options={...options,button:btn.LEFT};await _hover(element,options,{implicit:true,originalTarget:target});await _click(options);await _click(options);return finalizeEvents();}
__exports.dispatch=dispatch;async function dispatch(target,type,eventInit){const finalizeEvents=setupEvents("dispatch");if(!isEventTarget(target)){throw new HootInteractionError(`cannot dispatch "${type}" event: expected target to be an 'EventTarget', got: ${target}`);}
if(type in DEPRECATED_EVENTS){throw new HootInteractionError(`cannot dispatch "${type}" event: this event type is deprecated, use "${DEPRECATED_EVENTS[type]}" instead`);}
if(type!==type.toLowerCase()){throw new HootInteractionError(`cannot dispatch "${type}" event: this event type is either non-standard or deprecated`);}
await _dispatch(target,type,eventInit);return finalizeEvents();}
__exports.drag=drag;async function drag(target,options){function expectIsDragging(fn,endDrag){return{async[fn.name](...args){if(dragEndReason){throw new HootInteractionError(`cannot execute drag helper \`${fn.name}\`: drag sequence has been ended by \`${dragEndReason}\``);}
const result=await fn(...args);if(endDrag){dragEndReason=fn.name;}
return result;},}[fn.name];}
const cancel=expectIsDragging(async function cancel(options){const finalizeEvents=setupEvents("drag & drop: cancel",options);const bodyElement=getDocument(runTime.pointerTarget).body;runTime.buttons=0;await _press(bodyElement,{key:"Escape"});dragEvents.push(...finalizeEvents());return dragEvents;},true);const drop=expectIsDragging(async function drop(to,options){if(to){await moveTo(to,options);if(isDictionary(to)){options=to;}}
const finalizeEvents=setupEvents("drag & drop: drop",options);await _pointerUp(options);dragEvents.push(...finalizeEvents());return dragEvents;},true);const moveTo=expectIsDragging(async function moveTo(to,options){if(isDictionary(to)){[to,options]=[null,to];}
const finalizeEvents=setupEvents("drag & drop: move",options);const nextElement=to?queryAny(await to,options):runTime.pointerTarget;await _hover(nextElement,options,{originalTarget:to});dragEvents.push(...finalizeEvents());return dragHelpers;},false);const finalizeEvents=setupEvents("drag & drop: start",options);const dragHelpers={cancel,drop,moveTo};const dragStartTarget=queryAny(await target,options);let dragEndReason=null;await _hover(dragStartTarget,options,{implicit:true,originalTarget:target});await _pointerDown(options);const dragEvents=finalizeEvents();return dragHelpers;}
__exports.edit=edit;async function edit(value,options){const finalizeEvents=setupEvents("edit",options);const activeElement=getActiveElement();if(!isEditable(activeElement)){throw new HootInteractionError(`cannot call \`edit()\`: target should be editable`);}
if(getNodeValue(activeElement)){await _clear(getActiveElement);}
await _fill(getActiveElement,value,options);return finalizeEvents();}
__exports.enableEventLogs=enableEventLogs;function enableEventLogs(toggle){allowLogs=toggle??true;}
__exports.fill=fill;async function fill(value,options){const finalizeEvents=setupEvents("fill",options);if(!isEditable(getActiveElement())){throw new HootInteractionError(`cannot call \`fill()\`: target should be editable`);}
await _fill(getActiveElement,value,options);return finalizeEvents();}
__exports.hover=hover;async function hover(target,options){const finalizeEvents=setupEvents("hover",options);const element=queryAny(await target,options);await _hover(element,options,{originalTarget:target});return finalizeEvents();}
__exports.keyDown=keyDown;async function keyDown(keyStrokes,options){const finalizeEvents=setupEvents("keyDown",options);const eventInits=parseKeyStrokes(keyStrokes,options);for(const eventInit of eventInits){await _keyDown(getActiveElement,eventInit);}
return finalizeEvents();}
__exports.keyUp=keyUp;async function keyUp(keyStrokes,options){const finalizeEvents=setupEvents("keyUp",options);const eventInits=parseKeyStrokes(keyStrokes,options);for(const eventInit of eventInits){await _keyUp(getActiveElement,eventInit);}
return finalizeEvents();}
__exports.leave=leave;async function leave(options){const finalizeEvents=setupEvents("leave",options);await _hover(null,options,{originalTarget:window});return finalizeEvents();}
__exports.middleClick=middleClick;async function middleClick(target,options){const finalizeEvents=setupEvents("middleClick",options);const element=queryAny(await target,options);options={...options,button:btn.MIDDLE};await _hover(element,options,{implicit:true,originalTarget:target});await _click(options);return finalizeEvents();}
__exports.on=on;function on(target,type,listener,options){const targets=isEventTarget(target)?[target]:queryAll(target);if(!targets.length){throw new HootInteractionError(`expected at least 1 event target, got none`);}
for(const eventTarget of targets){eventTarget.addEventListener(type,listener,options);}
return function off(){for(const eventTarget of targets){eventTarget.removeEventListener(type,listener,options);}};}
__exports.pointerDown=pointerDown;async function pointerDown(target,options){const finalizeEvents=setupEvents("pointerDown",options);const element=queryAny(await target,options);await _hover(element,options,{implicit:true,originalTarget:target});await _pointerDown(options);return finalizeEvents();}
__exports.pointerUp=pointerUp;async function pointerUp(target,options){const finalizeEvents=setupEvents("pointerUp",options);const element=queryAny(await target,options);await _hover(element,options,{implicit:true,originalTarget:target});await _pointerUp(options);return finalizeEvents();}
__exports.press=press;async function press(keyStrokes,options){const finalizeEvents=setupEvents("press",options);const eventInits=parseKeyStrokes(keyStrokes,options);for(const eventInit of eventInits){await _keyDown(getActiveElement,eventInit);}
for(const eventInit of eventInits.reverse()){await _keyUp(getActiveElement,eventInit);}
return finalizeEvents();}
__exports.resize=resize;async function resize(dimensions,options){const finalizeEvents=setupEvents("resize",options);const[width,height]=parseDimensions(dimensions);setDimensions(width,height);await _dispatch(getWindow(),"resize");return finalizeEvents();}
__exports.rightClick=rightClick;async function rightClick(target,options){const finalizeEvents=setupEvents("rightClick",options);const element=queryAny(await target,options);options={...options,button:btn.RIGHT};await _hover(element,options,{implicit:true,originalTarget:target});await _click(options);return finalizeEvents();}
__exports.scroll=scroll;async function scroll(target,position,options){const finalizeEvents=setupEvents("scroll",options);let[x,y]=parsePosition(position);options={initiator:"wheel",scrollable:x&&y?"both":x?"x":y?"y":true,...options,};const{force,initiator,relative}=options;const scrollTopOptions={};const element=queryAny(await target,options);if(relative){x+=element.scrollLeft;y+=element.scrollTop;}
if(!$isNaN(x)){const targetX=force?x:constrainScrollX(element,x);if(targetX!==element.scrollLeft){scrollTopOptions.left=targetX;}}
if(!$isNaN(y)){const targetY=force?y:constrainScrollY(element,y);if(targetY!==element.scrollTop){scrollTopOptions.top=targetY;}}
const keys=[];if(initiator==="keyboard"){if(x<element.scrollLeft){keys.push("ArrowRight");}else if(x>element.scrollLeft){keys.push("ArrowLeft");}
if(y<element.scrollTop){keys.push("ArrowDown");}else if(y>element.scrollTop){keys.push("ArrowUp");}
await Promise.all(keys.map((key)=>_keyDown(key)));}else if(!hasTouch()&&initiator==="wheel"){const wheelEventInit={};if(!$isNaN(x)){wheelEventInit.deltaX=x-element.scrollLeft;}
if(!$isNaN(y)){wheelEventInit.deltaY=y-element.scrollTop;}
await _dispatch(element,"wheel",wheelEventInit);}
if(force||$values(scrollTopOptions).length){await dispatchAndIgnore({target:element,events:["scroll","scrollend"],callback:()=>element.scrollTo(scrollTopOptions),});}
if(initiator==="keyboard"){await Promise.all(keys.map((key)=>_keyUp(key)));}
return finalizeEvents();}
__exports.select=select;async function select(value,options){const finalizeEvents=setupEvents("select",options);const manualTarget=options?.target;const element=manualTarget?queryAny(await manualTarget):getActiveElement();if(!hasTagName(element,"select")){throw new HootInteractionError(`cannot call \`select()\`: target should be a <select> element`);}
if(manualTarget){await _hover(element,null,{implicit:true,originalTarget:manualTarget});await _pointerDown();}
await _select(element,value);if(manualTarget){await _pointerUp();}
return finalizeEvents();}
__exports.setInputFiles=setInputFiles;async function setInputFiles(files,options){if(!runTime.fileInput){throw new HootInteractionError(`cannot call \`setInputFiles()\`: no file input has been interacted with`);}
const finalizeEvents=setupEvents("setInputFiles",options);await _fill(runTime.fileInput,files,options);runTime.fileInput=null;return finalizeEvents();}
__exports.setInputRange=setInputRange;async function setInputRange(target,value,options){const finalizeEvents=setupEvents("setInputRange",options);const element=queryAny(await target,options);await _hover(element,options,{implicit:true,originalTarget:target});await _pointerDown(options);await _fill(element,value,options);await _pointerUp(options);return finalizeEvents();}
__exports.setupEventActions=setupEventActions;function setupEventActions(target,options){const eventHandlers=[];if(!options?.allowTrustedEvents){eventHandlers.push(...GLOBAL_TRUSTED_EVENTS_CANCELERS);}
if(!options?.noFileInputRegistration){eventHandlers.push(...GLOBAL_FILE_INPUT_REGISTERERS);}
if(!options?.allowSubmit){eventHandlers.push(...GLOBAL_SUBMIT_FORWARDERS);}
const view=getWindow(target);for(const[eventType,handler,options]of eventHandlers){view.addEventListener(eventType,handler,options);}
return function cleanupEventActions(){for(const[eventType,handler,options]of eventHandlers){view.removeEventListener(eventType,handler,options);}};}
__exports.uncheck=uncheck;async function uncheck(target,options){const finalizeEvents=setupEvents("uncheck",options);const element=queryAny(await target,options);if(!isCheckable(element)){throw new HootInteractionError(`cannot call \`uncheck()\`: target should be a checkbox or radio input`);}
const checkTarget=getTag(element)==="label"?element.control:element;if(checkTarget.checked){await _hover(element,options,{implicit:true,originalTarget:target});await _click(options);if(checkTarget.checked){throw new HootInteractionError(`error when calling \`uncheck()\`: target is still checked after interaction`);}}
return finalizeEvents();}
__exports.unload=unload;async function unload(options){const finalizeEvents=setupEvents("unload",options);await _dispatch(getWindow(),"beforeunload");return finalizeEvents();}
const EventList=__exports.EventList=class EventList extends Array{constructor(...args){super(...args.flat());}
get(predicate){return this.getAll(predicate)[0]||null;}
getAll(predicate){if(typeof predicate!=="function"){const type=predicate;predicate=function isSameType(ev){return ev.type===type;};}
return this.filter(predicate);}}
return __exports;});;

/* /web/static/lib/hoot-dom/helpers/time.js */
odoo.define('@web/../lib/hoot-dom/helpers/time',['@web/../lib/hoot-dom/hoot_dom_utils'],function(require){'use strict';let __exports={};const{isInstanceOf}=require("@web/../lib/hoot-dom/hoot_dom_utils");const{cancelAnimationFrame,clearInterval,clearTimeout,Error,Math:{ceil:$ceil,floor:$floor,max:$max,min:$min},Number,performance,Promise,requestAnimationFrame,setInterval,setTimeout,}=globalThis;const $performanceNow=performance.now.bind(performance);function animationToId(id){return ID_PREFIX.animation+String(id);}
function getNextTimerValues(){let timerValues=null;for(const[internalId,[callback,init,delay]]of timers.entries()){const timeout=init+delay;if(!timerValues||timeout<timerValues[0]){timerValues=[timeout,callback,internalId];}}
return timerValues;}
function idToAnimation(id){return Number(id.slice(ID_PREFIX.animation.length));}
function idToInterval(id){return Number(id.slice(ID_PREFIX.interval.length));}
function idToTimeout(id){return Number(id.slice(ID_PREFIX.timeout.length));}
function intervalToId(id){return ID_PREFIX.interval+String(id);}
function parseNat(value){return $max($floor(Number(value)),0)||0;}
function now(){return(frozen?0:$performanceNow())+timeOffset;}
function timeoutToId(id){return ID_PREFIX.timeout+String(id);}
class HootTimingError extends Error{name="HootTimingError";}
const ID_PREFIX={animation:"a_",interval:"i_",timeout:"t_",};const timers=new Map();let allowTimers=false;let frozen=false;let frameDelay=1000/60;let nextDummyId=1;let timeOffset=0;__exports.advanceFrame=advanceFrame;function advanceFrame(frameCount,options){return advanceTime(frameDelay*parseNat(frameCount),options);}
__exports.advanceTime=advanceTime;async function advanceTime(ms,options){ms=parseNat(ms);if(options?.blockTimers){allowTimers=false;}
const targetTime=now()+ms;let remaining=ms;let timerValues;while((timerValues=getNextTimerValues())&&timerValues[0]<=targetTime){const[timeout,handler,id]=timerValues;const diff=timeout-now();if(diff>0){timeOffset+=$min(remaining,diff);remaining=$max(remaining-diff,0);}
if(timers.has(id)){handler(timeout);}}
if(remaining>0){timeOffset+=remaining;}
if(options?.animationFrame??true){await animationFrame();}
allowTimers=true;return ms;}
__exports.animationFrame=animationFrame;function animationFrame(){return new Promise((resolve)=>requestAnimationFrame(()=>setTimeout(resolve)));}
__exports.cancelAllTimers=cancelAllTimers;function cancelAllTimers(){for(const id of timers.keys()){if(id.startsWith(ID_PREFIX.animation)){globalThis.cancelAnimationFrame(idToAnimation(id));}else if(id.startsWith(ID_PREFIX.interval)){globalThis.clearInterval(idToInterval(id));}else if(id.startsWith(ID_PREFIX.timeout)){globalThis.clearTimeout(idToTimeout(id));}}}
__exports.cleanupTime=cleanupTime;function cleanupTime(){allowTimers=false;frozen=false;cancelAllTimers();return delay();}
__exports.delay=delay;function delay(duration){return new Promise((resolve)=>setTimeout(resolve,duration));}
__exports.freezeTime=freezeTime;function freezeTime(){frozen=true;}
__exports.unfreezeTime=unfreezeTime;function unfreezeTime(){frozen=false;}
__exports.getTimeOffset=getTimeOffset;function getTimeOffset(){return timeOffset;}
__exports.isTimeFrozen=isTimeFrozen;function isTimeFrozen(){return frozen;}
__exports.microTick=microTick;function microTick(){return new Promise(queueMicrotask);}
__exports.mockedCancelAnimationFrame=mockedCancelAnimationFrame;function mockedCancelAnimationFrame(handle){if(!frozen){cancelAnimationFrame(handle);}
timers.delete(animationToId(handle));}
__exports.mockedClearInterval=mockedClearInterval;function mockedClearInterval(intervalId){if(!frozen){clearInterval(intervalId);}
timers.delete(intervalToId(intervalId));}
__exports.mockedClearTimeout=mockedClearTimeout;function mockedClearTimeout(timeoutId){if(!frozen){clearTimeout(timeoutId);}
timers.delete(timeoutToId(timeoutId));}
__exports.mockedRequestAnimationFrame=mockedRequestAnimationFrame;function mockedRequestAnimationFrame(callback){if(!allowTimers){return 0;}
function handler(){mockedCancelAnimationFrame(handle);return callback(now());}
const animationValues=[handler,now(),frameDelay];const handle=frozen?nextDummyId++:requestAnimationFrame(handler);const internalId=animationToId(handle);timers.set(internalId,animationValues);return handle;}
__exports.mockedSetInterval=mockedSetInterval;function mockedSetInterval(callback,ms,...args){if(!allowTimers){return 0;}
ms=parseNat(ms);function handler(){if(allowTimers){intervalValues[1]=$max(now(),intervalValues[1]+ms);}else{mockedClearInterval(intervalId);}
return callback(...args);}
const intervalValues=[handler,now(),ms];const intervalId=frozen?nextDummyId++:setInterval(handler,ms);const internalId=intervalToId(intervalId);timers.set(internalId,intervalValues);return intervalId;}
__exports.mockedSetTimeout=mockedSetTimeout;function mockedSetTimeout(callback,ms,...args){if(!allowTimers){return 0;}
ms=parseNat(ms);function handler(){mockedClearTimeout(timeoutId);return callback(...args);}
const timeoutValues=[handler,now(),ms];const timeoutId=frozen?nextDummyId++:setTimeout(handler,ms);const internalId=timeoutToId(timeoutId);timers.set(internalId,timeoutValues);return timeoutId;}
__exports.resetTimeOffset=resetTimeOffset;function resetTimeOffset(){timeOffset=0;}
__exports.runAllTimers=runAllTimers;function runAllTimers(options){if(!timers.size){return 0;}
const endts=$max(...[...timers.values()].map(([,init,delay])=>init+delay));return advanceTime($ceil(endts-now()),options);}
__exports.setFrameRate=setFrameRate;function setFrameRate(frameRate){frameRate=parseNat(frameRate);if(frameRate<1||frameRate>1000){throw new HootTimingError("frame rate must be an number between 1 and 1000");}
frameDelay=1000/frameRate;}
__exports.setupTime=setupTime;function setupTime(){allowTimers=true;}
__exports.tick=tick;function tick(){return delay();}
__exports.waitUntil=waitUntil;async function waitUntil(predicate,options){await Promise.resolve();const result=predicate(false);if(result){return result;}
const timeout=$floor(options?.timeout??200);const maxFrameCount=$ceil(timeout/frameDelay);let frameCount=0;let handle;return new Promise((resolve,reject)=>{function runCheck(){const isLast=++frameCount>=maxFrameCount;const result=predicate(isLast);if(result){resolve(result);}else if(!isLast){handle=requestAnimationFrame(runCheck);}else{let message=options?.message||`'waitUntil' timed out after %timeout% milliseconds`;if(typeof message==="function"){message=message();}
if(isInstanceOf(message,Error)){reject(message);}else{reject(new HootTimingError(message.replace("%timeout%",String(timeout))));}}}
handle=requestAnimationFrame(runCheck);}).finally(()=>{cancelAnimationFrame(handle);});}
const Deferred=__exports.Deferred=class Deferred extends Promise{_resolve;_reject;constructor(executor){let _resolve,_reject;super(function deferredResolver(resolve,reject){_resolve=resolve;_reject=reject;executor?.(_resolve,_reject);});this._resolve=_resolve;this._reject=_reject;}
async reject(reason){return this._reject(reason);}
async resolve(value){return this._resolve(value);}}
return __exports;});;

/* /web/static/lib/hoot-dom/hoot-dom.js */
odoo.define('@web/../lib/hoot-dom/hoot-dom',['@web/../lib/hoot-dom/helpers/dom','@web/../lib/hoot-dom/helpers/events','@web/../lib/hoot-dom/helpers/time','@web/../lib/hoot-dom/hoot_dom_utils'],function(require){'use strict';let __exports={};const dom=require("@web/../lib/hoot-dom/helpers/dom");const events=require("@web/../lib/hoot-dom/helpers/events");const time=require("@web/../lib/hoot-dom/helpers/time");const{interactor}=require("@web/../lib/hoot-dom/hoot_dom_utils");{const{formatXml,getActiveElement,getFocusableElements,getNextFocusableElement,getParentFrame,getPreviousFocusableElement,isDisplayed,isEditable,isFocusable,isInDOM,isInViewPort,isScrollable,isVisible,matches,queryAll,queryAllAttributes,queryAllProperties,queryAllRects,queryAllTexts,queryAllValues,queryAny,queryAttribute,queryFirst,queryOne,queryRect,queryText,queryValue,}=require("@web/../lib/hoot-dom/helpers/dom");Object.assign(__exports,{formatXml,getActiveElement,getFocusableElements,getNextFocusableElement,getParentFrame,getPreviousFocusableElement,isDisplayed,isEditable,isFocusable,isInDOM,isInViewPort,isScrollable,isVisible,matches,queryAll,queryAllAttributes,queryAllProperties,queryAllRects,queryAllTexts,queryAllValues,queryAny,queryAttribute,queryFirst,queryOne,queryRect,queryText,queryValue,})};{const{on}=require("@web/../lib/hoot-dom/helpers/events");Object.assign(__exports,{on})};{const{animationFrame,cancelAllTimers,Deferred,delay,freezeTime,unfreezeTime,microTick,setFrameRate,tick,waitUntil,}=require("@web/../lib/hoot-dom/helpers/time");Object.assign(__exports,{animationFrame,cancelAllTimers,Deferred,delay,freezeTime,unfreezeTime,microTick,setFrameRate,tick,waitUntil,})};const waitFor=__exports.waitFor=interactor("query",dom.waitFor);const waitForNone=__exports.waitForNone=interactor("query",dom.waitForNone);const check=__exports.check=interactor("interaction",events.check);const clear=__exports.clear=interactor("interaction",events.clear);const click=__exports.click=interactor("interaction",events.click);const dblclick=__exports.dblclick=interactor("interaction",events.dblclick);const drag=__exports.drag=interactor("interaction",events.drag);const edit=__exports.edit=interactor("interaction",events.edit);const fill=__exports.fill=interactor("interaction",events.fill);const hover=__exports.hover=interactor("interaction",events.hover);const keyDown=__exports.keyDown=interactor("interaction",events.keyDown);const keyUp=__exports.keyUp=interactor("interaction",events.keyUp);const leave=__exports.leave=interactor("interaction",events.leave);const manuallyDispatchProgrammaticEvent=__exports.manuallyDispatchProgrammaticEvent=interactor("interaction",events.dispatch);const middleClick=__exports.middleClick=interactor("interaction",events.middleClick);const pointerDown=__exports.pointerDown=interactor("interaction",events.pointerDown);const pointerUp=__exports.pointerUp=interactor("interaction",events.pointerUp);const press=__exports.press=interactor("interaction",events.press);const resize=__exports.resize=interactor("interaction",events.resize);const rightClick=__exports.rightClick=interactor("interaction",events.rightClick);const scroll=__exports.scroll=interactor("interaction",events.scroll);const select=__exports.select=interactor("interaction",events.select);const setInputFiles=__exports.setInputFiles=interactor("interaction",events.setInputFiles);const setInputRange=__exports.setInputRange=interactor("interaction",events.setInputRange);const uncheck=__exports.uncheck=interactor("interaction",events.uncheck);const unload=__exports.unload=interactor("interaction",events.unload);const advanceFrame=__exports.advanceFrame=interactor("time",time.advanceFrame);const advanceTime=__exports.advanceTime=interactor("time",time.advanceTime);const runAllTimers=__exports.runAllTimers=interactor("time",time.runAllTimers);{const{exposeHelpers}=require("@web/../lib/hoot-dom/hoot_dom_utils");Object.assign(__exports,{exposeHelpers})};return __exports;});odoo.define(`@odoo/hoot-dom`,['@web/../lib/hoot-dom/hoot-dom'],function(require){return require('@web/../lib/hoot-dom/hoot-dom');});;

/* /web/static/lib/hoot-dom/hoot_dom_utils.js */
odoo.define('@web/../lib/hoot-dom/hoot_dom_utils',[],function(require){'use strict';let __exports={};const{Array:{isArray:$isArray},matchMedia,navigator:{userAgent:$userAgent},Object:{assign:$assign,getPrototypeOf:$getPrototypeOf},RegExp,SyntaxError,}=globalThis;const $toString=Object.prototype.toString;function makeInteractorFn(type,fn,name,alias){return{[alias||name](...args){const result=fn(...args);if(isPromise(result)){for(let i=0;i<args.length;i++){if(isPromise(args[i])){args[i].then((result)=>(args[i]=result));}}
return result.then((promiseResult)=>dispatchInteraction(type,name,alias,args,promiseResult));}else{return dispatchInteraction(type,name,alias,args,result);}},}[alias||name];}
function polyfillIsError(value){return $toString.call(value)==="[object Error]";}
const GRAYS={100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",};const COLORS={default:{black:"#000000",white:"#ffffff","gray-100":GRAYS[100],"gray-200":GRAYS[200],"gray-300":GRAYS[300],"gray-400":GRAYS[400],"gray-500":GRAYS[500],"gray-600":GRAYS[600],"gray-700":GRAYS[700],"gray-800":GRAYS[800],"gray-900":GRAYS[900],},light:{primary:"#714b67",secondary:"#74b4b9",amber:"#f59e0b","amber-900":"#fef3c7",blue:"#3b82f6","blue-900":"#dbeafe",cyan:"#0891b2","cyan-900":"#e0f2fe",emerald:"#047857","emerald-900":"#ecfdf5",gray:GRAYS[400],lime:"#84cc16","lime-900":"#f7fee7",orange:"#ea580c","orange-900":"#ffedd5",purple:"#581c87","purple-900":"#f3e8ff",rose:"#9f1239","rose-900":"#fecdd3",bg:GRAYS[100],text:GRAYS[900],"status-bg":GRAYS[300],"link-text-hover":"var(--primary)","btn-bg":"#714b67","btn-bg-hover":"#624159","btn-text":"#ffffff","bg-result":"rgba(255, 255, 255, 0.6)","border-result":GRAYS[300],"border-search":"#d8dadd","shadow-opacity":0.1,"bg-report":"#ffffff","text-report":"#202124","border-report":"#f0f0f0","bg-report-error":"#fff0f0","text-report-error":"#ff0000","border-report-error":"#ffd6d6","text-report-number":"#1a1aa6","text-report-string":"#c80000","text-report-key":"#881280","text-report-html-tag":"#881280","text-report-html-id":"#1a1aa8","text-report-html-class":"#994500",},dark:{primary:"#14b8a6",amber:"#fbbf24","amber-900":"#422006",blue:"#60a5fa","blue-900":"#172554",cyan:"#22d3ee","cyan-900":"#083344",emerald:"#34d399","emerald-900":"#064e3b",gray:GRAYS[500],lime:"#bef264","lime-900":"#365314",orange:"#fb923c","orange-900":"#431407",purple:"#a855f7","purple-900":"#3b0764",rose:"#fb7185","rose-900":"#4c0519",bg:GRAYS[900],text:GRAYS[100],"status-bg":GRAYS[700],"btn-bg":"#00dac5","btn-bg-hover":"#00c1ae","btn-text":"#000000","bg-result":"rgba(0, 0, 0, 0.5)","border-result":GRAYS[600],"border-search":"#3c3f4c","shadow-opacity":0.4,"bg-report":"#202124","text-report":"#e8eaed","border-report":"#3a3a3a","bg-report-error":"#290000","text-report-error":"#ff8080","border-report-error":"#5c0000","text-report-number":"#9980ff","text-report-string":"#f28b54","text-report-key":"#5db0d7","text-report-html-tag":"#5db0d7","text-report-html-id":"#f29364","text-report-html-class":"#9bbbdc",},};const DEBUG_NAMESPACE="hoot";const isError=typeof Error.isError==="function"?Error.isError:polyfillIsError;const interactionBus=new EventTarget();const preferredColorScheme=matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";__exports.addInteractionListener=addInteractionListener;function addInteractionListener(types,callback){for(const type of types){interactionBus.addEventListener(type,callback);}
return function removeInteractionListener(){for(const type of types){interactionBus.removeEventListener(type,callback);}};}
__exports.dispatchInteraction=dispatchInteraction;function dispatchInteraction(type,name,alias,args,returnValue){interactionBus.dispatchEvent(new CustomEvent(type,{detail:[name,alias,args,returnValue],}));return returnValue;}
__exports.exposeHelpers=exposeHelpers;function exposeHelpers(...helpers){let nameSpaceIndex=1;let nameSpace=DEBUG_NAMESPACE;while(nameSpace in globalThis){nameSpace=`${DEBUG_NAMESPACE}${nameSpaceIndex++}`;}
globalThis[nameSpace]=new HootDebugHelpers(...helpers);return nameSpace;}
__exports.getAllColors=getAllColors;function getAllColors(scheme){return scheme?COLORS[scheme]:COLORS;}
__exports.getColorHex=getColorHex;function getColorHex(varName){return COLORS[preferredColorScheme][varName];}
__exports.getPreferredColorScheme=getPreferredColorScheme;function getPreferredColorScheme(){return preferredColorScheme;}
__exports.getTag=getTag;function getTag(node){return node?.nodeName?.toLowerCase()||"";}
__exports.interactor=interactor;function interactor(type,fn){return $assign(makeInteractorFn(type,fn,fn.name),{as(alias){return makeInteractorFn(type,fn,fn.name,alias);},get silent(){return fn;},});}
__exports.isFirefox=isFirefox;function isFirefox(){return/firefox/i.test($userAgent);}
Array.isArray;__exports.isPromise=isPromise;function isPromise(instance){return instance&&typeof instance.then==="function";}
__exports.isInstanceOf=isInstanceOf;function isInstanceOf(instance,...classes){if(!classes.length){return instance instanceof classes[0];}
if(!instance||Object(instance)!==instance){return false;}
for(const cls of classes){if(instance instanceof cls){return true;}
const targetName=cls.name;if(!targetName){return false;}
if(targetName==="Array"){return $isArray(instance);}
if(targetName==="Error"){return isError(instance);}
if($toString.call(instance)===`[object ${targetName}]`){return true;}
let{constructor}=instance;while(constructor){if(constructor.name===targetName){return true;}
constructor=$getPrototypeOf(constructor);}}
return false;}
__exports.isIterable=isIterable;function isIterable(object){return!!(object&&typeof object==="object"&&object[Symbol.iterator]);}
__exports.parseRegExp=parseRegExp;function parseRegExp(value,options){const regexParams=value.match(R_REGEX);if(regexParams){const unified=regexParams[1].replace(R_WHITE_SPACE,"\\s+");const flag=regexParams[2];try{return new RegExp(unified,flag);}catch(error){if(isInstanceOf(error,SyntaxError)&&options?.safe){return value;}else{throw error;}}}
return value;}
__exports.toSelector=toSelector;function toSelector(node,options){const tagName=getTag(node);const id=node.id?`#${node.id}`:"";const classNames=node.classList?[...node.classList].map((className)=>`.${className}`):[];if(options?.raw){return{tagName,id,classNames};}else{return[tagName,id,...classNames].join("");}}
const HootDebugHelpers=__exports.HootDebugHelpers=class HootDebugHelpers{constructor(...helpers){$assign(this,...helpers);}}
const REGEX_MARKER=__exports.REGEX_MARKER="/";const R_REGEX=__exports.R_REGEX=new RegExp(`^${REGEX_MARKER}(.*)${REGEX_MARKER}([dgimsuvy]+)?$`);const R_WHITE_SPACE=__exports.R_WHITE_SPACE=/\s+/g;return __exports;});;

/* /web_tour/static/src/js/tour_step.js */
odoo.define('@web_tour/js/tour_step',['@web/session','@web/core/ui/ui_service','@odoo/hoot-dom','@web/core/utils/objects'],function(require){'use strict';let __exports={};const{session}=require("@web/session");const{utils}=require("@web/core/ui/ui_service");const hoot=require("@odoo/hoot-dom");const{pick}=require("@web/core/utils/objects");const TourStep=__exports.TourStep=class TourStep{constructor(data,tour){Object.assign(this,data);this.tour=tour;}
get active(){this.checkHasTour();const mode=this.tour.mode;const isSmall=utils.isSmall();const standardKeyWords=["enterprise","community","mobile","desktop","auto","manual"];const isActiveArray=Array.isArray(this.isActive)?this.isActive:[];if(isActiveArray.length===0){return true;}
const selectors=isActiveArray.filter((key)=>!standardKeyWords.includes(key));if(selectors.length){for(const selector of selectors){const el=hoot.queryFirst(selector);if(!el){return false;}}}
const checkMode=isActiveArray.includes(mode)||(!isActiveArray.includes("manual")&&!isActiveArray.includes("auto"));const edition=(session.server_version_info||"").at(-1)==="e"?"enterprise":"community";const checkEdition=isActiveArray.includes(edition)||(!isActiveArray.includes("enterprise")&&!isActiveArray.includes("community"));const onlyForMobile=isActiveArray.includes("mobile")&&isSmall;const onlyForDesktop=isActiveArray.includes("desktop")&&!isSmall;const checkDevice=onlyForMobile||onlyForDesktop||(!isActiveArray.includes("mobile")&&!isActiveArray.includes("desktop"));return checkEdition&&checkDevice&&checkMode;}
checkHasTour(){if(!this.tour){throw new Error(`TourStep instance must have a tour`);}}
get describeMe(){this.checkHasTour();return(`[${this.index + 1}/${this.tour.steps.length}] Tour ${this.tour.name} → Step `+
(this.content?`${this.content} (trigger: ${this.trigger})`:this.trigger));}
get stringify(){return(JSON.stringify(pick(this,"isActive","content","trigger","run","tooltipPosition","timeout","expectUnloadPage"),(_key,value)=>{if(typeof value==="function"){return"[function]";}else{return value;}},2)+",");}}
return __exports;});;

/* /web_tour/static/src/js/tour_automatic/tour_automatic.js */
odoo.define('@web_tour/js/tour_automatic/tour_automatic',['@odoo/hoot-dom','@web/../lib/hoot-dom/helpers/events','@web/core/browser/browser','@web/core/macro','@web/core/transition','@web_tour/js/tour_automatic/tour_step_automatic','@web_tour/js/tour_state'],function(require){'use strict';let __exports={};const hootDom=require("@odoo/hoot-dom");const{enableEventLogs,setupEventActions}=require("@web/../lib/hoot-dom/helpers/events");const{browser}=require("@web/core/browser/browser");const{Macro}=require("@web/core/macro");const{config:transitionConfig}=require("@web/core/transition");const{TourStepAutomatic}=require("@web_tour/js/tour_automatic/tour_step_automatic");const{tourState}=require("@web_tour/js/tour_state");const TourAutomatic=__exports.TourAutomatic=class TourAutomatic{mode="auto";allowUnload=true;constructor(data){Object.assign(this,data);this.steps=this.steps.map((step,index)=>new TourStepAutomatic(step,this,index));this.config=tourState.getCurrentConfig()||{};}
get currentIndex(){return tourState.getCurrentIndex();}
get currentStep(){return this.steps[this.currentIndex];}
get debugMode(){return this.config.debug!==false;}
start(){setupEventActions(document.createElement("div"),{allowSubmit:true});enableEventLogs(this.debugMode);const{delayToCheckUndeterminisms,stepDelay}=this.config;const macroSteps=this.steps.filter((step)=>step.index>=this.currentIndex).flatMap((step)=>[{action:async()=>{if(this.debugMode){console.groupCollapsed(step.describeMe);console.log(step.stringify);if(stepDelay>0){await hootDom.delay(stepDelay);}
if(step.break){debugger;}}else{console.log(step.describeMe);}},},{trigger:step.trigger?()=>step.findTrigger():null,timeout:step.pause&&this.debugMode?9999999:step.timeout||this.timeout||10000,action:async(trigger)=>{if(delayToCheckUndeterminisms>0){await step.checkForUndeterminisms(trigger,delayToCheckUndeterminisms);}
this.allowUnload=false;if(!step.skipped&&step.expectUnloadPage){this.allowUnload=true;setTimeout(()=>{const message=`
                                    The key { expectUnloadPage } is defined but page has not been unloaded within 20000 ms.
                                    You probably don't need it.
                                `.replace(/^\s+/gm,"");this.throwError(message);},20000);}
await step.doAction();if(this.debugMode){console.log(trigger);if(step.skipped){console.log("This step has been skipped");}else{console.log("This step has run successfully");}
console.groupEnd();if(step.pause){await this.pause();}}
tourState.setCurrentIndex(step.index+1);if(this.allowUnload){return"StopTheMacro!";}},},]);const end=()=>{delete window[hootNameSpace];transitionConfig.disabled=false;tourState.clear();window.addEventListener("error",(ev)=>{ev.preventDefault();ev.stopImmediatePropagation();},true);window.addEventListener("unhandledrejection",(ev)=>{ev.preventDefault();ev.stopImmediatePropagation();},true);};this.macro=new Macro({name:this.name,steps:macroSteps,onError:({error})=>{if(error.type==="Timeout"){this.throwError(...this.currentStep.describeWhyIFailed,error.message);}else{this.throwError(error.message);}
end();},onComplete:()=>{browser.console.log("tour succeeded");const succeeded=`║ TOUR ${this.name} SUCCEEDED ║`;const msg=[succeeded];msg.unshift("╔"+"═".repeat(succeeded.length-2)+"╗");msg.push("╚"+"═".repeat(succeeded.length-2)+"╝");browser.console.log(`\n\n${msg.join("\n")}\n`);end();},});const beforeUnloadHandler=()=>{if(!this.allowUnload){const message=`
                    Be sure to use { expectUnloadPage: true } for any step
                    that involves firing a beforeUnload event.
                    This avoid a non-deterministic behavior by explicitly stopping
                    the tour that might continue before the page is unloaded.
                `.replace(/^\s+/gm,"");this.throwError(message);}};window.addEventListener("beforeunload",beforeUnloadHandler);if(this.debugMode&&this.currentIndex===0){debugger;}
transitionConfig.disabled=true;const hootNameSpace=hootDom.exposeHelpers(hootDom);console.debug(`Hoot DOM helpers available from \`window.${hootNameSpace}\``);this.macro.start();}
get describeWhereIFailed(){const offset=3;const start=Math.max(this.currentIndex-offset,0);const end=Math.min(this.currentIndex+offset,this.steps.length-1);const result=[];for(let i=start;i<=end;i++){const step=this.steps[i];const stepString=step.stringify;const text=[stepString];if(i===this.currentIndex){const line="-".repeat(10);const failing_step=`${line} FAILED: ${step.describeMe} ${line}`;text.unshift(failing_step);text.push("-".repeat(failing_step.length));}
result.push(...text);}
return result.join("\n");}
throwError(...args){console.groupEnd();tourState.setCurrentTourOnError();browser.console.error([`FAILED: ${this.currentStep.describeMe}.`,...args].join("\n"));browser.console.dir(this.describeWhereIFailed);if(this.debugMode){debugger;}}
async pause(){const styles=["background: black; color: white; font-size: 14px","background: black; color: orange; font-size: 14px",];console.log(`%cTour is paused. Use %cplay()%c to continue.`,styles[0],styles[1],styles[0]);await new Promise((resolve)=>{window.play=()=>{resolve();delete window.play;};});}}
return __exports;});;

/* /web_tour/static/src/js/tour_automatic/tour_helpers_hoot.js */
odoo.define('@web_tour/js/tour_automatic/tour_helpers_hoot',['@odoo/hoot-dom','@web/core/utils/patch','@web_tour/js/tour_automatic/tour_helpers'],function(require){'use strict';let __exports={};const hoot=require("@odoo/hoot-dom");const{patch}=require("@web/core/utils/patch");const{TourHelpers}=require("@web_tour/js/tour_automatic/tour_helpers");patch(TourHelpers.prototype,{async check(selector){const element=this._get_action_element(selector);await hoot.check(element);},async clear(selector){const element=this._get_action_element(selector);await hoot.click(element);await hoot.clear();},async click(selector,options={interactive:false}){const element=this._get_action_element(selector);await hoot.click(element,options);},async dblclick(selector){const element=this._get_action_element(selector);await hoot.dblclick(element);},async drag_and_drop(selector,options){if(typeof options!=="object"){options={position:"top",relative:true};}
const dragEffectDelay=async()=>{await hoot.animationFrame();await hoot.delay(this.delay);};const element=this.anchor;const{drop,moveTo}=await hoot.drag(element);await dragEffectDelay();await hoot.hover(element,{position:{top:20,left:20,},relative:true,});await dragEffectDelay();const target=await hoot.waitFor(selector,{visible:true,timeout:1000,});await moveTo(target,options);await dragEffectDelay();await drop(target,options);await dragEffectDelay();},async edit(text,selector){const element=this._get_action_element(selector);await hoot.click(element);await hoot.edit(text);},async editor(text,selector){const element=this._get_action_element(selector);const InEditor=Boolean(element.closest(".odoo-editor-editable"));if(!InEditor){throw new Error("run 'editor' always on an element in an editor");}
await hoot.click(element);this._set_range(element,"start");await hoot.keyDown("_");element.textContent=text;await hoot.manuallyDispatchProgrammaticEvent(element,"input");this._set_range(element,"stop");await hoot.keyUp("_");await hoot.manuallyDispatchProgrammaticEvent(element,"change");},async fill(value,selector){const element=this._get_action_element(selector);await hoot.click(element);await hoot.fill(value);},async hover(selector,options){const element=this._get_action_element(selector);await hoot.hover(element,options);},async range(value,selector){const element=this._get_action_element(selector);await hoot.click(element);await hoot.setInputRange(element,value);},async press(...args){await hoot.press(args.flatMap((arg)=>typeof arg==="string"&&arg.split("+")));},async select(value,selector){const element=this._get_action_element(selector);await hoot.click(element);await hoot.select(value,{target:element});},async selectByIndex(index,selector){const element=this._get_action_element(selector);await hoot.click(element);const value=hoot.queryValue(`option:eq(${index})`,{root:element});if(value){await hoot.select(value,{target:element});await hoot.manuallyDispatchProgrammaticEvent(element,"input");}},async selectByLabel(contains,selector){const element=this._get_action_element(selector);await hoot.click(element);const values=hoot.queryAllValues(`option:contains(${contains})`,{root:element});await hoot.select(values,{target:element});},async uncheck(selector){const element=this._get_action_element(selector);await hoot.uncheck(element);},async goToUrl(url){const linkEl=document.createElement("a");linkEl.href=url;await hoot.click(linkEl);},async canvasNotEmpty(selector){const canvas=this._get_action_element(selector);if(canvas.tagName.toLowerCase()!=="canvas"){throw new Error(`canvasNotEmpty is only suitable for canvas elements.`);}
await hoot.waitUntil(()=>{const context=canvas.getContext("2d");const imageData=context.getImageData(0,0,canvas.width,canvas.height);const pixels=new Uint32Array(imageData.data.buffer);return pixels.some((pixel)=>pixel!==0);});},_get_action_element(selector){if(typeof selector==="string"&&selector.length){const nodes=hoot.queryAll(selector);return nodes.find(hoot.isVisible)||nodes.at(0);}else if(typeof selector==="object"&&Boolean(selector?.nodeType)){return selector;}
return this.anchor;},_set_range(element,start_or_stop){function _node_length(node){if(node.nodeType===Node.TEXT_NODE){return node.nodeValue.length;}else{return node.childNodes.length;}}
const selection=element.ownerDocument.getSelection();selection.removeAllRanges();const range=new Range();let node=element;let length=0;if(start_or_stop==="start"){while(node.firstChild){node=node.firstChild;}}else{while(node.lastChild){node=node.lastChild;}
length=_node_length(node);}
range.setStart(node,length);range.setEnd(node,length);selection.addRange(range);},queryAll(target,options){return hoot.queryAll(target,options);},queryFirst(target,options){return hoot.queryFirst(target,options);},queryOne(target,options){return hoot.queryOne(target,options);},waitFor(target,options){return hoot.waitFor(target,options);},waitUntil(predicate,options){return hoot.waitUntil(predicate,options);},animationFrame(...args){return hoot.animationFrame(...args);},});return __exports;});;

/* /web_tour/static/src/js/tour_automatic/tour_step_automatic.js */
odoo.define('@web_tour/js/tour_automatic/tour_step_automatic',['@web_tour/js/tour_state','@odoo/hoot-dom','@web_tour/js/utils/tour_utils','@web_tour/js/tour_automatic/tour_helpers','@web_tour/js/tour_step','@web/core/utils/xml','@web/core/macro'],function(require){'use strict';let __exports={};const{tourState}=require("@web_tour/js/tour_state");const hoot=require("@odoo/hoot-dom");const{serializeChanges,serializeMutation}=require("@web_tour/js/utils/tour_utils");const{TourHelpers}=require("@web_tour/js/tour_automatic/tour_helpers");const{TourStep}=require("@web_tour/js/tour_step");const{getTag}=require("@web/core/utils/xml");const{MacroMutationObserver}=require("@web/core/macro");async function waitForMutations(target=document,timeout=1000/16){return new Promise((resolve)=>{let observer;let timer;const mutationList=[];function onMutation(mutations){mutationList.push(...(mutations||[]));clearTimeout(timer);timer=setTimeout(()=>{observer.disconnect();resolve(mutationList);},timeout);}
observer=new MacroMutationObserver(onMutation);observer.observe(target);onMutation([]);});}
const TourStepAutomatic=__exports.TourStepAutomatic=class TourStepAutomatic extends TourStep{skipped=false;error="";constructor(data,tour,index){super(data,tour);this.index=index;this.tourConfig=tourState.getCurrentConfig();}
async checkForUndeterminisms(initialElement,delay){if(delay<=0||!initialElement){return;}
const tagName=initialElement.tagName?.toLowerCase();if(["body","html"].includes(tagName)||!tagName){return;}
const snapshot=initialElement.cloneNode(true);const mutations=await waitForMutations(initialElement,delay);let reason;if(!hoot.isVisible(initialElement)){reason=`Initial element is no longer visible`;}else if(!initialElement.isEqualNode(snapshot)){reason=`Initial element has changed:\n`+
JSON.stringify(serializeChanges(snapshot,initialElement),null,2);}else if(mutations.length){const changes=[...new Set(mutations.map(serializeMutation))];reason=`Initial element has mutated ${mutations.length} times:\n`+
JSON.stringify(changes,null,2);}
if(reason){throw new Error(`Potential non deterministic behavior found in ${delay}ms for trigger ${this.trigger}.\n${reason}`);}}
get describeWhyIFailed(){const errors=[];if(this.element){errors.push(`Element has been found.`);if(this.isUIBlocked){errors.push("BUT: DOM is blocked by UI.");}
if(!this.elementIsInModal){errors.push(`BUT: It is not allowed to do action on an element that's below a modal.`);}
if(!this.elementIsEnabled){errors.push(`BUT: Element is not enabled. TIP: You can use :enable to wait the element is enabled before doing action on it.`);}
if(!this.parentFrameIsReady){errors.push(`BUT: parent frame is not ready ([is-ready='false']).`);}}else{const checkElement=hoot.queryFirst(this.trigger);if(checkElement){errors.push(`Element has been found.`);errors.push(`BUT: Element is not visible. TIP: You can use :not(:visible) to force the search for an invisible element.`);}else{errors.push(`Element (${this.trigger}) has not been found.`);}}
return errors;}
async doAction(){if(this.skipped){return false;}
const actionHelper=new TourHelpers(this.element);if(typeof this.run==="function"){return await this.run.call({anchor:this.element},actionHelper);}else if(typeof this.run==="string"){let lastResult=null;for(const todo of this.run.split("&&")){const m=String(todo).trim().match(/^(?<action>\w*) *\(? *(?<arguments>.*?)\)?$/);lastResult=await actionHelper[m.groups?.action](m.groups?.arguments);}
return lastResult;}}
findTrigger(){if(!this.active){this.skipped=true;return true;}
const visible=!/:(hidden|visible)\b/.test(this.trigger);this.element=hoot.queryFirst(this.trigger,{visible});if(this.element){return!this.isUIBlocked&&this.elementIsEnabled&&this.elementIsInModal&&this.parentFrameIsReady?this.element:false;}
return false;}
get isUIBlocked(){return(document.body.classList.contains("o_ui_blocked")||document.querySelector(".o_blockUI")||document.querySelector(".o_is_blocked"));}
get parentFrameIsReady(){if(this.trigger.match(/\[is-ready=(true|false)\]/)){return true;}
const parentFrame=hoot.getParentFrame(this.element);return parentFrame&&parentFrame.contentDocument.body.hasAttribute("is-ready")?parentFrame.contentDocument.body.getAttribute("is-ready")==="true":true;}
get elementIsInModal(){if(this.hasAction){const overlays=hoot.queryFirst(".popover, .o-we-command, .o-we-toolbar, .o_notification");const modal=hoot.queryFirst(".modal:visible:not(.o_inactive_modal):last");if(modal&&!overlays&&!this.trigger.startsWith("body")){return(modal.contains(hoot.getParentFrame(this.element))||modal.contains(this.element));}}
return true;}
get elementIsEnabled(){const isTag=(array)=>array.includes(getTag(this.element,true));if(this.hasAction){if(isTag(["input","textarea"])){return hoot.isEditable(this.element);}else if(isTag(["button","select"])){return!this.element.disabled;}}
return true;}
get hasAction(){return["string","function"].includes(typeof this.run)&&!this.skipped;}}
return __exports;});;

/* /html_editor/static/tests/tours/helpers/editor.js */
odoo.define('@html_editor/../tests/tours/helpers/editor',['@web/core/utils/patch'],function(require){'use strict';let __exports={};const{patch}=require("@web/core/utils/patch");const editorsWeakMap=__exports.editorsWeakMap=new WeakMap();const editorModule=odoo.loader.modules.get("@html_editor/editor");if(editorModule){const{Editor}=editorModule;patch(Editor.prototype,{attachTo(editable){editorsWeakMap.set(editable.ownerDocument,this);return super.attachTo(...arguments);},});}
__exports.setSelection=setSelection;function setSelection({anchorNode,anchorOffset,focusNode=anchorNode,focusOffset=anchorOffset,}){const selection=anchorNode.ownerDocument.getSelection();selection.setBaseAndExtent(anchorNode,anchorOffset,focusNode,focusOffset);}
return __exports;});;

/* /mail/static/tests/tours/activity_date_format_tour.js */
odoo.define('@mail/../tests/tours/activity_date_format_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("mail_activity_date_format",{steps:()=>[{trigger:"button:contains('Activity')",run:"click",},{trigger:".o_selection_badge span:contains('To-Do')",run:"click",},{trigger:"div[name='summary'] input",run:"edit Go Party",},{trigger:"button:contains('Save')",run:"click",},{trigger:".o-mail-Activity:contains('Go Party')",run:"click",},{trigger:".o-mail-Activity-info i",run:"click",},{trigger:".o-mail-Activity-details tr:contains('Created') td:contains('01/Jan/24 09:00:00 AM')",},{trigger:".o-mail-Activity-details tr:contains('Due on') td:contains('06/Jan/24')",},],});return __exports;});;

/* /mail/static/tests/tours/create_channel_tour.js */
odoo.define('@mail/../tests/tours/create_channel_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("can_create_channel_from_form_view",{steps:()=>[{trigger:".o-mail-DiscussSidebarChannel-itemName:contains(OdooBot)",run:"click",},{trigger:".o-mail-DiscussContent-threadName[title='OdooBot']",},{trigger:"button[title='View or join channels']:not(:visible)",run:"click"},{trigger:".o_control_panel_main_buttons button:contains('New')",run:"click",},{trigger:"div[name='name'] input",run:"edit Test channel",},{trigger:".breadcrumb-item:contains('OdooBot')",run:"click",},{trigger:".o-mail-DiscussSidebarChannel-itemName:contains('Test channel')",},],});return __exports;});;

/* /mail/static/tests/tours/discuss_call_invitation_tour.js */
odoo.define('@mail/../tests/tours/discuss_call_invitation_tour',['@mail/discuss/core/common/channel_member_model','@web/core/registry','@web/../tests/helpers/utils'],function(require){'use strict';let __exports={};const{ChannelMember}=require("@mail/discuss/core/common/channel_member_model");const{registry}=require("@web/core/registry");const{patchWithCleanup}=require("@web/../tests/helpers/utils");registry.category("web_tour.tours").add("discuss_call_invitation.js",{steps:()=>{patchWithCleanup(ChannelMember,{CANCEL_CALL_INVITE_DELAY:1e6});return[{trigger:".o-discuss-CallInvitation"},{trigger:".o-mail-CallInvitation-avatar[title='View the bob (base.group_user) and john (base.group_user) channel']",},{trigger:".o-discuss-CallInvitation-channelName:contains('bob (base.group_user) and john (base.group_user)')",},{trigger:".o-discuss-CallInvitation-description:contains('Incoming call from bob (base.group_user)')",},{trigger:".o-discuss-CallInvitation-cameraPreview:not(:visible)",},{trigger:".o-discuss-CallInvitation button[title='Join Call']",},{trigger:".o-discuss-CallInvitation button[title='Reject']",},{trigger:".o-discuss-CallInvitation button[title='Show camera preview']",run:"click",},{trigger:".o-discuss-CallInvitation-cameraPreview",},{trigger:".o-discuss-CallInvitation-cameraPreview button[title='Turn camera on']",},{trigger:".o-discuss-CallInvitation-cameraPreview button[title='Unmute']",},{trigger:".o-discuss-CallInvitation-cameraPreview button[title='Video Settings']",run:"click",},{trigger:"label:contains('Blur background')",},{trigger:".o-discuss-CallInvitation button[title='Hide camera preview']",run:"click",},{trigger:".o-discuss-CallInvitation-cameraPreview:not(:visible)",},];},});return __exports;});;

/* /mail/static/tests/tours/discuss_channel_as_guest_tour.js */
odoo.define('@mail/../tests/tours/discuss_channel_as_guest_tour',['@web/core/registry','@web/../tests/utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{contains}=require("@web/../tests/utils");registry.category("web_tour.tours").add("discuss_channel_as_guest_tour.js",{steps:()=>[{content:"Channel secret token has been hidden on welcome page",trigger:".o-mail-WelcomePage",run(){if(!window.location.pathname.startsWith("/discuss/channel")){console.error("Channel secret token is still present in URL.");}},},{content:"Click join",trigger:"button[title='Join Channel']",run:"click",},{content:"Check that we are on not in a call",trigger:"button[name='call']",},{content:"Check that we are on channel page",trigger:".o-mail-Thread",run:"press ctrl+k",},{trigger:".o_command_palette_search input",run:"fill @",},{trigger:".o-mail-DiscussCommand",async run(){await contains(".fa-hashtag",{parent:[".o-mail-DiscussCommand",{text:"Test channel"}],});await contains(".fa-user",{count:0});},},],});return __exports;});;

/* /mail/static/tests/tours/discuss_channel_call_action.js */
odoo.define('@mail/../tests/tours/discuss_channel_call_action',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("discuss_channel_call_action.js",{steps:()=>[{content:"Check that the call has started",trigger:".o-discuss-Call",},{content:"Check that current user is in call ('disconnect' button visible)",trigger:"button[title='Disconnect']",},],});return __exports;});;

/* /mail/static/tests/tours/discuss_channel_call_public_tour.js */
odoo.define('@mail/../tests/tours/discuss_channel_call_public_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("discuss_channel_call_public_tour.js",{steps:()=>[{content:"The call does not start on the welcome page",trigger:".o-mail-WelcomePage",async run(){await new Promise((r)=>setTimeout(r,250));const rtcService=odoo.__WOWL_DEBUG__.root.env.services["discuss.rtc"];if(rtcService?.selfSession||rtcService?.state.hasPendingRequest){console.error("The call should not have started.");}},},{content:"Click join",trigger:"button[title='Join Channel']",run:"click",},{content:"Check that the call has started",trigger:".o-discuss-Call",},{content:"Check that current user is in call ('disconnect' button visible)",trigger:"button[title='Disconnect']",},],});return __exports;});;

/* /mail/static/tests/tours/discuss_channel_meeting_view_tour.js */
odoo.define('@mail/../tests/tours/discuss_channel_meeting_view_tour',['@web/core/browser/browser','@web/core/registry','@web/../tests/utils'],function(require){'use strict';let __exports={};const{browser}=require("@web/core/browser/browser");const{registry}=require("@web/core/registry");const{dragenterFiles}=require("@web/../tests/utils");function getMeetingViewTourSteps({inWelcomePage=false}={}){const steps=[{trigger:".o-mail-Meeting"},{trigger:".o-mail-Meeting [title='Invite People']",run:"click",},{trigger:".o-mail-Meeting .o-mail-ActionPanel:contains('Invite people')"},{trigger:".o-mail-Meeting [title='Invite People']",run:"click",},{trigger:".o-mail-Meeting:not(:has(.o-mail-ActionPanel))"},{trigger:".o-mail-Meeting [title='Invite People']",run:"click",},{trigger:".o-mail-Meeting .o-mail-ActionPanel:contains('Invite people')"},{trigger:".o-mail-Meeting [title='Chat']",run:"click",},{trigger:".o-mail-Meeting .o-mail-ActionPanel .o-mail-Thread:contains('john (base.group_user) and bob (base.group_user)')",},{trigger:".o-mail-Message[data-persistent]:contains('Hello everyone!')",run:"hover && click .o-mail-Message-actions button[title='Expand']",},{trigger:".o-dropdown-item:contains('Mark as Unread')",run:"click",},{trigger:".o-mail-Meeting [title='Chat']:has(.badge:contains(1))"},{trigger:".o-mail-Thread-banner span:contains('Mark as Read')",run:"click",},{trigger:".o-mail-Meeting [title='Chat']:not(:has(.badge))",async run({waitFor}){const files=[new File(["hi there"],"file2.txt",{type:"text/plain"})];await dragenterFiles(".o-mail-Meeting .o-mail-ActionPanel",files);await waitFor(".o-Dropzone",{only:true});},},{trigger:".o-mail-Meeting [title='Close panel']",run:"click",},{trigger:".o-mail-Meeting:not(:has(.o-mail-ActionPanel))"},{trigger:".o-mail-Meeting [title='Exit Fullscreen']",run:"click",},{trigger:"body:not(:has(.o-mail-Meeting))"},];if(inWelcomePage){steps.unshift({trigger:"[title='Join Channel']",run:"click"});}
return steps;}
registry.category("web_tour.tours").add("discuss.meeting_view_tour",{steps:()=>{browser.localStorage.setItem("discuss_call_preview_join_mute","true");browser.localStorage.setItem("discuss_call_preview_join_video","false");return[{trigger:".o-mail-Composer.o-focused .o-mail-Composer-input",run:"edit Hello everyone!",},{trigger:".o-mail-Composer button[title='Send']:enabled",run:"click"},...getMeetingViewTourSteps(),];},}).add("discuss.meeting_view_public_tour",{steps:()=>getMeetingViewTourSteps({inWelcomePage:true}),});return __exports;});;

/* /mail/static/tests/tours/discuss_channel_public_tour.js */
odoo.define('@mail/../tests/tours/discuss_channel_public_tour',['@odoo/owl','@web/core/registry','@web/core/utils/urls','@web/../tests/utils'],function(require){'use strict';let __exports={};const{reactive}=require("@odoo/owl");const{registry}=require("@web/core/registry");const{getOrigin}=require("@web/core/utils/urls");const{click,inputFiles}=require("@web/../tests/utils");const messageSelector=".o-mail-Message:has(.o-mail-Message-body:contains('cheese'))";const editedMessageSelector=".o-mail-Message:has(.o-mail-Message-body:contains('vegetables'))";registry.category("web_tour.tours").add("discuss_channel_public_tour.js",{steps:()=>[{trigger:".o-mail-Discuss",},{trigger:".o-mail-Thread",run(){if(!window.location.pathname.startsWith("/discuss/channel")){console.error("Channel secret token is still present in URL.");}
const errors=odoo.loader.findErrors();if(Object.keys(errors).length){console.error("Couldn't load all JS modules.",errors);}
document.body.classList.add("o_discuss_channel_public_modules_loaded");if(!document.title.includes(document.querySelector(".o-mail-DiscussContent-threadName")?.value)){console.error(`Tab title should match conversation name. Got "${
                            document.title
                        }" instead of "${
                            document.querySelector(".o-mail-DiscussContent-threadName")?.value
                        }".`);}},},{trigger:".o_discuss_channel_public_modules_loaded",},{trigger:".o-mail-Composer-input",run:"edit cheese",},{trigger:".o-mail-Composer button[title='More Actions']",run:"click"},{trigger:".o-discuss-dropdownMenu"},{trigger:".dropdown-item:contains('Attach Files')",async run(){const text=new File(["hello, world"],"text.txt",{type:"text/plain"});await inputFiles(".o-mail-Composer .o_input_file",[text]);},},{trigger:".o-mail-AttachmentContainer:not(.o-isUploading):contains(text.txt)",},{trigger:".dropdown-item:contains('Attach Files')",async run(){await inputFiles(".o-mail-Composer .o_input_file",[new File([await(await fetch("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIW2P4v5ThPwAG7wKklwQ/bwAAAABJRU5ErkJggg==")).blob(),],"image.png",{type:"image/png"}),]);},},{trigger:'.o-mail-AttachmentContainer:not(.o-isUploading)[title="image.png"]',async run({waitFor}){const store=odoo.__WOWL_DEBUG__.root.env.services["mail.store"];if(store.self_guest){const src=this.anchor.querySelector("img").src;const attachment=store["ir.attachment"].get((src.match("/web/image/([0-9]+)")||[]).at(-1));if(!attachment){throw new Error(`Attachment was not found from src: ${src}`);}
if(!attachment.raw_access_token){await new Promise((resolve)=>{const proxy=reactive(attachment,()=>{if(attachment.raw_access_token){resolve();}else{void proxy.raw_access_token;}});void proxy.raw_access_token;});}
await waitFor(`.o-mail-AttachmentContainer[title="image.png"] img[src="${getOrigin()}/web/image/${
                            attachment.id
                        }?access_token=${attachment.raw_access_token}&filename=image.png&unique=${
                            attachment.checksum
                        }"]`);}},},{trigger:".o-mail-Composer-input",run:"click"},{trigger:"body:not(:has(.o-discuss-dropdownMenu))"},{trigger:".o-mail-Composer button[title='Send']:enabled",run:"click"},{trigger:`${messageSelector}[data-persistent]`,},{trigger:`${messageSelector} .o-mail-AttachmentContainer:contains("text.txt")`,},{trigger:messageSelector,run:`hover && click ${messageSelector} [title='Add a Reaction']`,},{trigger:".o-mail-QuickReactionMenu",run:()=>click("[title='Toggle Emoji Picker']"),},{trigger:".o-EmojiPicker .o-Emoji:contains('🙂')",run:"click",},{trigger:`${messageSelector} .o-mail-MessageReaction:contains('🙂')`,run:"click",},{trigger:`${messageSelector}:not(:has(.o-mail-MessageReaction:contains('🙂')))`,},{trigger:`${messageSelector}`,run:`hover && click ${messageSelector} [title='Expand']`,},{trigger:`.o-mail-Message-moreMenu [title='Edit'], ${messageSelector} [title='Edit']`,run:"click",},{trigger:".o-mail-Message .o-mail-Composer-input",run:"edit vegetables",},{trigger:".o-mail-Message .o-mail-Composer button[title='More Actions']",run:"click",},{trigger:".dropdown-item:contains('Attach Files')",async run(){const extratxt=new File(["hello 2"],"extra.txt",{type:"text/plain"});await inputFiles(".o-mail-Message .o_input_file",[extratxt]);},},{trigger:".o-mail-Message .o-mail-Composer .o-mail-AttachmentContainer:not(.o-isUploading):contains(extra.txt)",},{trigger:".o-mail-Message button:contains(save)",run:"click",},{trigger:editedMessageSelector,},{trigger:`${editedMessageSelector} .o-mail-AttachmentContainer:contains("text.txt")`,},{trigger:`${editedMessageSelector} .o-mail-AttachmentContainer:contains("extra.txt")`,},{trigger:`${editedMessageSelector} .o-mail-AttachmentContainer:contains("extra.txt") .o-mail-Attachment-unlink`,run:"click",},{trigger:".modal:contains(Confirmation) .btn:contains(Ok)",run:"click",},{trigger:`${editedMessageSelector}:not(:has(.o-mail-AttachmentContainer:contains("extra.txt")))`,},{trigger:"button[title='Search Messages']",run:"click",},{trigger:".o_searchview_input",run:"edit text.txt",},{trigger:"button[aria-label='Search button']",run:"click",},{trigger:`.o-mail-SearchMessagesPanel ${editedMessageSelector} .o-mail-AttachmentContainer:contains("text.txt")`,},],});return __exports;});;

/* /mail/static/tests/tours/discuss_configuration_tour.js */
odoo.define('@mail/../tests/tours/discuss_configuration_tour',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add("discuss_configuration_tour",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="mail.menu_root_discuss"]',run:"click",},{trigger:".o_main_navbar button:contains('Configuration')",run:"click",},{trigger:".dropdown-menu a:contains('Notification')",run:"click",},{trigger:"button:contains('All Messages')",run:"click",},{trigger:"button:contains('Mentions Only')",run:"click",},{trigger:"button:contains('Nothing')",run:"click",},{trigger:".modal-header button[aria-label='Close']",run:"click",},{trigger:".o_main_navbar button:contains('Configuration')",run:"click",},{trigger:".dropdown-menu a:contains('Voice & Video')",run:"click",},{trigger:"select[name='inputDevice']",},{trigger:"button:contains('Voice Detection')",run:"click",},{trigger:"span:contains('Voice detection sensitivity')",},{trigger:"button:contains('Push to Talk')",run:"click",},{trigger:"label:contains('Push-to-talk key')",},{trigger:"label:contains('Delay after releasing push-to-talk')",},{trigger:"input[aria-label='Show video participants only']",},{trigger:"input[aria-label='Blur video background']",run:"click",},{trigger:"label:contains('Background blur intensity')",},{trigger:"label:contains('Edge blur intensity')",},],});return __exports;});;

/* /mail/static/tests/tours/discuss_go_back_to_thread_from_breadcrumbs_tour.js */
odoo.define('@mail/../tests/tours/discuss_go_back_to_thread_from_breadcrumbs_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("discuss_go_back_to_thread_from_breadcrumbs.js",{steps:()=>[{trigger:".o-mail-DiscussContent-threadName[title='Inbox']"},{trigger:".o-mail-DiscussSidebar-item:text('Starred messages')",run:"click"},{trigger:".o-mail-DiscussContent-threadName[title='Starred messages']"},{trigger:"button[title='View or join channels']:not(:visible)",run:"click"},{trigger:".o_last_breadcrumb_item:text('Public Channels')"},{trigger:".breadcrumb-item:text('Starred messages')",run:"click"},{trigger:".o-mail-DiscussContent-threadName[title='Starred messages']"},],});return __exports;});;

/* /mail/static/tests/tours/discuss_invite_by_email_tour.js */
odoo.define('@mail/../tests/tours/discuss_invite_by_email_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("discuss.invite_by_email",{steps:()=>[{trigger:".o-discuss-ChannelMemberList"},{trigger:"button[title='Invite People']",run:"click",},{trigger:".o-discuss-ChannelInvitation-search[placeholder='Invite people or email']",run:"edit john@test.com",},{trigger:".o-discuss-ChannelInvitation-selectable:contains('john (base.group_user)')",async run({waitFor,click}){await waitFor(".o-discuss-ChannelInvitation-selectable",{only:true,timeout:5000,});await click();},},{trigger:".o-discuss-ChannelInvitation-selectedList :contains('john (base.group_user)')",},{trigger:".o-discuss-ChannelInvitation-search",run:"edit unknown_email@test.com",},{trigger:".o-discuss-ChannelInvitation-selectable:contains('unknown_email@test.com')",run:"click",},{trigger:".o-discuss-ChannelInvitation-selectedList :contains('unknown_email@test.com')",},{trigger:"button:contains(Invite to Group Chat)",run:"click",},{trigger:"body:not(:has(.o-mail-ActionPanel))",},],});return __exports;});;

/* /mail/static/tests/tours/discuss_mention_suggestions_group_restricted_channel.js */
odoo.define('@mail/../tests/tours/discuss_mention_suggestions_group_restricted_channel',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("discuss_mention_suggestions_group_restricted_channel.js",{steps:()=>[{trigger:".o-mail-DiscussContent-threadName[title='R&D Channel']"},{trigger:".o-mail-Composer-input",run:"edit @"},{trigger:".o-mail-Composer-suggestion:count(3)"},{content:"Suggest channel member not in R&D group",trigger:".o-mail-Composer-suggestion strong:text(Consultant User)",},{content:"Suggest non-channel member in R&D group",trigger:".o-mail-Composer-suggestion strong:text(Dev User)",},],});return __exports;});;

/* /mail/static/tests/tours/discuss_sidebar_in_public_page_tour.js */
odoo.define('@mail/../tests/tours/discuss_sidebar_in_public_page_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("sidebar_in_public_page_tour",{steps:()=>[{trigger:".o-mail-DiscussContent-header [title='Channel 1']",},{trigger:".o-mail-DiscussSidebarChannel:contains(Channel 1).o-active",},{trigger:".o-mail-DiscussSidebarChannel:contains(Channel 2)",run:"click",},{trigger:".o-mail-DiscussContent-header [title='Channel 2']",},{trigger:".o-mail-DiscussSidebarChannel:contains(Channel 2).o-active",run(){history.back();},},{trigger:".o-mail-DiscussContent-header [title='Channel 1']",},{trigger:".o-mail-DiscussSidebarChannel:contains(Channel 1).o-active",run(){history.forward();},},{trigger:".o-mail-DiscussContent-header [title='Channel 2']",},{trigger:".o-mail-DiscussSidebarChannel:contains(Channel 2).o-active",},{content:"Open channel actions",trigger:".o-mail-DiscussSidebarChannel:contains(Channel 2).o-active",run:"hover && click [title='Channel Actions']",},{trigger:".o-dropdown-item:contains('Invite People')",run:"click",},],});return __exports;});;

/* /mail/static/tests/tours/discuss_sub_channel_search_tour.js */
odoo.define('@mail/../tests/tours/discuss_sub_channel_search_tour',['@mail/discuss/core/public_web/sub_channel_list','@odoo/owl','@web/core/registry','@web/core/utils/concurrency','@web/core/utils/patch','@web/core/utils/reactive','@web/../tests/utils'],function(require){'use strict';let __exports={};const{SubChannelList}=require("@mail/discuss/core/public_web/sub_channel_list");const{status}=require("@odoo/owl");const{registry}=require("@web/core/registry");const{Deferred}=require("@web/core/utils/concurrency");const{patch}=require("@web/core/utils/patch");const{effect}=require("@web/core/utils/reactive");const{contains,dragenterFiles,dropFiles,scroll}=require("@web/../tests/utils");let waitForLoadMoreToDisappearDef;registry.category("web_tour.tours").add("test_discuss_sub_channel_search",{steps:()=>[{trigger:"body",run(){patch(SubChannelList.prototype,{setup(){super.setup(...arguments);effect((state)=>{if(status(this)==="destroyed"){return;}
if(!state.isVisible){waitForLoadMoreToDisappearDef?.resolve();}},[this.loadMoreState]);},});},},{trigger:"button[title='Threads']",run:"click",},{trigger:".o-mail-SubChannelList",async run(){for(let i=99;i>69;i--){await contains(".o-mail-SubChannelPreview",{text:`Sub Channel ${i}`,});await contains(".o-mail-SubChannelPreview",{count:30});}},},{trigger:".o-mail-ActionPanel:has(.o-mail-SubChannelList) .o_searchview_input",run:"edit Sub Channel 10",},{trigger:".o-mail-ActionPanel:has(.o-mail-SubChannelList) button[aria-label='Search button']",run:"click",},{trigger:".o-mail-SubChannelPreview:contains(Sub Channel 10)",async run(){await contains(".o-mail-SubChannelPreview",{count:1});waitForLoadMoreToDisappearDef=new Deferred();},},{trigger:".o_searchview_input",run:"clear",},{trigger:".o-mail-SubChannelPreview:contains(Sub Channel 99)",async run(){await contains(".o-mail-SubChannelPreview",{count:31});for(let i=99;i>69;i--){await contains(".o-mail-SubChannelPreview",{text:`Sub Channel ${i}`,});}
await contains(".o-mail-SubChannelPreview",{text:`Sub Channel 10`});await waitForLoadMoreToDisappearDef;waitForLoadMoreToDisappearDef=new Deferred();await scroll(".o-mail-ActionPanel:has(.o-mail-SubChannelList)","bottom");},},{trigger:".o-mail-SubChannelPreview:contains(Sub Channel 40)",async run(){await contains(".o-mail-SubChannelPreview",{count:61});for(let i=99;i>39;i--){await contains(".o-mail-SubChannelPreview",{text:`Sub Channel ${i}`,});}
await waitForLoadMoreToDisappearDef;waitForLoadMoreToDisappearDef=new Deferred();await scroll(".o-mail-ActionPanel:has(.o-mail-SubChannelList)","bottom");},},{trigger:".o-mail-SubChannelPreview:contains(Sub Channel 11)",async run(){await contains(".o-mail-SubChannelPreview",{count:90});for(let i=99;i>9;i--){await contains(".o-mail-SubChannelPreview",{text:`Sub Channel ${i}`,});}
await waitForLoadMoreToDisappearDef;await scroll(".o-mail-ActionPanel:has(.o-mail-SubChannelList)","bottom");},},{trigger:".o-mail-SubChannelPreview:contains(Sub Channel 0)",async run(){await contains(".o-mail-SubChannelPreview",{count:100});for(let i=99;i>0;i--){await contains(".o-mail-SubChannelPreview",{text:`Sub Channel ${i}`,});}},},],});registry.category("web_tour.tours").add("create_thread_for_attachment_without_body",{steps:()=>[{content:"Open general channel",trigger:'.o-mail-DiscussSidebarChannel-itemName:contains("general")',run:"click",},{content:"Drop a file",trigger:".o-mail-DiscussContent-main",async run(){const files=[new File(["hi there"],"file2.txt",{type:"text/plain"})];await dragenterFiles(".o-mail-DiscussContent-main",files);await dropFiles(".o-Dropzone",files);},},{trigger:'.o-mail-AttachmentContainer:not(.o-isUploading):contains("file2.txt")',},{content:"Click on send button",trigger:".o-mail-Composer-mainActions [title='Send']:enabled",run:"click",},{content:"Hover on attachment",trigger:'.o-mail-Message:not(:has(.o-mail-Message-pendingProgress)) .o-mail-AttachmentContainer:contains("file2.txt")',run:"hover",},{content:"Click on expand button",trigger:'.o-mail-Message [title="Expand"]',run:"click",},{content:"Create a new thread",trigger:'.o-dropdown-item:contains("Create Thread")',run:"click",},{content:"Check a new thread is created",trigger:'.o-mail-Discuss:contains("New Thread")',},],});return __exports;});;

/* /mail/static/tests/tours/mail_activity_schedule_from_chatter.js */
odoo.define('@mail/../tests/tours/mail_activity_schedule_from_chatter',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("mail_activity_schedule_from_chatter",{steps:()=>[{trigger:"button:contains('Activity')",run:"click",},{trigger:".o_selection_badge span:contains('Call')",run:"click",},{trigger:".o_selection_badge.active span:contains('Call')",},{trigger:".o_selection_badge span:contains('To-Do')",run:"click",},{trigger:"div[name='summary'] input",run:"edit Play Mario Party",},{trigger:"button:contains('Save')",run:"click",},{trigger:".o-mail-Activity:contains('Play Mario Party')",run:"click",},{trigger:"button:contains('Activity')",run:"click",},{trigger:"div[name='summary'] input",run:"edit Play Mario Kart",},{trigger:"button.btn.btn-secondary:contains('Mark Done')",run:"click",},{trigger:".o-mail-Message:contains('Play Mario Kart')",},],});return __exports;});;

/* /mail/static/tests/tours/mail_composer_autosave_tour.js */
odoo.define('@mail/../tests/tours/mail_composer_autosave_tour',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add("mail/static/tests/tours/mail_composer_autosave_tour.js",{steps:()=>[{content:"Edit the function field",trigger:".o_field_widget[name='function'] > .o_input",run:"edit Director",},{trigger:".o_form_sheet_bg",run:"click",},{content:"Click on Send Message",trigger:".o-mail-Chatter-sendMessage",run:"click",},{content:"Open the full composer",trigger:"[name='open-full-composer']",run:"click",},{content:"Edit the body",trigger:".o-wysiwyg div[contenteditable='true']",run:"editor Hello-- Mitchell Admin",},{content:"Click on Send Message",trigger:".o_mail_send[name='action_send_mail']",run:"click",},{content:"Check message is shown",trigger:'.o-mail-Message-body:contains("Hello")',},{trigger:".o_form_saved",},...stepUtils.toggleHomeMenu(),],});return __exports;});;

/* /mail/static/tests/tours/mail_composer_test_tour.js */
odoo.define('@mail/../tests/tours/mail_composer_test_tour',['@web/core/registry','@web/../tests/utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{contains,dragenterFiles,dropFiles,inputFiles}=require("@web/../tests/utils");registry.category("web_tour.tours").add("mail/static/tests/tours/mail_composer_test_tour.js",{steps:()=>[{content:"Wait for the chatter to be fully loaded",trigger:".o-mail-Chatter",async run(){await contains(".o-mail-Message",{count:1});},},{content:"Click on Send Message",trigger:"button:contains(Send message)",run:"click",},{content:"Write something in composer",trigger:".o-mail-Composer-input",run:"edit blahblah @Not && click body",},{content:"Mention a partner",trigger:".o-mail-Composer-suggestion:contains(Not A Demo User)",run:"click",},{content:"Add one file in composer",trigger:".o-mail-Composer button[title='Attach Files']",async run(){const files=[new File(["hello, world"],"file1.txt",{type:"text/plain"})];await inputFiles(".o-mail-Composer .o_input_file",files);},},{trigger:'.o-mail-AttachmentContainer:not(.o-isUploading):contains("file1.txt")',},{content:"Open full composer",trigger:"button[title='Open Full Composer']",run:"click",},{content:"Check composer keeps open after pushing Escape",trigger:".o_mail_composer_form_view",run:"press Escape",},{content:"Check the earlier provided attachment is listed",trigger:".o_field_mail_composer_attachment_list a:contains(file1.txt)",},{content:"Check subject is autofilled",trigger:'[name="subject"] input',run(){const subjectValue=document.querySelector('[name="subject"] input').value;if(subjectValue!=="Jane"){console.error(`Full composer should have "Jane" in subject input (actual: ${subjectValue})`);}},},{content:"Check composer content is kept and contains the user's signature",trigger:'.o_field_html[name="body"]',run(){const bodyContent=document.querySelector('.o_field_html[name="body"]').textContent;if(!bodyContent.replace(/\uFEFF/g,"").includes("blahblah @Not A Demo User")){console.error(`Full composer should contain text from small composer ("blahblah @Not A Demo User") in body input (actual: ${bodyContent})`);}
const mentionLink=document.querySelector('.o_field_html[name="body"] a').textContent;if(!mentionLink.includes("@Not A Demo User")){console.error(`Full composer should contain mention link from small composer ("@Not A Demo User") in body input)`);}
if((bodyContent.match(/--\nErnest/g)||[]).length!==1){console.error("Full composer should contain the user's signature once.");}},},{content:"Trigger channel mention with #",trigger:".odoo-editor-editable",run(){this.anchor.dispatchEvent(new InputEvent("beforeinput",{inputType:"insertText",data:"#",bubbles:true,}));},},{content:"Search for general channel",trigger:".o-mail-MentionList input",run:"edit gen",},{content:"Select channel from suggestion",trigger:".o-mail-Composer-suggestion:contains(general)",run:"click",},{content:"Check channel mention is present in body",trigger:'.o_field_html[name="body"] .o_channel_redirect:contains(general)',},{content:"Drop a file on the full composer",trigger:".o_mail_composer_form_view",async run(){const files=[new File(["hi there"],"file2.txt",{type:"text/plain"})];await dragenterFiles(".o_mail_composer_form_view .o_form_renderer",files);await dropFiles(".o-Dropzone",files);},},{content:"Check the attachment is listed",trigger:".o_field_mail_composer_attachment_list a:contains(file2.txt)",},{content:"Click on the mail template selector",trigger:".mail-composer-template-dropdown-btn",run:"click",},{content:"Check a template is listed",trigger:'.mail-composer-template-dropdown.popover .o-dropdown-item:contains("Test template")',},{content:"Verify admin template is NOT listed",trigger:".mail-composer-template-dropdown.popover",run(){const hasAdminTemplate=[...document.querySelectorAll(".o-dropdown-item")].some((item)=>item.textContent.includes("Test template for admin"));if(hasAdminTemplate){console.error("Template assigned to the admin is visible to a non-assigned user! This should not happen.");}},},{content:"Send message from full composer",trigger:".o_mail_send",run:"click",},{content:"Check message is shown",trigger:'.o-mail-Message-body:contains("blahblah @Not A Demo User")',run:"click",},{content:"Click on envelope to see recipients of message",trigger:'.o-mail-Message:has(.o-mail-Message-body:contains("blahblah @Not A Demo User")) .o-mail-Message-notification',run:"click",},{content:"Check message has correct recipients",trigger:".o-mail-MessageNotificationPopover:contains('Not A Demo User (NotADemoUser@mail.com) Jane (jane@example.com) Mitchell Admin (test.admin@test.example.com)')",},{content:"Check message contains the first attachment",trigger:'.o-mail-Message .o-mail-AttachmentContainer:contains("file1.txt")',},{content:"Check message contains the second attachment",trigger:'.o-mail-Message .o-mail-AttachmentContainer:contains("file2.txt")',},{content:"Click on Send Message",trigger:"button:contains(Send message)",run:"click",},{content:"Open full composer",trigger:"button[title='Open Full Composer']",run:"click",},{content:"Check that the composer contains the signature",trigger:'.o_field_html[name="body"]',run(){const bodyContent=document.querySelector('.o_field_html[name="body"]').textContent;if((bodyContent.match(/--\nErnest/g)||[]).length!==1){console.log("Full composer should contain the user's signature once.");}},},{content:"Write something in full composer",trigger:".note-editable",run:"editor keep the content",},{content:"Close full composer",trigger:".btn-close",run:"click",},{content:"Click on Send Message",trigger:"button:contains(Send message)",run:"click",},{content:"Check full composer text is kept",trigger:".o-mail-Composer button[title='Open Full Composer'].active",run({queryFirst}){if(queryFirst(".o-mail-Composer-input").value!=="keep the content"){console.error("Composer in chatter should contain full composer text after discarding.");}},},{content:"Open full composer",trigger:"button[title='Open Full Composer']",run:"click",},{content:"Check that the composer doesn't add the user's signature twice",trigger:".note-editable",run(){const bodyContent=document.querySelector('.o_field_html[name="body"]').textContent;if((bodyContent.match(/--\nErnest/g)||[]).length!==0){console.error("The composer should not contain the user's signature.");}},},{content:"Close full composer",trigger:".btn-close",run:"click",},{content:"Click on Send Message",trigger:"button:contains(Send message)",run:"click",},{content:"Continue Message Composition with Small Composer",trigger:".o_popover:contains('Continue with Full Composer?') button:contains('No (Remove formatting)')",run:"click",},{content:"Send message from chatter",trigger:".o-mail-Composer-send:enabled",run:"click",},{content:"Check message is shown",trigger:'.o-mail-Message-body:contains("keep the content")',},{content:"Click on Send Message",trigger:"button:contains(Send message)",run:"click",},{content:"Write a message",trigger:".o-mail-Composer-input",run:"edit hello world",},{content:"Send message from chatter",trigger:".o-mail-Composer-send:enabled",run:"click",},{content:"Check message is shown",trigger:'.o-mail-Message-body:contains("hello world")',},],});return __exports;});;

/* /mail/static/tests/tours/mail_html_composer_test_tour.js */
odoo.define('@mail/../tests/tours/mail_html_composer_test_tour',['@web/core/registry','@web/../tests/utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{contains}=require("@web/../tests/utils");registry.category("web_tour.tours").add("mail/static/tests/tours/mail_html_composer_test_tour.js",{steps:()=>[{content:"Wait for the chatter to be fully loaded",trigger:".o-mail-Chatter",async run(){const composerService=odoo.__WOWL_DEBUG__.root.env.services["mail.composer"];composerService.setHtmlComposer();await contains(".o-mail-Message",{count:1});},},{content:"Click on Send Message",trigger:"button:contains(Send message)",run:"click",},{content:"Write something in composer",trigger:".o-mail-Composer-html.odoo-editor-editable",run:"editor Hello",},{content:"Select the text",trigger:".o-mail-Composer-html.odoo-editor-editable",run:"dblclick",},{trigger:".o-we-toolbar",},{content:"Bold the text",trigger:".o-we-toolbar button[title='Toggle bold']",run:"click",},{content:"The bolded text is in the composer",trigger:".o-mail-Composer-html.odoo-editor-editable strong:contains(Hello)",},{content:"Open full composer",trigger:"button[title='Open Full Composer']",run:"click",},{content:"Check composer keeps the formatted content",trigger:".o_mail_composer_message strong:contains(Hello)",},{content:"Focus the text in full composer",trigger:".o_mail_composer_message .odoo-editor-editable",run:"click",},{content:"Select the text in full composer",trigger:".o_mail_composer_message .odoo-editor-editable",run:"dblclick",},{trigger:".o-we-toolbar",},{content:"Remove the Bold",trigger:".o-we-toolbar button[title='Toggle bold']",run:"click",},{content:"Italicize the text",trigger:".o-we-toolbar button[title='Toggle italic']",run:"click",},{content:"The italicized text is in the full composer",trigger:".o_mail_composer_message em:contains(Hello)",},{content:"Close full composer",trigger:".btn-close",run:"click",},{content:"Click on Send Message",trigger:"button:not(.active):contains(Send message)",run:"click",},{content:"The italicized text is in the composer",trigger:".o-mail-Composer-html.odoo-editor-editable em:contains(Hello)",},],});return __exports;});;

/* /mail/static/tests/tours/mail_message_load_order_tour.js */
odoo.define('@mail/../tests/tours/mail_message_load_order_tour',['@web/core/registry','@web/../tests/utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{contains,scroll}=require("@web/../tests/utils");registry.category("web_tour.tours").add("mail_message_load_order_tour",{steps:()=>[{trigger:".o-mail-DiscussSidebarChannel:contains(MyTestChannel)",run:"click",},{trigger:".o-mail-Thread .o-mail-Message",async run(){await contains(".o-mail-Thread .o-mail-Message",{count:30});await contains(".o-mail-Thread",{scroll:"bottom"});},},{trigger:"*[title='Pinned Messages']",run:"click",},{content:"Click on invisible jump (should hover card to be visible)",trigger:".o-mail-MessageCard-jump:not(:visible)",run:"click",},{trigger:".o-mail-Thread .o-mail-Message:first .o-mail-Message-textContent:not(:contains(31))",async run(){await contains(".o-mail-Thread .o-mail-Message",{count:31});await contains(".o-mail-Thread",{scroll:0});const messages=Array.from(document.querySelectorAll(".o-mail-Thread .o-mail-Message-content")).map((el)=>el.innerText);for(let i=0;i<31;i++){if(messages[i]!==(i+1).toString()){throw new Error("Wrong message order after loading around");}}
await scroll(".o-mail-Thread","bottom");},},{trigger:".o-mail-Thread .o-mail-Message .o-mail-Message-textContent:contains(17)",async run(){await contains(".o-mail-Thread .o-mail-Message",{count:60});const messages=Array.from(document.querySelectorAll(".o-mail-Thread .o-mail-Message-content")).map((el)=>el.innerText);for(let i=0;i<60;i++){if(messages[i]!==(i+1).toString()){throw new Error("Wrong message order after loading after");}}},},],});return __exports;});;

/* /mail/static/tests/tours/mail_template_dynamic_placeholder_tour.js */
odoo.define('@mail/../tests/tours/mail_template_dynamic_placeholder_tour',['@web/core/registry','@web_tour/tour_utils','@web/core/utils/concurrency'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");const{delay}=require("@web/core/utils/concurrency");registry.category("web_tour.tours").add("mail_template_dynamic_placeholder_tour",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),{content:'Go into the Setting "app"',trigger:'.o_app[data-menu-xmlid="base.menu_administration"]',run:"click",},{content:"Open email templates",trigger:'button[name="open_mail_templates"]',run:"click",},{content:"Create a new email template",trigger:"button.o_list_button_add",run:"click",},{content:'Insert # inside "Subject" input',trigger:'div[name="subject"] input[type="text"]',run:"edit(no_model_id #)",},{content:'Select "Contact" model',trigger:'div[name="model_id"] input[type="text"]',run:"edit Contact",},{content:"Click on contact",trigger:'div[name="model_id"] .ui-autocomplete .dropdown-item:text(Contact)',run:"click",},{content:"Wait for the drop down to disappear",trigger:'div[name="model_id"] .o-autocomplete:not(:has(.ui-autocomplete))',run:async()=>{await delay(200);},},{content:'Retry insert # inside "Subject" input',trigger:'div[name="subject"] input[type="text"]',run:"edit (yes_model_id) && press #",},{content:"Check if the dynamic placeholder popover is opened",trigger:"div.o_model_field_selector_popover",},{content:"filter the dph result",trigger:"div.o_model_field_selector_popover_search input[type='text']",run:"edit name",},{content:"Click on the first entry of the dynamic placeholder",trigger:'div.o_model_field_selector_popover button:contains("Company Name")',run:"click",},{content:"Enter a default value",trigger:'div.o_model_field_selector_popover .o_model_field_selector_default_value_input input[type="text"]',run:"edit defValue",},{content:"Click on the insert button",trigger:"div.o_model_field_selector_popover button:first-child",run:"click",},{content:"Wait for the popover to disappear",trigger:"body:not(:has(.o_model_field_selector_popover))",run:"click",},{content:"Check if subject value was correctly updated",trigger:'div[name="subject"] input[type="text"]',run(){const subjectValue=this.anchor.value;const correctValue="yes_model_id {{object.company_name|||defValue}}";if(subjectValue!==correctValue){console.error(`Email template should have "${correctValue}" in subject input (actual: ${subjectValue})`);}},},{content:"Insert text inside editable",trigger:".note-editable.odoo-editor-editable",async run(actions){await actions.editor(`/`);document.querySelector(".note-editable").dispatchEvent(new InputEvent("input",{inputType:"insertText",data:"/",}));},},{content:"Click on the the dynamic placeholder powerBox options",trigger:"div.o-we-powerbox .o-we-command:contains(Dynamic Placeholder)",run:"click",},{content:"Check if the dynamic placeholder popover is opened",trigger:"div.o_model_field_selector_popover",run:"click",},{content:"filter the dph result",trigger:"div.o_model_field_selector_popover_search input[type='text']",run:"edit name",},{content:"Click on the first entry of the dynamic placeholder",trigger:'div.o_model_field_selector_popover button:contains("Company Name")',run:"click",},{content:"Enter a default value",trigger:'div.o_model_field_selector_popover .o_model_field_selector_default_value_input input[type="text"]',run:"edit defValue",},{content:"Click on the insert button",trigger:"div.o_model_field_selector_popover button:first-child",run:"click",},{content:"Ensure the editable contain the dynamic placeholder t tag",trigger:`.note-editable.odoo-editor-editable t[t-out="object.company_name"]:contains("defValue")`,},{content:'Type "Push Notification Device" model',trigger:'div[name="model_id"] input[type="text"]',run:"edit Push Notification Device",},{content:'Select "Push Notification Device" model',trigger:'a.dropdown-item:contains("Push Notification Device")',run:"click",},{content:"Insert text inside editable",trigger:".note-editable.odoo-editor-editable",async run(actions){await actions.editor(`/`);document.querySelector(".note-editable").dispatchEvent(new InputEvent("input",{inputType:"insertText",data:"/",}));},},{content:"Click on the the dynamic placeholder powerBox options",trigger:"div.o-we-powerbox .o-we-command:contains(Dynamic Placeholder)",run:"click",},{content:"Check if the dynamic placeholder popover is opened",trigger:"div.o_model_field_selector_popover",run:"click",},{content:"filter the dph result",trigger:"div.o_model_field_selector_popover_search input[type='text']",run:"edit created on",},{content:"Click on the first entry of the dynamic placeholder",trigger:'div.o_model_field_selector_popover li:first-child button:contains("Created on")',run:"click",},{content:"Enter a default value",trigger:"div.o_model_field_selector_popover .o_model_field_selector_default_value_input input[type='text']",run:"edit localTime",},{content:"Click on the insert button",trigger:"div.o_model_field_selector_popover button:first-child:contains('Insert)",run:"click",},{content:"Ensure the editable contain the dynamic placeholder t tag",trigger:`.note-editable.odoo-editor-editable t[t-out="format_datetime(object.create_date, tz=object.partner_id.tz) or 'localTime'"]:contains("localTime")`,},{content:"Discard form changes",trigger:"button.o_form_button_cancel",run:"click",},{content:"Wait for the form view to disappear",trigger:"body:not(:has(.o_form_sheet))",},],});return __exports;});;

/* /mail/static/tests/tours/user_modify_own_profile_tour.js */
odoo.define('@mail/../tests/tours/user_modify_own_profile_tour',['@web/core/registry','@web/../tests/utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{click,contains}=require("@web/../tests/utils");registry.category("web_tour.tours").add("mail/static/tests/tours/user_modify_own_profile_tour.js",{steps:()=>[{content:"Open user account menu",trigger:".o_user_menu button",run:"click",},{content:"Open preferences / profile screen",trigger:"[data-menu=preferences]",run:"click",},{content:"Update the notification type",trigger:'.modal div[name="notification_type"] input[data-value="inbox"]',async run(){await click('.modal div[name="notification_type"] input[data-value="inbox"]');await contains(".o_form_dirty",{count:1});},},{content:"Save the form",trigger:'button[name="preference_save"]',run:"click",},{content:"Wait until the modal is closed",trigger:"body:not(.modal-open)",async run(){await contains(".o_form_dirty",{count:0});},},],});return __exports;});;

/* /portal/static/tests/tours/portal.js */
odoo.define('@portal/../tests/tours/portal',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("portal_load_homepage",{url:"/my",steps:()=>[{content:"Check portal is loaded",trigger:'a[href*="/my/account"]:contains("Edit"):first',run:"click",expectUnloadPage:true,},{content:"Load my account details",trigger:'input[value="Joel Willis"]',run:"click",},{content:"type a different phone number",trigger:'input[name="phone"]',run:"edit +1 555 666 7788",},{content:"Submit the form",trigger:"button[id=save_address]",run:"click",expectUnloadPage:true,},{content:"Check that we are back on the portal",trigger:'a[href*="/my/account"]:contains("Edit"):first',},],});return __exports;});;

/* /portal/static/tests/tours/skip_to_content.js */
odoo.define('@portal/../tests/tours/skip_to_content',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("skip_to_content",{url:"/",steps:()=>[{content:"Make sure that Skip to Content button is on top of all the links present in header",trigger:"a:first-child[class~='o_skip_to_content']",run:"click"},{content:"Check if we have been redirected to #wrap",trigger:"body",run:()=>{if(!window.location.href.endsWith("#wrap")){console.error("We should be on #wrap.");}}}]});return __exports;});;

/* /account/static/tests/tours/account_product_catalog_tests.js */
odoo.define('@account/../tests/tours/account_product_catalog_tests',['@account/js/tours/tour_utils','@web/core/registry'],function(require){'use strict';let __exports={};const{addSectionFromProductCatalog,showProductColumn}=require("@account/js/tours/tour_utils");const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("test_use_product_catalog_on_invoice",{steps:()=>[{content:"Click Catalog Button",trigger:"button[name=action_add_from_catalog]",run:"click",},{content:"Add a Product",trigger:".o_kanban_record:contains(Test Product)",run:function(){setTimeout(()=>{[...document.querySelectorAll('.o_kanban_record')].find(el=>el.textContent.includes('Test Product'))?.click();},1000);},},{content:"Wait for it",trigger:".o_product_added",},{content:"Back to Invoice",trigger:".o-kanban-button-back",run:"click",},...showProductColumn(),{content:"Ensure product is added",trigger:".o_field_product_label_section_and_note_cell:contains(Test Product)",},],});registry.category("web_tour.tours").add('test_add_section_from_product_catalog_on_invoice',{steps:()=>addSectionFromProductCatalog()});return __exports;});;

/* /account/static/tests/tours/deductible_amount_column.js */
odoo.define('@account/../tests/tours/deductible_amount_column',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require('@web/core/registry');const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add("deductible_amount_column",{url:"/odoo/vendor-bills/new",steps:()=>[{content:"Add item",trigger:"div[name='invoice_line_ids'] .o_field_x2many_list_row_add a:contains('Add a line')",run:"click",},{content:"Edit name",trigger:".o_field_widget[name='name'] .o_input",run:"edit Laptop"},{content:"Edit deductible amount",trigger:".o_field_widget[name='deductible_amount'] > .o_input",run:"edit 80"},{content:"Set Bill Date",trigger:"input[data-field=invoice_date]",run:"edit 2025-12-01",},...stepUtils.saveForm(),]})
return __exports;});;

/* /account/static/tests/tours/tax_group_tests.js */
odoo.define('@account/../tests/tours/tax_group_tests',['@account/js/tours/account','@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{accountTourSteps}=require("@account/js/tours/account");const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add('account_tax_group',{url:"/odoo",steps:()=>[...accountTourSteps.goToAccountMenu("Go to Invoicing"),{content:"Go to Vendors",trigger:'span:contains("Vendors")',run:"click",},{content:"Go to Bills",trigger:'a:contains("Bills")',run:"click",},{trigger:".o_breadcrumb .text-truncate:contains(Bills)",},{content:"Create new bill",trigger:'.o_control_panel_main_buttons .o_list_button_add',run:"click",},{content:"Add vendor",trigger:'div.o_field_widget.o_field_res_partner_many2one[name="partner_id"] div input',run:"edit Account Tax Group Partner",},{content:"Valid vendor",trigger:'.ui-menu-item a:contains("Account Tax Group Partner")',run:"click",},{content:"Open line fields list",trigger:".o_optional_columns_dropdown_toggle",run:"click"},{content:"Show product column",trigger:'.o-dropdown-item input[name="product_id"]',run:"click"},{content:"Close line fields list",trigger:".o_optional_columns_dropdown_toggle",run:"click"},{content:"Add items",trigger:'div[name="invoice_line_ids"] .o_field_x2many_list_row_add a:contains("Add a line")',run:"click",},{content:"Select input",trigger:'div[name="invoice_line_ids"] .o_selected_row .o_list_many2one[name="product_id"] input',run:"edit Account Tax Group Product",},{content:"Valid item",trigger:'.ui-menu-item-wrapper:contains("Account Tax Group Product")',run:"click",},{content:"Set Bill Date",trigger:"input[data-field=invoice_date]",run:"edit 2025-12-01",},...stepUtils.saveForm(),{content:"Edit tax group amount",trigger:'.o_tax_group_edit',run:"click",},{content:"Modify the input value",trigger:'.o_tax_group_edit_input input',run(){this.anchor.value=200;this.anchor.select();this.anchor.blur();},},{content:"Valid total amount",trigger:'span[name="amount_total"]:contains("800")',run:"click",},{content:"Select item quantity",trigger:'div[name="invoice_line_ids"] tbody tr.o_data_row .o_list_number[name="quantity"]',run:"click",},{content:"Change item quantity",trigger:'div[name="invoice_line_ids"] tbody tr.o_data_row .o_list_number[name="quantity"] input',run:"edit 2",},{content:"Valid the new value",trigger:'div[name="invoice_line_ids"] tbody tr.o_data_row .o_list_number[name="quantity"] input',run:"press Enter",},{content:"Check new value of tax group",trigger:'.o_tax_group_amount_value:contains("120")',run:"click",},...stepUtils.saveForm(),{content:"Check new value of tax group",trigger:'.o_tax_group_amount_value:contains("120")',run:"click",},{content:"Edit tax value",trigger:'.o_tax_group_edit_input input',run:"edit 2 && click body",},{content:"Check new value of total",trigger:'.oe_subtotal_footer_separator:contains("1,202")',run:"click",},{content:"Discard changes",trigger:'.o_form_button_cancel',run:"click",},{content:"Check tax value is reset",trigger:'.o_tax_group_amount_value:contains("120")',},]});return __exports;});;

/* /account/static/tests/tours/tour_tests_shared_js_python.js */
odoo.define('@account/../tests/tours/tour_tests_shared_js_python',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add('tests_shared_js_python',{url:"/account/init_tests_shared_js_python",steps:()=>[{content:"Click",trigger:'button',run:"click",},{content:"Wait",trigger:'button.text-success',timeout:3000,},]});return __exports;});;

/* /sale/static/tests/tours/mail_attachment_removal_test_tour.js */
odoo.define('@sale/../tests/tours/mail_attachment_removal_test_tour',['@web/core/registry','@web/../tests/utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{inputFiles}=require("@web/../tests/utils");registry.category("web_tour.tours").add("mail_attachment_removal_tour",{steps:()=>[{content:"click on send by email",trigger:".o_statusbar_buttons > button[name='action_quotation_send']",run:"click"},{content:"save a new layout",trigger:".o_technical_modal button[name='document_layout_save']",run:"click"},{content:"delete attachment",trigger:".o_field_widget[name='attachment_ids'] li > button .fa-times",run:"click"},{content:"add one extra file in composer",trigger:".o_field_mail_composer_attachment_selector button",async run(){const files=[new File(["hello, world"],"file1.txt",{type:"text/plain"})];await inputFiles(".o_field_mail_composer_attachment_selector .o_input_file",files);},},{content:"check new attachment is listed",trigger:".o_field_mail_composer_attachment_list a:contains(file1.txt)",},{content:"send the email",trigger:".o_mail_send",run:"click"},{content:"confirm quotation",trigger:"button[name='action_confirm']",run:"click"},{content:"click on Send Message",trigger:"button:contains('Send message')",run:"click",},{content:"Check that the extra attachment is not listed anymore in chatter composer",trigger:".o-mail-Composer:not(:has(div.o-mail-AttachmentList))",},]})
return __exports;});;

/* /sale/static/tests/tours/product_attribute_value_tour.js */
odoo.define('@sale/../tests/tours/product_attribute_value_tour',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");const openProductAttribute=(product_attribute)=>[...stepUtils.goToAppSteps("sale.sale_menu_root","Go to the Sales App"),{content:'Open configuration menu',trigger:'.o-dropdown[data-menu-xmlid="sale.menu_sale_config"]',run:"click",},{content:'Navigate to product attribute list view',trigger:'.o-dropdown-item[data-menu-xmlid="sale.menu_product_attribute_action"]',run:"click",},{content:`Navigate to ${product_attribute}`,trigger:`.o_data_cell[data-tooltip=${product_attribute}]`,run:"click",},];const deletePAV=(product_attribute_value,message)=>[{content:'Click delete button',trigger:`.o_data_cell[data-tooltip=${product_attribute_value}] ~ .o_list_record_remove`,run:"click",},{content:'Check correct message in modal',trigger:message||'.modal-title:contains("Bye-bye, record!")',run:"click",},{content:'Close modal',trigger:'.btn-close',run:"click",}]
registry.category("web_tour.tours").add('delete_product_attribute_value_tour',{url:'/odoo',steps:()=>[...openProductAttribute("PA"),...deletePAV("pa_value_1",".text-prewrap:contains('pa_value_1')"),...deletePAV("pa_value_2"),...deletePAV("pa_value_3"),{content:'Check test finished',trigger:'a:contains("Attributes")',}]});return __exports;});;

/* /sale/static/tests/tours/sale_catalog.js */
odoo.define('@sale/../tests/tours/sale_catalog',['@account/js/tours/tour_utils','@web/core/registry'],function(require){'use strict';let __exports={};const{addSectionFromProductCatalog}=require("@account/js/tours/tour_utils");const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add('sale_catalog',{steps:()=>[{content:"Create a new SO",trigger:'.o_list_button_add',run:'click',},{content:"Select the customer field",trigger:".o_field_res_partner_many2one input.o_input",run:'click',},{content:"Wait for the field to be active",trigger:".o_field_res_partner_many2one input[aria-expanded=true]",},{content:"Select a customer from the dropdown",trigger:".o_field_res_partner_many2one .dropdown-item:not([id$='_loading']):first",run:'click',},{content:"Open product catalog",trigger:'button[name="action_add_from_catalog"]',run:'click',},{content:"Type 'Restricted' into the search bar",trigger:'input.o_searchview_input',run:"edit Restricted",},{content:"Search for the product",trigger:'input.o_searchview_input',run:"press Enter",},{content:"Wait for catalog rendering",trigger:'.o_kanban_record:contains("Restricted Product")',},{content:"Wait for filtering",trigger:'.o_kanban_renderer:not(:has(.o_kanban_record:contains("AAA Product")))',},{content:"Add the product to the SO",trigger:'.o_kanban_record:contains("Restricted Product") .fa-shopping-cart',run:'click',},{content:"Wait for product to be added",trigger:'.o_kanban_record:contains("Restricted Product"):not(:has(.fa-shopping-cart))',},{content:"Input a custom quantity",trigger:'.o_kanban_record:contains("Restricted Product") .o_input',run:"edit 6",},{content:"Increase the quantity",trigger:'.o_kanban_record:contains("Restricted Product") .fa-plus',run:'click',},{content:"Close the catalog",trigger:'.o-kanban-button-back',run:'click',},]});registry.category("web_tour.tours").add('test_add_section_from_product_catalog_on_sale_order',{steps:()=>[{content:"Create a new SO",trigger:'.o_list_button_add',run:'click',},{content:"Select the customer field",trigger:'.o_field_res_partner_many2one input.o_input',run:'click',},{content:"Wait for the field to be active",trigger:'.o_field_res_partner_many2one input[aria-expanded=true]',},{content:"Select a customer from the dropdown",trigger:'.o_field_res_partner_many2one .dropdown-item:not([id$="_loading"]):first',run:'click',},...addSectionFromProductCatalog(),]});return __exports;});;

/* /sale/static/tests/tours/sale_combo_configurator.js */
odoo.define('@sale/../tests/tours/sale_combo_configurator',['@web/core/registry','@web_tour/tour_utils','@sale/js/tours/combo_configurator_tour_utils','@sale/js/tours/product_configurator_tour_utils','@sale/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require('@web/core/registry');const{stepUtils}=require('@web_tour/tour_utils');const comboConfiguratorTourUtils=require('@sale/js/tours/combo_configurator_tour_utils')[Symbol.for("default")];const productConfiguratorTourUtils=require('@sale/js/tours/product_configurator_tour_utils')[Symbol.for("default")];const tourUtils=require('@sale/js/tours/tour_utils')[Symbol.for("default")];registry.category('web_tour.tours').add('sale_combo_configurator',{url:'/odoo',steps:()=>[...stepUtils.goToAppSteps('sale.sale_menu_root',"Open the sales app"),...tourUtils.createNewSalesOrder(),...tourUtils.selectCustomer("Test Partner"),...tourUtils.addProduct("Combo product"),comboConfiguratorTourUtils.assertComboCount(2),comboConfiguratorTourUtils.assertComboItemCount("Combo A",2),comboConfiguratorTourUtils.assertComboItemCount("Combo B",2),comboConfiguratorTourUtils.assertQuantity(1),comboConfiguratorTourUtils.assertPrice('25.00'),comboConfiguratorTourUtils.increaseQuantity(),comboConfiguratorTourUtils.assertQuantity(2),comboConfiguratorTourUtils.assertPrice('50.00'),comboConfiguratorTourUtils.decreaseQuantity(),comboConfiguratorTourUtils.assertQuantity(1),comboConfiguratorTourUtils.assertPrice('25.00'),comboConfiguratorTourUtils.setQuantity(3),comboConfiguratorTourUtils.assertQuantity(3),comboConfiguratorTourUtils.assertPrice('75.00'),comboConfiguratorTourUtils.assertConfirmButtonDisabled(),comboConfiguratorTourUtils.selectComboItem("Product A2"),comboConfiguratorTourUtils.selectComboItem("Product B2"),comboConfiguratorTourUtils.assertConfirmButtonEnabled(),comboConfiguratorTourUtils.selectComboItem("Product A1"),productConfiguratorTourUtils.selectAttribute("Product A1","No variant attribute","A"),...productConfiguratorTourUtils.saveConfigurator(),comboConfiguratorTourUtils.assertPrice('90.00'),comboConfiguratorTourUtils.selectComboItem("Product A1"),...productConfiguratorTourUtils.selectAndSetCustomAttribute("Product A1","No variant attribute","B","Some custom value"),...productConfiguratorTourUtils.saveConfigurator(),comboConfiguratorTourUtils.assertPrice('93.00'),...comboConfiguratorTourUtils.saveConfigurator(),tourUtils.checkSOLDescriptionContains("Combo product x 3"),tourUtils.checkSOLDescriptionContains("Product A1","No variant attribute: B: Some custom value"),tourUtils.checkSOLDescriptionContains("Product B2"),{content:"Verify the combo item quantities",trigger:'td[name="product_uom_qty"]:contains(3.00)',},{content:"Verify the first combo item's unit price",trigger:'td[name="price_unit"]:contains(18.50)',},{content:"Verify the second combo item's unit price",trigger:'td[name="price_unit"]:contains(12.50)',},{content:"Verify the order's total price",trigger:'div.oe_subtotal_footer:contains(93.00)',},tourUtils.editLineMatching("Combo product x 3"),tourUtils.editConfiguration(),comboConfiguratorTourUtils.setQuantity(2),comboConfiguratorTourUtils.assertComboItemSelected("Product A1"),comboConfiguratorTourUtils.assertComboItemSelected("Product B2"),comboConfiguratorTourUtils.selectComboItem("Product A2"),...comboConfiguratorTourUtils.saveConfigurator(),tourUtils.checkSOLDescriptionContains("Combo product x 2"),tourUtils.checkSOLDescriptionContains("Product A2"),tourUtils.checkSOLDescriptionContains("Product B2"),{content:"Verify the combo item quantities",trigger:'td[name="product_uom_qty"]:contains(2.00)',},{content:"Verify the first combo item's unit price",trigger:'td[name="price_unit"]:contains(12.50)',},{content:"Verify the second combo item's unit price",trigger:'td[name="price_unit"]:contains(12.50)',},{content:"Verify the order's total price",trigger:'div.oe_subtotal_footer:contains(50.00)',},...stepUtils.saveForm(),],});registry.category('web_tour.tours').add('sale_combo_configurator_with_optional_products',{url:'/odoo',steps:()=>[...stepUtils.goToAppSteps('sale.sale_menu_root',"Open the sales app"),...tourUtils.createNewSalesOrder(),...tourUtils.selectCustomer("Test Partner"),...tourUtils.addProduct("Combo product"),comboConfiguratorTourUtils.selectComboItem("Product B2"),...comboConfiguratorTourUtils.saveConfigurator(),productConfiguratorTourUtils.addOptionalProduct("Optional product"),{content:"verify that we cannot reduce main product quantity",trigger:':not(button[name="sale_quantity_button_minus"])',},{content:"verify that we cannot increase main product quantity",trigger:':not(button[name="sale_quantity_button_plus"])',},...productConfiguratorTourUtils.saveConfigurator(),tourUtils.checkSOLDescriptionContains("Combo product"),tourUtils.checkSOLDescriptionContains("Product B2"),tourUtils.checkSOLDescriptionContains("Optional product"),...stepUtils.saveForm(),],});return __exports;});;

/* /sale/static/tests/tours/sale_combo_configurator_preconfigure_unconfigurable_ptals.js */
odoo.define('@sale/../tests/tours/sale_combo_configurator_preconfigure_unconfigurable_ptals',['@web/core/registry','@web_tour/tour_utils','@sale/js/tours/combo_configurator_tour_utils','@sale/js/tours/product_configurator_tour_utils','@sale/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require('@web/core/registry');const{stepUtils}=require('@web_tour/tour_utils');const comboConfiguratorTourUtils=require('@sale/js/tours/combo_configurator_tour_utils')[Symbol.for("default")];const productConfiguratorTourUtils=require('@sale/js/tours/product_configurator_tour_utils')[Symbol.for("default")];const tourUtils=require('@sale/js/tours/tour_utils')[Symbol.for("default")];registry.category('web_tour.tours').add('sale_combo_configurator_preconfigure_unconfigurable_ptals',{url:'/odoo',steps:()=>[...stepUtils.goToAppSteps('sale.sale_menu_root',"Open the sales app"),...tourUtils.createNewSalesOrder(),...tourUtils.selectCustomer("Test Partner"),...tourUtils.addProduct("Combo product"),{content:"Verify that unconfigurable ptals are preconfigured",trigger:`${comboConfiguratorTourUtils.comboItemSelector("Test product")}:contains("Attribute A: A")`,},{content:"Verify that configurable ptals aren't preconfigured",trigger:`${comboConfiguratorTourUtils.comboItemSelector("Test product")}:not(:contains("Attribute B: B"))`,},comboConfiguratorTourUtils.selectComboItem("Test product"),productConfiguratorTourUtils.selectAttribute("Test product","Attribute B","B",'multi'),...productConfiguratorTourUtils.saveConfigurator(),{content:"Verify that configurable ptals are now configured",trigger:`${comboConfiguratorTourUtils.comboItemSelector("Test product")}:contains("Attribute B: B")`,},...comboConfiguratorTourUtils.saveConfigurator(),...stepUtils.saveForm(),],});return __exports;});;

/* /sale/static/tests/tours/sale_combo_configurator_preselect_single_unconfigurable_items.js */
odoo.define('@sale/../tests/tours/sale_combo_configurator_preselect_single_unconfigurable_items',['@web/core/registry','@web_tour/tour_utils','@sale/js/tours/combo_configurator_tour_utils','@sale/js/tours/product_configurator_tour_utils','@sale/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require('@web/core/registry');const{stepUtils}=require('@web_tour/tour_utils');const comboConfiguratorTourUtils=require('@sale/js/tours/combo_configurator_tour_utils')[Symbol.for("default")];const productConfiguratorTourUtils=require('@sale/js/tours/product_configurator_tour_utils')[Symbol.for("default")];const tourUtils=require('@sale/js/tours/tour_utils')[Symbol.for("default")];registry.category('web_tour.tours').add('sale_combo_configurator_preselect_single_unconfigurable_items',{url:'/odoo',steps:()=>[...stepUtils.goToAppSteps('sale.sale_menu_root',"Open the sales app"),...tourUtils.createNewSalesOrder(),...tourUtils.selectCustomer("Test Partner"),...tourUtils.addProduct("Combo product"),comboConfiguratorTourUtils.assertPreselectedComboItemCount(2),comboConfiguratorTourUtils.assertComboItemPreselected("Product A"),comboConfiguratorTourUtils.assertComboItemPreselected("Product C"),comboConfiguratorTourUtils.assertConfirmButtonDisabled(),comboConfiguratorTourUtils.selectComboItem("Product B"),productConfiguratorTourUtils.selectAttribute("Product B","Attribute B","B",'multi'),...productConfiguratorTourUtils.saveConfigurator(),comboConfiguratorTourUtils.selectComboItem("Product D"),productConfiguratorTourUtils.setCustomAttribute("Product D","Attribute D","Test D"),...productConfiguratorTourUtils.saveConfigurator(),comboConfiguratorTourUtils.selectComboItem("Product E1"),comboConfiguratorTourUtils.assertConfirmButtonEnabled(),...comboConfiguratorTourUtils.saveConfigurator(),...stepUtils.saveForm(),],});return __exports;});;

/* /sale/static/tests/tours/sale_order_product_uom_integrity.js */
odoo.define('@sale/../tests/tours/sale_order_product_uom_integrity',['@web/core/registry','@web_tour/tour_utils','@sale/js/tours/product_configurator_tour_utils','@sale/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require('@web/core/registry');const{stepUtils}=require('@web_tour/tour_utils');const productConfiguratorTourUtils=require('@sale/js/tours/product_configurator_tour_utils')[Symbol.for("default")];const tourUtils=require('@sale/js/tours/tour_utils')[Symbol.for("default")];registry.category('web_tour.tours').add('sale_order_keep_uom_on_variant_wizard_quantity_change',{steps:()=>[tourUtils.editLineMatching("Sofa"),tourUtils.editConfiguration(),productConfiguratorTourUtils.increaseProductQuantity("Sofa"),...productConfiguratorTourUtils.saveConfigurator(),...stepUtils.saveForm(),],});return __exports;});;

/* /sale/static/tests/tours/sale_signature.js */
odoo.define('@sale/../tests/tours/sale_signature',['@web/core/registry','@web/core/utils/urls'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{redirect}=require("@web/core/utils/urls");registry.category("web_tour.tours").add('sale_signature',{url:'/my/quotes',steps:()=>[{content:"open the test SO",trigger:'a:text(test SO)',run:"click",expectUnloadPage:true,},{content:"click sign",trigger:'a:contains("Sign")',run:"click",},{content:"clear the signature name",trigger:'.modal .o_web_sign_name_and_signature input',run:"clear",},{content:"check submit is disabled when name is empty",trigger:'.modal .o_portal_sign_submit:disabled',},{content:"reset signature name",trigger:'.modal .o_web_sign_name_and_signature input',run:"fill Joel Willis",},{content:"check submit is enabled",trigger:'.o_portal_sign_submit:enabled',},{trigger:".modal .o_web_sign_name_and_signature input:value(Joel Willis)"},{trigger:".modal canvas.o_web_sign_signature",run:"canvasNotEmpty",},{content:"click select style",trigger:'.modal .o_web_sign_auto_select_style button',run:"click",},{content:"click style 4",trigger:".o-dropdown-item:eq(3)",run:"click",},{content:"click submit",trigger:'.modal .o_portal_sign_submit:enabled',run:"click",expectUnloadPage:true,},{content:"check it's confirmed",trigger:'#quote_content:contains("Thank You")',run:"click",},{trigger:'#quote_content',run:function(){redirect("/odoo");},expectUnloadPage:true,},{trigger:'nav',}]});registry.category("web_tour.tours").add("sale_signature_without_name",{steps:()=>[{content:"Wait for interactions to load",trigger:`body[is-ready=true], :iframe body[is-ready=true]`,},{content:"Sign & Pay",trigger:".o_portal_sale_sidebar .btn-primary, :iframe .o_portal_sale_sidebar .btn-primary",run:"click",},{content:"click submit",trigger:".o_portal_sign_submit:enabled, :iframe .o_portal_sign_submit:enabled",run:"click",},{content:"check error because no name",trigger:'.o_portal_sign_error_msg:contains("Signature is missing."), :iframe .o_portal_sign_error_msg:contains("Signature is missing.")',},],});return __exports;});;

/* /sale/static/src/js/tours/combo_configurator_tour_utils.js */
odoo.define('@sale/js/tours/combo_configurator_tour_utils',[],function(require){'use strict';let __exports={};function comboSelector(comboName){return`
        .sale-combo-configurator-dialog
        [name="sale_combo_configurator_title"]:contains("${comboName}")
    `;}
function comboItemSelector(comboItemName,extraClasses=[]){const extraClassesSelector=extraClasses.map(extraClass=>`.${extraClass}`).join('');return`
        .sale-combo-configurator-dialog
        .product-card${extraClassesSelector}:has(h6:contains("${comboItemName}"))
    `;}
function assertComboCount(count){return{content:`Assert that there are ${count} combos`,trigger:'.sale-combo-configurator-dialog',run(){const selector=`.sale-combo-configurator-dialog [name="sale_combo_configurator_title"]`;if(document.querySelectorAll(selector).length!==count){console.error(`Assertion failed`);}},};}
function assertComboItemCount(comboName,count){return{content:`Assert that there are ${count} combo items in combo ${comboName}`,trigger:comboSelector(comboName),run({queryAll}){const selector=`${comboSelector(comboName)} + .row .product-card`;if(queryAll(selector).length!==count){console.error(`Assertion failed`);}},};}
function assertSelectedComboItemCount(count){return{content:`Assert that there are ${count} selected combo items`,trigger:'.sale-combo-configurator-dialog',run(){const selector=`.sale-combo-configurator-dialog .row .product-card.selected`;if(document.querySelectorAll(selector).length!==count){console.error(`Assertion failed`);}},};}
function assertPreselectedComboItemCount(count){return{content:`Assert that there are ${count} preselected combo items`,trigger:'.sale-combo-configurator-dialog',run(){const selector='.sale-combo-configurator-dialog div[name="preselected_product_name"]';if(document.querySelectorAll(selector).length!==count){console.error(`Assertion failed`);}},};}
function selectComboItem(comboItemName){return{content:`Select combo item ${comboItemName}`,trigger:comboItemSelector(comboItemName),run:'click',};}
function assertComboItemSelected(comboItemName){return{content:`Assert that combo item ${comboItemName} is selected`,trigger:comboItemSelector(comboItemName,['selected']),};}
function assertComboItemPreselected(comboItemName){return{content:`Assert that combo item ${comboItemName} is preselected`,trigger:`[name="preselected_product_name"]:contains(${comboItemName})`,};}
function increaseQuantity(){return{content:"Increase the combo quantity",trigger:'.sale-combo-configurator-dialog button[name="sale_quantity_button_plus"]',run:'click',};}
function decreaseQuantity(){return{content:"Decrease the combo quantity",trigger:'.sale-combo-configurator-dialog button[name="sale_quantity_button_minus"]',run:'click',};}
function setQuantity(quantity){return{content:`Set the combo quantity to ${quantity}`,trigger:'.sale-combo-configurator-dialog input[name="sale_quantity"]',run:`edit ${quantity} && click .modal-body`,};}
function assertQuantity(quantity){return{content:`Assert that the combo quantity is ${quantity}`,trigger:`.sale-combo-configurator-dialog input[name="sale_quantity"]:value(${quantity})`,};}
function assertPrice(price){return{content:`Assert that the price is ${price}`,trigger:`
            .sale-combo-configurator-dialog
            [name="sale_combo_configurator_total"]:contains("${price}")
        `,};}
function assertPriceInfo(priceInfo){return{content:`Assert that the price info is ${priceInfo}`,trigger:`.sale-combo-configurator-dialog footer.modal-footer:contains("${priceInfo}")`,};}
function assertFooterButtonsDisabled(){return{content:"Assert that the footer buttons are disabled",trigger:'.sale-combo-configurator-dialog footer.modal-footer button:disabled',};}
function assertFooterButtonsEnabled(){return{content:"Assert that the footer buttons are enabled",trigger:'.sale-combo-configurator-dialog footer.modal-footer button:enabled',};}
function assertConfirmButtonDisabled(){return{content:"Assert that the confirm button is disabled",trigger:`
            .sale-combo-configurator-dialog
            button[name="sale_combo_configurator_confirm_button"]:disabled
        `,};}
function assertConfirmButtonEnabled(){return{content:"Assert that the confirm button is enabled",trigger:`
            .sale-combo-configurator-dialog
            button[name="sale_combo_configurator_confirm_button"]:enabled
        `,};}
function saveConfigurator(){return[{content:"Confirm the combo configurator",trigger:`
                .sale-combo-configurator-dialog
                button[name="sale_combo_configurator_confirm_button"]
            `,run:'click',},{content:"Wait until the modal is closed",trigger:'body:not(:has(.sale-combo-configurator-dialog))',},];}
__exports[Symbol.for("default")]={comboSelector,comboItemSelector,assertComboCount,assertComboItemCount,assertSelectedComboItemCount,assertPreselectedComboItemCount,selectComboItem,assertComboItemSelected,assertComboItemPreselected,increaseQuantity,decreaseQuantity,setQuantity,assertQuantity,assertPrice,assertPriceInfo,assertFooterButtonsDisabled,assertFooterButtonsEnabled,assertConfirmButtonDisabled,assertConfirmButtonEnabled,saveConfigurator,};return __exports;});;

/* /sale/static/src/js/tours/product_configurator_tour_utils.js */
odoo.define('@sale/js/tours/product_configurator_tour_utils',[],function(require){'use strict';let __exports={};function productSelector(productName){return`
        table.o_sale_product_configurator_table
        tr:has(td>div[name="o_sale_product_configurator_name"]
        span:contains("${productName}"))
    `;}
function optionalProductSelector(productName){return`
        table.o_sale_product_configurator_table_optional
        tr:has(td>div[name="o_sale_product_configurator_name"]
        span:contains("${productName}"))
    `;}
function optionalProductImageSrc(queryOne,productName){return queryOne(`${optionalProductSelector(productName)} td.o_sale_product_configurator_img>img`).getAttribute("src");}
function addOptionalProduct(productName){return{content:`Add ${productName}`,trigger:`
            ${optionalProductSelector(productName)}
            td.o_sale_product_configurator_price
            button:contains("Add")
        `,run:'click',};}
function removeOptionalProduct(productName){return{content:`Remove ${productName}`,trigger:`
            ${productSelector(productName)}
            td.o_sale_product_configurator_qty
            a:contains("Remove")
        `,run:'click',};}
function decreaseProductQuantity(productName){return{content:`Decrease the quantity of ${productName}`,trigger:`
            ${productSelector(productName)}
            td.o_sale_product_configurator_qty
            button:has(i.oi-minus)
        `,run:'click',};}
function increaseProductQuantity(productName){return{content:`Increase the quantity of ${productName}`,trigger:`
            ${productSelector(productName)}
            td.o_sale_product_configurator_qty
            button:has(i.oi-plus)
        `,run:'click',};}
function setProductQuantity(productName,quantity){return{content:`Set the quantity of ${productName} to ${quantity}`,trigger:`
            ${productSelector(productName)}
            td.o_sale_product_configurator_qty
            input[name="sale_quantity"]
        `,run:`edit ${quantity} && click .modal-body`,};}
function setProductUoM(productName,uomName){return{content:`Set the uom of ${productName} to ${uomName}`,trigger:`
            ${productSelector(productName)}
            label:contains("${uomName}")
        `,run:`click && click .modal-body`,};}
function assertProductQuantity(productName,quantity){return{content:`Assert that the quantity of ${productName} is ${quantity}`,trigger:`
            ${productSelector(productName)}
            td.o_sale_product_configurator_qty
            input[name="sale_quantity"]:value(${quantity})
        `,};}
function selectAttribute(productName,attributeName,attributeValue,attributeType='radio'){const ptalSelector=`
        ${productSelector(productName)}
        td>div[name="ptal"]:has(label:contains("${attributeName}"))
    `;const content=`Select ${attributeValue} for ${productName} ${attributeName}`;switch(attributeType){case'color':return{content:content,trigger:`${ptalSelector} label[title="${attributeValue}"]`,run:'click',};case'multi':return{content:content,trigger:`${ptalSelector}:has(label:text(${attributeValue})) input[type="checkbox"]`,run:"click",};case'pills':case'radio':return{content:content,trigger:`${ptalSelector} span:contains("${attributeValue}")`,run:'click',};case'select':return{content:content,trigger:`${ptalSelector} select`,run:`selectByLabel ${attributeValue}`,};default:console.error("Unsupported attribute type");}}
function setCustomAttribute(productName,attributeName,customValue){return{content:`Set ${customValue} as a custom attribute for ${productName} ${attributeName}`,trigger:`
            ${productSelector(productName)}
            td>div[name="ptal"]:has(label:contains("${attributeName}"))
            input[type="text"]
        `,run:`edit ${customValue} && click .modal-body`,};}
function selectAndSetCustomAttribute(productName,attributeName,attributeValue,customValue,attributeType='radio'){return[selectAttribute(productName,attributeName,attributeValue,attributeType),setCustomAttribute(productName,attributeName,customValue),];}
function assertPriceTotal(total){return{content:`Assert that the total is ${total}`,trigger:`
            .o_sale_product_configurator_dialog .o_configurator_price_total:contains("${total}"),
        `,};}
function assertProductPrice(productName,price){return{content:`Assert that ${productName} costs ${price}`,trigger:`
            ${productSelector(productName)}
            td.o_sale_product_configurator_qty
            span:contains("${price}")
        `,};}
function assertOptionalProductPrice(productName,price){return{content:`Assert that ${productName} costs ${price}`,trigger:`
            ${optionalProductSelector(productName)}
            td.o_sale_product_configurator_price
            span:contains("${price}")
        `,};}
function assertProductPriceInfo(productName,priceInfo){return{content:`Assert that the price info of ${productName} is ${priceInfo}`,trigger:`
            ${productSelector(productName)}
            td.o_sale_product_configurator_qty
            div:contains("${priceInfo}")
        `,};}
function assertOptionalProductPriceInfo(productName,priceInfo){return{content:`Assert that the price info of ${productName} is ${priceInfo}`,trigger:`
            ${optionalProductSelector(productName)}
            td.o_sale_product_configurator_price
            div:contains("${priceInfo}")
        `,};}
function assertProductNameContains(productName){return{content:`Assert that the product name contains ${productName}`,trigger:productSelector(productName),};}
function assertFooterButtonsDisabled(){return{content:"Assert that the footer buttons are disabled",trigger:'.o_sale_product_configurator_dialog footer.modal-footer button:disabled',};}
function saveConfigurator(){return[{trigger:'.o_sale_product_configurator_dialog button:contains(Confirm)',run:'click',},{content:"Wait until the modal is closed",trigger:'body:not(:has(.o_sale_product_configurator_dialog))',}];}
__exports[Symbol.for("default")]={productSelector,optionalProductSelector,optionalProductImageSrc,addOptionalProduct,removeOptionalProduct,increaseProductQuantity,decreaseProductQuantity,setProductQuantity,setProductUoM,assertProductQuantity,selectAttribute,setCustomAttribute,selectAndSetCustomAttribute,assertPriceTotal,assertProductPrice,assertOptionalProductPrice,assertProductPriceInfo,assertOptionalProductPriceInfo,assertProductNameContains,assertFooterButtonsDisabled,saveConfigurator,};return __exports;});;

/* /sale/static/src/js/tours/tour_utils.js */
odoo.define('@sale/js/tours/tour_utils',[],function(require){'use strict';let __exports={};function createNewSalesOrder(){return[{trigger:'.o_sale_order',},{content:"Create new order",trigger:'.o_list_button_add',run:'click',},]}
function selectCustomer(customerName){return[{content:`Select customer ${customerName}`,trigger:'.o_field_widget[name=partner_id] input',run:`edit ${customerName}`,},{trigger:`ul.ui-autocomplete > li > a:contains("${customerName}")`,run:'click',},];}
function addProduct(productName,rowNumber=1){return[{content:`Add product ${productName}`,trigger:'a:contains("Add a product")',run:'click',},{content:'wait for new row to be created',trigger:`.o_data_row:nth-child(${rowNumber})`,},{trigger:'div[name="product_template_id"] input',run:`edit ${productName}`,},{trigger:`ul.ui-autocomplete a:contains("${productName}")`,run:'click',},];}
function clickSomewhereElse(){return[{content:'click somewhere else to exit cell focus',trigger:'a[name=order_lines]',run:'click',},{content:'check that the soline is not focused anymore',trigger:'table.o_section_and_note_list_view:not(:has(.o_selected_row))',}]}
function checkSOLDescriptionContains(productName,text){let trigger='.o_field_product_label_section_and_note_cell';if(productName){trigger=`${trigger}:has(:contains("${productName}"), input:value("${productName}"))`;}
if(text){trigger=`${trigger} .o_input`;}
return{trigger};}
function editLineMatching(productName,text){let base_step=checkSOLDescriptionContains(productName,text);base_step['run']='click';return base_step;}
function editConfiguration(){return{trigger:'[name=product_template_id] button.fa-pencil',run:'click',}}
__exports[Symbol.for("default")]={createNewSalesOrder,selectCustomer,addProduct,checkSOLDescriptionContains,editLineMatching,editConfiguration,clickSomewhereElse,};return __exports;});;

/* /sale_management/static/tests/tours/sale_flow_tour.js */
odoo.define('@sale_management/../tests/tours/sale_flow_tour',['@web/core/registry','@web_tour/tour_utils','@sale/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");const tourUtils=require("@sale/js/tours/tour_utils")[Symbol.for("default")];registry.category("web_tour.tours").add("test_basic_sale_flow_with_minimal_access_rights",{steps:()=>[...stepUtils.goToAppSteps("sale.sale_menu_root","Open the sales app"),{content:"Check that at least one quotation is present in the view",trigger:".o_sale_onboarding_list_view .o_data_row",},...tourUtils.createNewSalesOrder(),...tourUtils.selectCustomer("partner_a"),...tourUtils.addProduct("Test Product"),{content:"Wait for the tax to be set by the onchange",trigger:".o_field_many2many_tags[name=tax_ids] .o_tag",},{trigger:"button[name=action_confirm]",run:"click",},{trigger:".o_statusbar_status .o_arrow_button_current:contains(Sales Order)",},{trigger:"button[id=create_invoice]",run:"click",},{trigger:".modal-content button[id=create_invoice_open]",run:"click",},{content:"Check that we are in the invoice form view",trigger:".o_statusbar_status:contains(Posted) .o_arrow_button_current:contains(Draft)",},{content:"Check that the invoice is linked to the sale order",trigger:"button[name=action_view_source_sale_orders] .o_stat_value:contains(1)",},],});return __exports;});;

/* /website/static/tests/tour_utils/lifecycle_dep_interaction.js */
odoo.define('@website/../tests/tour_utils/lifecycle_dep_interaction',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");odoo.loader.bus.addEventListener("module-started",(e)=>{if(e.detail.moduleName!=="@web/public/interaction"){return;}
const{Interaction}=e.detail.module;const localStorageKey="interactionAndWysiwygLifecycle";if(!window.localStorage.getItem(localStorageKey)){window.localStorage.setItem(localStorageKey,"[]");}
function addLifecycleStep(step){const oldValue=window.localStorage.getItem(localStorageKey);const newValue=JSON.stringify(JSON.parse(oldValue).concat(step));window.localStorage.setItem(localStorageKey,newValue);}
class CountdownPatch extends Interaction{static selector=".s_countdown";dynamicContent={_root:{"t-att-class":()=>({interaction_started:true,}),},};start(){addLifecycleStep("interactionStart");}
destroy(){addLifecycleStep("interactionStop");}}
registry.category("public.interactions").add("website.countdown_patch",CountdownPatch);registry.category("public.interactions.edit").add("website.countdown_patch",{Interaction:CountdownPatch,});});return __exports;});;

/* /website/static/tests/tours/add_snippet_dialog.js */
odoo.define('@website/../tests/tours/add_snippet_dialog',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{registerWebsitePreviewTour}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("website_add_snippet_dialog",{edition:true,url:"/",},()=>[{content:"Click on any snippet to open the 'Insert Snippet' dialog.",trigger:".o_snippets_container_body div.o_snippet button",run:"click",},{content:"Ensure that snippets are displayed.",trigger:":iframe .o_add_snippets_preview [data-snippet-id]",},{content:"Enter a search term that does not match any snippet to test empty results behavior.",trigger:".modal input",run:"edit NoSnippetsAvailable",},{content:"Verify that the appropriate message is displayed when no snippets are found.",trigger:"p:contains('Oops! No snippets found.'), p:contains('Take a look at the search bar, there might be a small typo!')",},]);return __exports;});;

/* /website/static/tests/tours/alt_a.js */
odoo.define('@website/../tests/tours/alt_a',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");function pressAltA(){return{content:"Press Alt+a",trigger:"body",run:"press Alt+a",expectUnloadPage:true,};}
function searchParamsCheck(){return{content:"Check URL does not contain edit_translations or enable_editor",trigger:"body",run:()=>{const urlParams=new URLSearchParams(window.location.search);if(urlParams.has("edit_translations")||urlParams.has("enable_editor")){throw new Error("URL should not contain edit_translations or enable_editor after reload");}},};}
registry.category("web_tour.tours").add("alt_a_edit",{url:"/",steps:()=>[pressAltA(),{content:"Check that the sidebar is in edit mode",trigger:".o_builder_sidebar_open .o-tab-content #snippet_groups",},{content:"Check that the iframe is in edit mode",trigger:":iframe html[data-editable='1']:not([data-translatable='1'][data-edit_translations='1'])",},searchParamsCheck(),],});registry.category("web_tour.tours").add("alt_a_translation",{url:"/fr",steps:()=>[pressAltA(),{content:"Check that the sidebar is in translate mode",trigger:".o_builder_sidebar_open .o-tab-content .options-container-header:contains(Translation)",},{content:"Check that the iframe is in translate mode",trigger:":iframe html[data-translatable='1'][data-edit_translations='1']:not([data-editable='1'])",},searchParamsCheck(),],});return __exports;});;

/* /website/static/tests/tours/anchor_on_accordion_tour.js */
odoo.define('@website/../tests/tours/anchor_on_accordion_tour',['@website/js/tours/tour_utils','@web/core/browser/browser','@web/core/registry'],function(require){'use strict';let __exports={};const{insertSnippet,registerWebsitePreviewTour,clickOnSave,goBackToBlocks,clickToolbarButton,}=require("@website/js/tours/tour_utils");const{browser}=require("@web/core/browser/browser");const{registry}=require("@web/core/registry");registerWebsitePreviewTour("anchor_behaviour_on_accordion_same_tab",{edition:true,url:"/",},()=>[...insertSnippet({id:"s_accordion",name:"Accordion",}),{content:"Click the first accordion item to select it",trigger:":iframe .s_accordion .accordion-item:first-child button",run:"click",},{content:"Create anchor for this accordion item",trigger:"[data-container-title='Accordion Item'] .oe_snippet_anchor",async run(helpers){browser.navigator.clipboard.writeText=()=>{console.info("Copy in clipboard ignored!");};await helpers.click();},},goBackToBlocks(),...insertSnippet({id:"s_text_block",name:"Text",groupName:"Text",}),{content:"Click inside the first paragraph of text block",trigger:":iframe .s_text_block .container p:first-child",run:"editor Paragraph",},...clickToolbarButton("Paragraph","#wrap .s_text_block p","Add a link",false),{content:"Type the link URL",trigger:".o-we-linkpopover .o_we_href_input_link",run:"edit /#What-services-does-your-company-offer-%3F",},{content:"Apply the link",trigger:".o-we-linkpopover .o_we_apply_link",run:"click",},...clickOnSave(),{content:"Click the newly created link in text block",trigger:':iframe .s_text_block .container p:first-child a[href="/#What-services-does-your-company-offer-%3F"]',run:"click",},{content:"Check that the accordion item's content is visible",trigger:":iframe .s_accordion .accordion-item:first-child .accordion-collapse.show",},]);registry.category("web_tour.tours").add("anchor_behaviour_on_accordion_new_tab",{url:"/#What-services-does-your-company-offer-%3F",steps:()=>[{content:"Check that the accordion item's content is visible",trigger:".s_accordion .accordion-item:first-child .accordion-collapse.show",},],});return __exports;});;

/* /website/static/tests/tours/auto_hide_menu.js */
odoo.define('@website/../tests/tours/auto_hide_menu',['@web_tour/tour_utils','@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{stepUtils}=require("@web_tour/tour_utils");const{clickOnEditAndWaitEditMode,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");let numNavChildren;const addNavItem=[{content:"Add a menu item",trigger:".modal-dialog .fa-plus-circle:first-child",run:"click",},{content:"Input name",trigger:".o_menu_dialog_form input",run:"edit name",},{content:"Click Continue",trigger:".modal-dialog .modal-footer .btn-primary:contains(Continue)",run:"click",},];const getTheLayoutChildren={content:"Get the number of elements in the navbar",trigger:":iframe #o_main_nav ul[role='menu']",async run(){numNavChildren=this.anchor.children.length;},};const checkThatLayoutChanged={content:"Ensure that the navbar layout has changed",trigger:":iframe #o_main_nav ul[role='menu']",async run(){if(this.anchor.children.length===numNavChildren){throw new Error("Navbar layout should change");}},};registerWebsitePreviewTour("website_auto_hide_menu",{url:"/",},()=>[{content:"Click on Site",trigger:".o_main_navbar .o_menu_sections :contains('Site')",run:"click",},{content:"Click on Menu Editor",trigger:".o_popover .o-dropdown-item:contains('Menu Editor')",run:"click",},...Array(5).fill(addNavItem).flat(),{content:"Save",trigger:".modal-footer .btn:contains('Save')",run:"click",},{content:"Check that modal has disappeared",trigger:"body:not(:has(.modal))",},stepUtils.waitIframeIsReady(),{trigger:`:iframe .o_homepage_editor_welcome_message:contains(welcome to your homepage)`,},...clickOnEditAndWaitEditMode(),getTheLayoutChildren,{content:"Click on the navbar",trigger:":iframe nav",run:"click",},{content:"Change content width",trigger:".hb-row[data-label='Content Width'] .o-hb-btn[title='Small']",run:"click",},checkThatLayoutChanged,{content:"Make content width large",trigger:".hb-row[data-label='Content Width'] .o-hb-btn[title='Full']",run:"click",},getTheLayoutChildren,{content:"Go to the Theme Tab",trigger:".o-website-builder_sidebar .o-snippets-tabs [data-name='theme']",run:"click",},{content:"Change the page layout",trigger:".hb-row[data-label='Page Layout'] .o-dropdown",run:"click",},{content:"Set the page layout to 'boxed'",trigger:".o-hb-select-dropdown-item[data-action-value='boxed']",run:"click",},checkThatLayoutChanged,]);return __exports;});;

/* /website/static/tests/tours/carousel.js */
odoo.define('@website/../tests/tours/carousel',['@web/core/utils/concurrency','@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{delay}=require("@web/core/utils/concurrency");const{insertSnippet,clickOnSnippet,changeOption,clickOnEditAndWaitEditMode,clickOnSave,registerWebsitePreviewTour,goBackToBlocks,}=require("@website/js/tours/tour_utils");const carouselInnerSelector=":iframe .carousel-inner";registerWebsitePreviewTour("carousel_content_removal",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_carousel",name:"Carousel",groupName:"Intro",}),{trigger:":iframe .carousel .carousel-item.active .carousel-content",content:"Select the active carousel item.",run:"click",},{trigger:".overlay .oe_snippet_remove",content:"Remove the active carousel item.",run:"click",},{trigger:":iframe .carousel .carousel-item.active .container:not(:has(*)):not(:visible)",content:"Check for a carousel slide with an empty container tag",},goBackToBlocks(),...insertSnippet({id:"s_quotes_carousel",name:"Blockquote",groupName:"People",}),{trigger:":iframe .s_quotes_carousel_wrapper .carousel-item.active .s_blockquote",content:"Select the blockquote.",run:"click",},{trigger:".overlay .oe_snippet_remove",content:"Remove the blockquote from the carousel item.",run:"click",},{trigger:":iframe .s_quotes_carousel_wrapper .carousel-item.active:not(:has(.s_blockquote))",content:"Check that the blockquote has been removed and the carousel item is empty.",},]);const checkSlides=(number,position)=>{const nSlide=(n)=>`div.carousel-item:eq(${n})`;const hasNSlide=(n)=>`:has(${nSlide(n - 1)}):not(:has(${nSlide(n)}))`;const activeSlide=(p)=>`${nSlide(p - 1)}:is(.active)`;return{content:`Check if there are ${number} slides and if the ${position} is active`,trigger:`${carouselInnerSelector}${hasNSlide(number)} ${activeSlide(position)}`,async run(){await delay(500);},};};registerWebsitePreviewTour("snippet_carousel",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_carousel",name:"Carousel",groupName:"Intro"}),...clickOnSnippet(".carousel .carousel-item.active"),changeOption("Slide (1/3)","[aria-label='Move Forward']"),checkSlides(3,2),changeOption("Slide (2/3)","button[aria-label='Add Slide']"),checkSlides(4,3),changeOption("Slide (3/4)","button[aria-label='Remove Slide']"),checkSlides(3,2),{trigger:":iframe .carousel .carousel-control-prev",content:"Slide the carousel to the left with the arrows.",run:"click",},checkSlides(3,1),changeOption("Carousel","[data-action-id='addSlide']"),checkSlides(4,2),{content:"Check if the slide indicator was correctly updated",trigger:".options-container span:contains(' (2/4)')",},changeOption("Slide (2/4)","button[aria-label='Remove Slide']"),checkSlides(3,1),changeOption("Slide (1/3)","[aria-label='Move Backward']"),checkSlides(3,3),changeOption("Slide (3/3)","[data-action-value='prev']"),checkSlides(3,2),{content:"Add a slide",trigger:"button.btn.btn-success[aria-label='Add Slide']",async run(helpers){await helpers.click();await delay(360);},},{content:"Remove a slide",trigger:"button[aria-label='Remove Slide']",async run(helpers){await helpers.click();await delay(360);},},{content:"Add a slide",trigger:"button.btn.btn-success[aria-label='Add Slide']",async run(helpers){await helpers.click();await delay(360);},},...clickOnSave(),checkSlides(4,1),]);const setSlideUrl=(urlText)=>[{content:"Enter the URL to be linked with the slide",trigger:"div[data-action-id='setSlideAnchorUrl'] input[title='Your URL']",run:`edit ${urlText} && press Tab`,},];const checkSlideNotClickable=()=>({content:"Check that the 'clickable-slide' class and anchor tag are removed",trigger:":iframe .carousel-item.active:not(.clickable-slide):not(:has(a.slide-link))",});registerWebsitePreviewTour("snippet_carousel_clickable_slides",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_carousel",name:"Carousel",groupName:"Intro"}),...clickOnSnippet(".carousel .carousel-item.active"),changeOption("Slide (1/3)","[data-action-id='makeSlideClickable'] input"),{content:"Check that the 'clickable-slide' class is added to the carousel item",trigger:":iframe .carousel-item.active.clickable-slide",},...setSlideUrl("/contactus-thank-you"),{content:"Check that the anchor tag is added to the carousel item",trigger:":iframe .carousel-item.active.clickable-slide a.slide-link[href='/contactus-thank-you']:not(:visible)",},changeOption("Slide (1/3)","[data-label='Open in New Tab'] [data-attribute-action='target'] input"),...clickOnSave(),{content:"Check that the anchor tag is added to the carousel item",trigger:":iframe .carousel-item.active.clickable-slide a.slide-link[href='/contactus-thank-you'][target='_blank']",},...clickOnEditAndWaitEditMode(),...clickOnSnippet(".carousel .carousel-item.active"),{content:"Check that the entered URL is correctly shown in the option and remove it",trigger:"div[data-action-id='setSlideAnchorUrl'] input:value(/contactus-thank-you)",run:"edit ",},{content:"Press Tab in the URL input",trigger:"div[data-action-id='setSlideAnchorUrl'] input",run:"press Tab",},{content:"Check that the anchor tag is removed",trigger:":iframe .carousel-item.active.clickable-slide:not(:has(a.slide-link))",},{content:"Check that the 'Open in New Tab' option is no longer visible",trigger:"[data-label='Open in New Tab']:not(:visible)",},...setSlideUrl("/contactus-thank-you"),changeOption("Slide (1/3)","[data-action-id='makeSlideClickable'] input"),checkSlideNotClickable(),changeOption("Slide (1/3)","[data-action-id='makeSlideClickable'] input"),...clickOnSave(),checkSlideNotClickable(),]);return __exports;});;

/* /website/static/tests/tours/client_action_iframe_fallback.js */
odoo.define('@website/../tests/tours/client_action_iframe_fallback',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{registerWebsitePreviewTour}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("client_action_iframe_fallback",{url:"/",},()=>[{content:"Ensure we are on the expected page",trigger:':iframe html[data-view-xmlid="website.homepage"]',},{content:"Ensure the iframe fallback is not loaded in test mode",trigger:"body",run(){if(document.querySelector('iframe[src="/website/iframefallback"]')){throw new Error("The iframe fallback shouldn't be inside the DOM.");}},},]);return __exports;});;

/* /website/static/tests/tours/client_action_redirect.js */
odoo.define('@website/../tests/tours/client_action_redirect',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");const testUrl="/test_client_action_redirect";const goToBackendSteps=[{content:"Go to the backend",trigger:"body",async run(){window.location.assign(`/@${testUrl}`);},expectUnloadPage:true,},stepUtils.waitIframeIsReady(),{content:"Check we are in the backend",trigger:".o_website_preview :iframe main:has(#test_contact_BE):has(#test_contact_FE)",},];const checkEditorSteps=[{content:"Check that the editor is loaded",trigger:":iframe body.editor_enable",timeout:30000,},{content:"exit edit mode",trigger:"button[data-action=save]:enabled:contains(save)",run:"click",timeout:30000,},{content:"wait for editor to close",trigger:":iframe body:not(.editor_enable)",},];registry.category("web_tour.tours").add("client_action_redirect",{url:testUrl,steps:()=>[{content:"Check we are in the frontend",trigger:"body:not(:has(.o_website_preview)) #test_contact_FE",},{content:"Click on the link to frontend",trigger:"#test_contact_FE",run:"click",expectUnloadPage:true,},...checkEditorSteps,...goToBackendSteps,{content:"Click on the link to backend",trigger:":iframe #test_contact_BE",run:"click",expectUnloadPage:true,},...checkEditorSteps,...goToBackendSteps,{content:"Click on the link to backend (2)",trigger:":iframe #test_contact_BE",run:"click",expectUnloadPage:true,},...checkEditorSteps,],});return __exports;});;

/* /website/static/tests/tours/colorpicker.js */
odoo.define('@website/../tests/tours/colorpicker',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{insertSnippet,clickOnSave,clickOnEditAndWaitEditMode,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");function selectColorpickerSwitchPanel(type){return[{content:"Select text snippet",trigger:":iframe #wrap .s_text_block",run:"click",},{content:"Click on background-color option",trigger:"div[data-label='Background'] .o_we_color_preview[title='Color']",run:"click",},{content:"Select type of colorpicker in switch panel",trigger:`.o_popover .o_font_color_selector .btn-tab:contains("${type}")`,run:"click",},];}
function checkBackgroundColorWithHEX(hexCode){return[{content:"Check if the RGBA color matches the selected color",trigger:".o_popover .o_colorpicker_widget .o_hex_input",run:function(){const hex=this.anchor.value;if(hex!==hexCode){console.error("There may be a problem with the RGBA colorpicker");}},},];}
registerWebsitePreviewTour("website_background_colorpicker",{edition:true,url:"/",},()=>[...insertSnippet({id:"s_text_block",name:"Text",groupName:"Text",}),...selectColorpickerSwitchPanel("Gradient"),{content:"Select first gradient element",trigger:".o_colorpicker_sections .o_color_button[data-color='linear-gradient(135deg, rgb(255, 204, 51) 0%, rgb(226, 51, 255) 100%)']",run:"click",},...clickOnSave(),...clickOnEditAndWaitEditMode(),...selectColorpickerSwitchPanel("Gradient"),{content:"Click on custom button to open colorpicker widget",trigger:"button:contains('Custom')[style='background-image: linear-gradient(135deg, rgb(255, 204, 51) 0%, rgb(226, 51, 255) 100%);']",run:"click",},...checkBackgroundColorWithHEX("#FFCC33"),...clickOnSave(),...clickOnEditAndWaitEditMode(),...selectColorpickerSwitchPanel("Custom"),{content:"Select first custom color element",trigger:".o_colorpicker_section button[data-color='black']",run:"click",},...clickOnSave(),...clickOnEditAndWaitEditMode(),...selectColorpickerSwitchPanel("Custom"),...checkBackgroundColorWithHEX("#000000"),]);return __exports;});;

/* /website/static/tests/tours/conditional_visibility.js */
odoo.define('@website/../tests/tours/conditional_visibility',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{changeOptionInPopover,clickOnEditAndWaitEditMode,clickOnSave,clickOnSnippet,insertSnippet,goBackToBlocks,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");const snippets=[{id:"s_text_image",name:"Text - Image",groupName:"Content",},{id:"s_banner",name:"Banner",groupName:"Intro",},{id:"s_popup",name:"Popup",groupName:"Content",},{id:"s_image_text",name:"Image - Text",groupName:"Content",},];function checkEyeIcon(snippetName,visible){const eyeIcon=visible?"fa-eye":"fa-eye-slash";const openOrClose=visible?"open":"close";const endExplanation=`should be ${openOrClose} in the "Invisible Elements" panel`;const invisibleElPanel="o_we_invisible_el_panel";return{content:`The eye icon of ${snippetName} ${endExplanation}`,trigger:`.${invisibleElPanel} .o_we_invisible_entry:contains("${snippetName}") i.${eyeIcon}`,};}
function checkEyesIconAfterSave(footerIsHidden=true){const eyeIconChecks=[checkEyeIcon("Header",false),checkEyeIcon("Text - Image",true),checkEyeIcon("Popup",false),checkEyeIcon("Banner",true),];if(footerIsHidden){eyeIconChecks.push(checkEyeIcon("Footer",false));}
return eyeIconChecks;}
registerWebsitePreviewTour("conditional_visibility_1",{edition:true,url:"/",},()=>[...insertSnippet(snippets[0]),...clickOnSnippet(snippets[0]),...changeOptionInPopover("Text - Image","Visibility","Conditionally"),{content:"click on utm medium toggler",trigger:'[data-label="UTM Medium"] ~ div button.dropdown-toggle:contains("Choose a record...")',run:"click",},{trigger:".o_popover input",content:"Search for Email",run:"edit Email",},{trigger:".o_popover .o-dropdown-item:contains('Email')",content:"click on Email",run:"click",},...clickOnSave(),{trigger:".o_website_preview",},{content:"Check if the rule was applied",trigger:":iframe #wrap:not(:visible)",run:function(actions){const style=window.getComputedStyle(this.anchor.getElementsByClassName("s_text_image")[0]);if(style.display!=="none"){console.error("error This item should be invisible and only visible if utm_medium === email");}},},...clickOnEditAndWaitEditMode(),{content:"Check if the element is visible as it should always be visible in edit view",trigger:":iframe #wrap .s_text_image",run:function(actions){const style=window.getComputedStyle(this.anchor);if(style.display==="none"){console.error("error This item should now be visible because utm_medium === email");}},},]);registerWebsitePreviewTour("conditional_visibility_3",{edition:true,url:"/",},()=>[checkEyeIcon("Text - Image",true),...insertSnippet(snippets[1]),...clickOnSnippet(snippets[1]),...changeOptionInPopover("Banner","Visibility","Conditionally"),checkEyeIcon("Banner",true),goBackToBlocks(),...insertSnippet(snippets[2]),{content:"Wait for the popup to display",trigger:":iframe .s_popup .modal_shown",},{content:"Toggle the visibility of the popup",trigger:".o_we_invisible_el_panel .o_we_invisible_entry:contains('Popup')",run:"click",},checkEyeIcon("Popup",false),{content:"Click on footer",trigger:":iframe #wrapwrap footer",run:"click",},{content:"Click on Page Visibility",trigger:"[data-container-title='Footer'] [data-label='Page Visibility'] [data-action-id='setWebsiteFooterVisible'] .form-check-input",run:"click",},checkEyeIcon("Footer",false),{content:"Click on Header",trigger:":iframe #wrapwrap header",run:"click",},...changeOptionInPopover("Header","Header Position","[data-action-value='hidden']"),checkEyeIcon("Header",false),...clickOnSnippet(snippets[1]),...changeOptionInPopover("Banner","Visibility","Conditionally"),{content:"Toggle the visibility of the Banner",trigger:".o_we_invisible_el_panel .o_we_invisible_entry:contains('Banner')",run:"click",},checkEyeIcon("Banner",false),...clickOnSave(),...clickOnEditAndWaitEditMode(),...checkEyesIconAfterSave(),]);registerWebsitePreviewTour("conditional_visibility_4",{edition:true,url:"/",},()=>[...clickOnSnippet(snippets[0]),{content:"Click on the 'move down' option",trigger:".o_overlay_options button.fa-angle-down",run:"click",},...checkEyesIconAfterSave(),{content:"Check the order on the 'Invisible Elements' panel",trigger:".o_we_invisible_el_panel div:nth-child(3):contains('Banner')",},{content:"Toggle the visibility of the Footer",trigger:".o_we_invisible_el_panel .o_we_invisible_entry:contains('Footer')",run:"click",},{content:"Check that the footer is visible",trigger:":iframe #wrapwrap footer",},...clickOnSnippet(snippets[1]),{content:"Drag the 'Banner' snippet to the end of the page",trigger:".o_overlay_options button.o_move_handle",run:"drag_and_drop :iframe #wrapwrap footer",},...checkEyesIconAfterSave(false),{content:"Check the order on the 'Invisible Elements' panel",trigger:".o_we_invisible_el_panel div:nth-child(3):contains('Text - Image')",},]);registerWebsitePreviewTour("conditional_visibility_5",{edition:true,url:"/",},()=>[{content:"Toggle the visibility of the Footer",trigger:".o_we_invisible_el_panel .o_we_invisible_entry:contains('Footer')",run:"click",},{content:"Check that the footer is visible",trigger:":iframe #wrapwrap footer",},goBackToBlocks(),...insertSnippet(snippets[3]),{content:"Click on the image of the dragged snippet",trigger:":iframe .s_text_image[data-snippet=s_image_text] img",run:"click",},{content:"Change visibility of the 'Image - Text' snippet",trigger:"[data-container-title='Column'] [data-label='Visibility'] button[data-action-param='no_desktop']",run:"click",},{content:"Check that the Column has been added in the 'Invisible Elements' panel",trigger:".o_we_invisible_el_panel .o_we_invisible_entry:contains('Column')",},{content:"Click on the 'Image - Text' snippet",trigger:":iframe .s_text_image[data-snippet=s_image_text]",run:"click",},{content:"Change visibility of the 'Image - Text' snippet",trigger:"[data-container-title='Image - Text'] [data-label='Visibility'] button[data-action-param='no_desktop']",run:"click",},{content:"Check that only the 'Image - Text' entry is in the 'Invisible Elements' panel",trigger:".o_we_invisible_el_panel .o_we_invisible_root_parent.o_we_invisible_entry:contains('Image - Text') + .o_we_invisible_entry:not(.o_we_sublevel_1)",},{content:"Click on the 'Image - Text' entry on the 'Invisible Elements' panel",trigger:".o_we_invisible_el_panel .o_we_invisible_root_parent.o_we_invisible_entry:contains('Image - Text')",run:"click",},{content:"Check that the snippet is visible on the website",trigger:":iframe .s_text_image[data-snippet=s_image_text].o_snippet_desktop_invisible.o_snippet_override_invisible",},{content:"Check that the 'Column' entry is in the 'Invisible Elements' panel",trigger:".o_we_invisible_el_panel ul .o_we_invisible_entry.o_we_sublevel_1:contains('Column')",},{content:"Change visibility of the 'Image - Text' snippet",trigger:"[data-container-title='Image - Text'] [data-label='Visibility'] button[data-action-param='no_mobile']",run:"click",},{content:"Check that the 'Image - Text' has been removed from the 'Invisible Elements' panel",trigger:".o_we_invisible_el_panel:not(:visible):not(:has(.o_we_invisible_entry:contains('Image - Text')))",},{content:"Click on the 'Column' entry on the 'Invisible Elements' panel",trigger:".o_we_invisible_el_panel .o_we_invisible_entry:contains('Column')",run:"click",},{content:"Check that the column is visible on the website",trigger:":iframe .s_text_image[data-snippet=s_image_text] .row > .o_snippet_desktop_invisible.o_snippet_override_invisible",},{content:"Change visibility of the 'Image - Text' snippet",trigger:"[data-container-title='Column'] [data-label='Visibility'] button[data-action-param='no_mobile']",run:"click",},{content:"Check that the column has been removed from the 'Invisible Elements' panel",trigger:".o_we_invisible_el_panel:not(:visible):not(:has(.o_we_invisible_entry:contains('Column')))",},{content:"Check that the 'Image - Text' entry has been removed from the 'Invisible Elements' panel",trigger:".o_we_invisible_el_panel:not(:visible):not(:has(.o_we_invisible_entry:contains('Image - Text')))",},{content:"Activate mobile preview",trigger:".o-snippets-top-actions button[data-action='mobile']",run:"click",},{content:"Check that the 'Image - Text' entry is in the 'Invisible Elements' panel",trigger:".o_we_invisible_el_panel .o_we_invisible_entry:contains('Image - Text')",},]);return __exports;});;

/* /website/static/tests/tours/conditional_visibility_frontend.js */
odoo.define('@website/../tests/tours/conditional_visibility_frontend',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("conditional_visibility_2",{url:"/?utm_medium=Email",steps:()=>[{content:"The content previously hidden should now be visible",trigger:"body #wrapwrap",run:function(actions){const style=window.getComputedStyle(this.anchor.getElementsByClassName("s_text_image")[0]);if(style.display==="none"){console.error("error This item should now be visible because utm_medium === email");}},},],});return __exports;});;

/* /website/static/tests/tours/configurator_translation.js */
odoo.define('@website/../tests/tours/configurator_translation',['@web/core/l10n/localization','@web/core/l10n/translation','@web/core/registry','@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{localization}=require("@web/core/l10n/localization");const{translatedTermsGlobal}=require("@web/core/l10n/translation");const{registry}=require("@web/core/registry");const{clickOnEditAndWaitEditMode}=require("@website/js/tours/tour_utils");function runConfiguratorFlow(industrySearchText,featureOrPageName){return[{content:"Click next",trigger:"button.o_configurator_show",run:"click",},{content:"Use browser's Back",trigger:"button.o_change_website_type",run(){window.history.back();},},{content:"Return to description screen",trigger:"button.o_configurator_show",run:"click",},{content:"Select a website type",trigger:"button.o_change_website_type",run:"click",},{content:"Insert a website industry",trigger:".o_configurator_industry input",run:"edit ab",},{content:"Select a website industry from the autocomplete",trigger:`.o_configurator_industry_wrapper ul li a:contains(${industrySearchText})`,run:"click",},{content:"Choose from the objective list",trigger:"button.o_change_website_purpose",run:"click",},{content:"Choose a palette card",trigger:".palette_card",run:"click",},{content:"Select feature or page",trigger:`.card:contains(${featureOrPageName})`,run:"click",},{id:"build_website",content:"Click on build my website",trigger:"button.btn-primary",run:"click",},{content:"Loader should be shown",trigger:".o_website_loader_container",expectUnloadPage:true,},{content:"Wait until the configurator is finished",trigger:":iframe [data-view-xmlid='website.homepage']",timeout:30000,},];}
registry.category("web_tour.tours").add("configurator_translation",{url:"/website/configurator",steps:()=>[...runConfiguratorFlow("in fr","Parseltongue_privacy"),{content:"Check if the current interface language is active and monkey patch terms",trigger:"body",run(){if(localization.code!=="pa_GB"){throw new Error("The user language is not the correct one");}else{translatedTermsGlobal["Save"]="Save_Parseltongue";}},},...clickOnEditAndWaitEditMode(),{content:"exit edit mode",trigger:".o-snippets-top-actions button.btn-success:contains('Save_Parseltongue')",run:"click",},{content:"wait for editor to be closed",trigger:":iframe #wrapwrap:not(.odoo-editor-editable)",},],});registry.category("web_tour.tours").add("configurator_page_creation",{url:"/website/configurator",steps:()=>[...runConfiguratorFlow("abbey","Pricing"),{content:"Open create content menu",trigger:".o_new_content_container button",run:"click",},{content:"Create a new page",trigger:"button[aria-label='New Page']",run:"click",},{content:"Click on landing pages category",trigger:"[data-id='landing']",run:"click",},{content:"Check if configurator pages exist",trigger:"[data-id='landing'] .o_page_template[data-configurator-page]",},{content:"Configurator pages should appear at the start of the landing category",trigger:"[data-id='landing'] .row > :first-child .o_page_template:first-of-type[data-configurator-page]",},{content:"Exit dialog",trigger:".modal-header .btn-close",run:"click",},],});return __exports;});;

/* /website/static/tests/tours/cookies_consent.js */
odoo.define('@website/../tests/tours/cookies_consent',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");function assertGtagConsent(expectedState){const lastDataLayerEntry=window.dataLayer?.at(-1);if(!lastDataLayerEntry||lastDataLayerEntry[0]!=="consent"){console.error("Cookie preference change must push a consent update to dataLayer");return;}
const allConsentValues=Object.values(lastDataLayerEntry[2]);const allValuesMatch=allConsentValues.every((value)=>value===expectedState);if(!allValuesMatch){console.error(`All consent values should be '${expectedState}'`);}}
registry.category("web_tour.tours").add("cookie_bar_updates_gtag_consent",{url:"/",steps:()=>[{content:"Accept all cookies",trigger:"a#cookies-consent-all",run:"click",},{content:"Ensure gtag consent is granted",trigger:"body",run:function(){assertGtagConsent("granted");},},{content:"Go to Cookie Policy page",trigger:"footer a[href='/cookie-policy']",run:"click",expectUnloadPage:true,},{content:"Toggle the cookie bar",trigger:"button.o_cookies_bar_toggle",run:"click",},{content:"Update the preference to only accept essential cookies",trigger:"a#cookies-consent-essential",run:"click",},{content:"Ensure gtag consent is revoked",trigger:"body",run:function(){assertGtagConsent("denied");},},],});return __exports;});;

/* /website/static/tests/tours/create_missing_page.js */
odoo.define('@website/../tests/tours/create_missing_page',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{clickOnSnippet,registerWebsitePreviewTour,changeOption,clickOnSave,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("create_missing_page",{url:"/",edition:true,},()=>[...clickOnSnippet({id:"o_header_standard",name:"Header"}),changeOption("Header","[aria-label='Open menu editor']"),{content:"Open the link dialog (click 'Add Menu Item')",trigger:".modal-body a:eq(0)",run:"click",},{content:"Edit the 'Menu Title' input",trigger:".modal-dialog .o_website_dialog input:eq(0)",run:"edit Zoé’s Diner",},{content:"Check if the 'url' input is correctly slugified.",trigger:".modal-dialog .o_website_dialog input:eq(1):value('zoe-s-diner')",},{content:"Edit the 'url' input",trigger:".modal-dialog .o_website_dialog input:eq(1)",run:"edit /contactus",},{content:"Check whether the page is found.",trigger:".modal-dialog .o_website_dialog main div.position-relative:not(.o_page_not_found)",},{content:"Edit the 'url' input again (with a character that will be ignored at creation)",trigger:".modal-dialog .o_website_dialog input:eq(1)",run:"edit zoe-s-di,ner",},{content:"Check that the page is not found.",trigger:".modal-dialog .o_website_dialog main div.position-relative.o_page_not_found",},{content:"Confirm the new menu entry",trigger:".modal-dialog .o_website_dialog .modal-footer .btn-primary:contains(Continue)",run:"click",},{content:"Drag the new menu item at the top",trigger:'.oe_menu_editor li:contains("Zoé’s Diner") .oi-draggable',run(helpers){return helpers.drag_and_drop('.oe_menu_editor li:contains("Home") .oi-draggable',{position:{top:20,},relative:true,});},},{content:"Click on the 'Create Page' button",trigger:".oe_menu_editor button:contains('Create Page')",run:"click",},{content:"Click on 'Blank Page'",trigger:".o_page_template .o_button_area:not(:visible)",run:"click",},{content:"Wait to land on '/zoe-s-di-ner' page",trigger:':iframe a[href="/zoe-s-di-ner"].nav-link.active',},{content:"Wait edit mode",trigger:".o_builder_sidebar_open",},...clickOnSnippet({id:"o_header_standard",name:"Header"}),changeOption("Header","[aria-label='Open menu editor']"),{content:"Check that the 'Create Page' button is missing.",trigger:".oe_menu_editor .js_menu_label:contains('Zoé’s Diner')",run(){if(this.anchor.closest(".form-control").querySelector("button")?.textContent.includes("Create Page")){throw new Error("The 'Create Page' button should be missing");}},},{content:"Save the menu",trigger:".modal-footer .btn-primary",run:"click",},{content:"Check that we are on the new page.",trigger:":iframe a[href='/zoe-s-di-ner'].nav-link.active",},{content:"Check that it is not a 404 page.",trigger:".o_website_preview:not([data-view-xmlid='website.page_404'])",},{content:"Check that the page title has been correctly set.",trigger:':iframe head title:contains("Zoé’s Diner"):not(:visible)',},{content:"Click on the 'Zoé’s Diner' link.",trigger:":iframe a[href='/zoe-s-di-ner'].nav-link.active span",run:"click",},{content:"Click Edit Menu in the popover.",trigger:".o-we-linkpopover button.js_edit_menu",run:"click",},{content:"Open the link dialog (click 'Add Menu Item')",trigger:".modal-body a:eq(0)",run:"click",},{content:"Edit the 'Menu Title' input",trigger:".modal-dialog .o_website_dialog input:eq(0)",run:"edit The Sea Hotel",},{content:"Edit the 'url' input",trigger:".modal-dialog .o_website_dialog input:eq(1)",run:"edit sea-hotel",},{content:"Confirm the new menu entry",trigger:".modal-dialog .o_website_dialog .modal-footer .btn-primary:contains(Continue)",run:"click",},{content:"Drag the new menu item at the top",trigger:'.oe_menu_editor li:contains("The Sea Hotel") .oi-draggable',run(helpers){return helpers.drag_and_drop('.oe_menu_editor li:contains("Zoé’s Diner") .oi-draggable',{position:{top:20,},relative:true,});},},{content:"Save the menu",trigger:".modal-footer .btn-primary",run:"click",},...clickOnSave(),{content:"Click on the 'The Sea Hotel' link.",trigger:":iframe a[href='/sea-hotel'].nav-link",run:"click",},{content:"Click on the 'Create Page' alert button.",trigger:".o_action_manager .alert a.btn",run:"click",},{content:"Click on 'Blank Page'",trigger:".o_page_template .o_button_area:not(:visible)",run:"click",},{content:"Wait edit mode",trigger:".o_builder_sidebar_open",},{content:"Wait to land on '/sea-hotel' page",trigger:':iframe a[href="/sea-hotel"].nav-link.active',},]);return __exports;});;

/* /website/static/tests/tours/custom_popup_snippet.js */
odoo.define('@website/../tests/tours/custom_popup_snippet',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{clickOnSnippet,insertSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");const snippets=[{id:"s_popup",name:"Popup",groupName:"Content"},{id:"s_banner",name:"Banner",groupName:"Into"},{customID:"s_popup",name:"Custom Popup",groupName:"Custom"},];registerWebsitePreviewTour("custom_popup_snippet",{url:"/",edition:true,},()=>[...insertSnippet(snippets[0]),...clickOnSnippet(snippets[1]),{content:"save this snippet to save later",trigger:".options-container[data-container-title='Popup'] .oe_snippet_save",run:"click",},{content:"confirm and reload custom snippet",trigger:".modal-footer > .btn.btn-primary",run:"click",},{content:"Hide the popup",trigger:".o_we_invisible_entry i",run:"click",},...insertSnippet(snippets[2]),{content:"check whether new custom popup is visible or not.",trigger:":iframe section[data-snippet='s_banner']",},]);return __exports;});;

/* /website/static/tests/tours/default_shape_gets_palette_colors.js */
odoo.define('@website/../tests/tours/default_shape_gets_palette_colors',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{changeOption,clickOnSnippet,insertSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("default_shape_gets_palette_colors",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_text_image",name:"Text - Image",groupName:"Content",}),...clickOnSnippet({id:"s_text_image",name:"Text - Image",}),changeOption("Text - Image","toggleBgShape"),{content:"Check that shape does not have a background-image in its inline style",trigger:":iframe #wrap .s_text_image .o_we_shape",run({queryFirst}){const shape=queryFirst(":iframe :not(.o_ignore_in_tour) #wrap .s_text_image .o_we_shape");if(shape.style.backgroundImage){throw new Error("The default shape has a background-image in its inline style (should rely on the class)");}},},]);return __exports;});;

/* /website/static/tests/tours/drag_and_drop_on_non_editable.js */
odoo.define('@website/../tests/tours/drag_and_drop_on_non_editable',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{insertSnippet,goBackToBlocks,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("test_drag_and_drop_on_non_editable",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_company_team",name:"Team",groupName:"People",}),{content:"Click on an editable media in non editable env.",trigger:":iframe .s_company_team .o_not_editable > .o_editable_media",run:"click",},{content:"Verify that the Replace options is in the editor.",trigger:"[data-label='Media'] button[data-action-id='replaceMedia']",},goBackToBlocks(),{trigger:".o_builder_sidebar_open .o_snippet",},{content:"Drag and drop the Text Highlight building block next to the Team block media.",trigger:".o_block_tab:not(.o_we_ongoing_insertion) .o_snippet[name='Text Highlight'].o_draggable .o_snippet_thumbnail",run:"drag_and_drop :iframe .s_company_team .o_not_editable > .o_editable_media",},{content:"Verify that the Text Highlight building block isn't in a non editable element.",trigger:":iframe .s_company_team :not(.o_not_editable) > .s_text_highlight",},]);return __exports;});;

/* /website/static/tests/tours/drop_404_ir_attachment_url.js */
odoo.define('@website/../tests/tours/drop_404_ir_attachment_url',['@website/js/tours/tour_utils','@website/utils/images'],function(require){'use strict';let __exports={};const{changeOption,insertSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");const{onceAllImagesLoaded}=require("@website/utils/images");registerWebsitePreviewTour("drop_404_ir_attachment_url",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_404_snippet",name:"404 Snippet",groupName:"Images",}),{content:"Click on the snippet image",trigger:":iframe .s_404_snippet img",run:"click",},{trigger:"[data-action-id='replaceMedia']",},{content:"Once the image UI appears, check the image has no size (404)",trigger:":iframe .s_404_snippet img",async run(){const imgEl=this.anchor;await onceAllImagesLoaded(imgEl);if(imgEl.naturalWidth!==0||imgEl.naturalHeight!==0){throw new Error("This is supposed to be a 404 image");}},},changeOption("Image","[data-label='Shape'] .dropdown-toggle"),{content:"Click on the first image shape",trigger:"[data-action-id='setImageShape']",run:"click",},{content:"Once the shape is applied, check the image has now a size (placeholder image)",trigger:':iframe .s_404_snippet img[src^="data:"]',async run(){const imgEl=this.anchor;await onceAllImagesLoaded(imgEl);if(imgEl.naturalWidth===0||imgEl.naturalHeight===0){throw new Error("Even though the original image was a 404, the option should have been applied on the placeholder image");}},},]);return __exports;});;

/* /website/static/tests/tours/dropdowns_and_header_hide_on_scroll.js */
odoo.define('@website/../tests/tours/dropdowns_and_header_hide_on_scroll',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{clickOnSave,changeOptionInPopover,checkIfVisibleOnScreen,insertSnippet,registerWebsitePreviewTour,selectHeader,}=require("@website/js/tours/tour_utils");const checkIfUserMenuNotMasked=function(){return[{content:"Click on the user dropdown",trigger:":iframe #wrapwrap header li.dropdown > a:contains(mitchell admin)",run:"click",},checkIfVisibleOnScreen(":iframe #wrapwrap header li.dropdown .dropdown-menu.show a[href='/my/home']"),];};const scrollDownToMediaList=function(){return{content:"Scroll down the page a little to leave the dropdown partially visible",trigger:":iframe #wrapwrap .s_media_list",run(){this.anchor.scrollIntoView({behavior:"instant"});},};};registerWebsitePreviewTour("dropdowns_and_header_hide_on_scroll",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_media_list",name:"Media List",groupName:"Content"}),selectHeader(),...changeOptionInPopover("Header","Scroll Effect",".dropdown-item:contains('Fixed')"),{content:"Wait for the option to be applied",trigger:"[data-label='Scroll Effect'] .dropdown-toggle:contains('Fixed')",timeout:30000,},{trigger:":iframe #wrapwrap header.o_header_fixed",},selectHeader(),...changeOptionInPopover("Header","Template",".dropdown-item[data-action-param*=sales_two]"),{trigger:":iframe .o_header_sales_two_top",timeout:30000,},{content:"check that header_sales_two_opt is well selected",trigger:":iframe #wrapwrap header.o_header_fixed div[aria-label=Middle] div[role=search]",},...clickOnSave(undefined,30000),...checkIfUserMenuNotMasked(),scrollDownToMediaList(),...checkIfUserMenuNotMasked(),scrollDownToMediaList(),{content:"Type a search query into the searchbar input",trigger:":iframe #wrapwrap header .s_searchbar_input input.search-query",run:"edit a",},checkIfVisibleOnScreen(":iframe #wrapwrap header .s_searchbar_input.show .o_dropdown_menu.show"),]);return __exports;});;

/* /website/static/tests/tours/dynamic_svg_theme_colors.js */
odoo.define('@website/../tests/tours/dynamic_svg_theme_colors',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{assertSvgColors,changeOption,insertSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");const THEME_DOC=document.querySelector("iframe")?.contentDocument||document;const THEME_STYLE=THEME_DOC.defaultView.getComputedStyle(THEME_DOC.documentElement);const COLOR_1=THEME_STYLE.getPropertyValue("--o-color-1");const COLOR_2=THEME_STYLE.getPropertyValue("--o-color-2");const COLOR_3=THEME_STYLE.getPropertyValue("--o-color-3");const COLOR_1_ENC=encodeURIComponent(COLOR_1);const COLOR_2_ENC=encodeURIComponent(COLOR_2);const IMG_SELECTOR=":iframe .s_text_image img[src^='/html_editor/shape/illustration/dynamic-svg-test']";const IMG_SELECTOR_C1C2=`${IMG_SELECTOR}[src*='c1=${COLOR_1_ENC}'][src*='c2=${COLOR_2_ENC}']`;const IMG_SELECTOR_C3=`${IMG_SELECTOR}[src*='c1=o-color-3'][src*='c2=${COLOR_2_ENC}']`;registerWebsitePreviewTour("website_dynamic_svg_theme_colors",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_text_image",name:"Text - Image",groupName:"Content",}),{content:"Set the dynamic SVG image",trigger:":iframe .s_text_image img",run(){this.anchor.setAttribute("src","/html_editor/shape/illustration/dynamic-svg-test"+`?c1=${COLOR_1_ENC}&c2=${COLOR_2_ENC}&unique=4a2363`);},},{content:"Check the SVG uses theme colors",trigger:IMG_SELECTOR_C1C2,async run(){await assertSvgColors(this.anchor,"Dynamic SVG theme colors were not applied.",[COLOR_1,COLOR_2,"#000000",]);},},{content:"Select the dynamic SVG image",trigger:IMG_SELECTOR_C1C2,run:"click",},changeOption("Image",".o_we_color_preview"),{content:"Select o-color-3 in the colorpicker",trigger:".o_colorpicker_section button[data-color='o-color-3']",run:"click",},{content:"Check the SVG uses the new theme color",trigger:IMG_SELECTOR_C3,async run(){await assertSvgColors(this.anchor,"Dynamic SVG color did not update.",[COLOR_3,COLOR_2,"#000000",]);},},changeOption("Image",".o_we_color_preview"),{content:"Reset the colorpicker",trigger:".o_popover button[title='Reset']",run:"click",},{content:"Check the SVG uses the theme colors on reset",trigger:IMG_SELECTOR_C1C2,async run(){await assertSvgColors(this.anchor,"Dynamic SVG theme colors were not restored.",[COLOR_1,COLOR_2,"#000000",]);},},]);return __exports;});;

/* /website/static/tests/tours/edit_link_popover.js */
odoo.define('@website/../tests/tours/edit_link_popover',['@website/js/tours/tour_utils','@web/core/browser/browser','@web/core/utils/patch'],function(require){'use strict';let __exports={};const{insertSnippet,registerWebsitePreviewTour,openLinkPopup,clickToolbarButton,}=require("@website/js/tours/tour_utils");const{browser}=require("@web/core/browser/browser");const{patch}=require("@web/core/utils/patch");const FIRST_PARAGRAPH=":iframe #wrap .s_text_image p:not([data-selection-placeholder]):nth-child(2)";const clickEditLink={content:"Click on Edit Link in Popover",trigger:".o-we-linkpopover .o_we_edit_link",run:"click",};const editLinkAndApply=(url)=>[{content:`Type the link URL ${url}`,trigger:".o-we-linkpopover .o_we_href_input_link",run:`edit ${url}`,},{content:"Save the link by clicking on Apply button",trigger:".o-we-linkpopover .o_we_apply_link",run:"click",},];registerWebsitePreviewTour("edit_link_popover",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_text_image",name:"Text - Image",groupName:"Content",}),{content:"Click on a paragraph",trigger:FIRST_PARAGRAPH,run:"editor Paragraph",},...clickToolbarButton("Paragraph","#wrap .s_text_image p","Add a link",false),...editLinkAndApply("/contactus"),...openLinkPopup(`${FIRST_PARAGRAPH} a`,"/contactus",1,true),{content:"Popover should be shown for contact us",trigger:".o-we-linkpopover .o_we_url_link:contains('Contact Us')",},clickEditLink,...editLinkAndApply("/"),{content:"Remove paragraph selection",trigger:":iframe body",async run(){const el=this.anchor;const sel=el.ownerDocument.getSelection();sel.removeAllRanges();},},...openLinkPopup(`${FIRST_PARAGRAPH} a`,"/",1,true),{content:"Popover should be shown for home",trigger:".o-we-linkpopover .o_we_url_link:contains('Home')",},clickEditLink,{content:"Click on Remove Link in Popover",trigger:".o-we-linkpopover .o_we_remove_link",run:"click",},{content:"Link should be removed",trigger:`${FIRST_PARAGRAPH}:not(:has(a))`,},{content:"Ensure popover is closed",trigger:".o-overlay-container:not(:visible:has(.o-we-linkpopover))",},{content:"Click navbar menu Home",trigger:':iframe .top_menu a:contains("Home")',run:"click",},...openLinkPopup(":iframe #o_main_nav a.nav-link:contains('Home')","/contactus",1,false),{content:"Popover should be shown (2)",trigger:".o-we-linkpopover .o_we_url_link:contains('Home')",},clickEditLink,{content:"Change the URL",trigger:".modal-dialog #url_input",run:"edit /contactus",},{content:"Save the Edit Menu modal",trigger:".modal-footer .btn-primary",run:"click",},...openLinkPopup(":iframe .top_menu a:contains('Home')[href='/contactus']","/contactus",1,true),{content:"Popover should be shown with updated preview data (2)",trigger:".o-we-linkpopover .o_we_url_link:contains('Contact Us')",},{content:"Click on Edit Menu in Popover",trigger:".o-we-linkpopover .js_edit_menu",run:"click",},{content:"Edit Menu (tree) should open",trigger:".o_website_dialog .oe_menu_editor",},{content:"Close modal",trigger:".modal-footer .btn-secondary",run:"click",},{content:"Check that the modal is closed",trigger:":iframe html:not(.modal-body)",},...openLinkPopup(":iframe #o_main_nav a.btn-primary[href='/contactus']","CTA",1,true),{content:"Popover should be shown (3)",trigger:".o-we-linkpopover .o_we_url_link:contains('Contact Us')",},...openLinkPopup(":iframe footer a[href='/']","Footer Home",1,true),{content:"Popover should be shown (4)",trigger:".o-we-linkpopover .o_we_url_link:contains('Home')",},{content:"Click outside the link popover",trigger:":iframe body",run:"click",},{content:"Ensure popover is closed",trigger:".o-overlay-container:not(:visible:has(.o-we-linkpopover))",},{content:"Double click on link",trigger:':iframe footer a[href="/"]',async run(actions){const el=this.anchor;const sel=el.ownerDocument.getSelection();sel.collapse(el.childNodes[1],1);await actions.click();await actions.dblclick();},},{content:"Ensure that the link toolbar is opened",trigger:".o-we-toolbar button[name='link']",},{content:"Click on the link from toolbar",trigger:".o-we-toolbar",run:"click",},...openLinkPopup(":iframe footer a[href='/']","Footer Home",1,true),{content:"Ensure that a click on the link popover link opens a new window in edit mode",trigger:".o-we-linkpopover a.o_we_url_link[target='_blank']",run(actions){patch(browser,{open(url){if(window.location.hostname===url.hostname&&url.pathname.startsWith("/@/")){document.querySelector("body").classList.add("new_backend_window_opened");}},},{pure:true});actions.click();},},{content:"Ensure that link is opened correctly in edit mode",trigger:".new_backend_window_opened",},]);return __exports;});;

/* /website/static/tests/tours/edit_megamenu.js */
odoo.define('@website/../tests/tours/edit_megamenu',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{selectHeader,clickOnEditAndWaitEditMode,changeOptionInPopover,clickOnExtraMenuItem,clickOnSave,openLinkPopup,registerWebsitePreviewTour,clickToolbarButton,}=require("@website/js/tours/tour_utils");const toggleMegaMenu=(stepOptions)=>Object.assign({},{content:"Toggles the mega menu.",trigger:":iframe .top_menu .nav-item a.o_mega_menu_toggle",run(helpers){if(!this.anchor.closest(".o_extra_menu_items")){helpers.click();}},},stepOptions);registerWebsitePreviewTour("edit_megamenu",{url:"/",edition:true,},()=>[{content:"Click on a menu item",trigger:":iframe .top_menu .nav-item .nav-link [data-oe-model='website.menu']",run:"click",},{content:"Click on 'Link' to open Link Dialog",trigger:".o-we-linkpopover .js_edit_menu",run:"click",},{trigger:".o_website_dialog:visible",},{content:"Trigger the link dialog (click 'Add Mega Menu Item')",trigger:".modal-body a:eq(1)",run:"click",},{content:"Write a label for the new menu item",trigger:".modal-dialog .o_website_dialog input",run:"edit Megaaaaa!",},{content:"Confirm the mega menu label",trigger:".modal .modal-footer button:contains(Continue)",run:"click",},{trigger:'.oe_menu_editor [data-is-mega-menu="true"] .js_menu_label:contains("Megaaaaa!")',},{content:"Save the website menu with a new mega menu",trigger:".modal .modal-footer button:contains(save)",run:"click",},{trigger:"body:not(:has(.modal))",},{trigger:".o_builder_sidebar_open",},{trigger:".o_builder_open .o_website_preview:not(.o_is_blocked)",},clickOnExtraMenuItem({},true),toggleMegaMenu({}),{content:"Select the last menu link of the first column",trigger:":iframe .s_mega_menu_odoo_menu .row > div:first-child .nav > :nth-child(6)",run:"click",},{content:"Hit the delete button to remove the menu link",trigger:".o_overlay_options .oe_snippet_remove",run:"click",},{content:"Check that the last menu link was deleted",trigger:":iframe .s_mega_menu_odoo_menu .row > div:first-child .nav:not(:has(:nth-child(6)))",},{content:"Click on the first title item.",trigger:":iframe .o_mega_menu h4",run:"click",},{content:"Press enter.",trigger:":iframe .o_mega_menu h4",run(){this.anchor.dispatchEvent(new window.InputEvent("input",{bubbles:true,inputType:"insertParagraph"}));},},{content:"The menu should still be visible. Edit a menu item.",trigger:":iframe .o_mega_menu h4",run:"editor New Menu Item",},{content:"Press the 'down arrow' key.",trigger:":iframe .o_mega_menu h4",run:"press ArrowDown",},...clickOnSave(),clickOnExtraMenuItem({},true),toggleMegaMenu(),{content:"The menu item should have been renamed.",trigger:':iframe .o_mega_menu h4:contains("New Menu Item")',},]);registerWebsitePreviewTour("megamenu_active_nav_link",{url:"/",edition:true,},()=>[...openLinkPopup(":iframe .top_menu .nav-item a:contains('Home')","Home",1),{content:"Click on 'Link' to open Link Dialog",trigger:".o-we-linkpopover button.js_edit_menu",run:"click",},{trigger:".o_website_dialog",},{content:"Trigger the link dialog (click 'Add Mega Menu Item')",trigger:".modal-body a:eq(1)",run:"click",},{content:"Write a label for the new menu item",trigger:".modal-dialog .o_website_dialog input",run:"edit MegaTron",},{content:"Confirm the mega menu label",trigger:".modal .modal-footer .btn-primary:contains(Continue)",run:"click",},{trigger:`.oe_menu_editor [data-is-mega-menu="true"] .js_menu_label:contains("MegaTron")`,},{content:"Save the website menu with a new mega menu",trigger:".modal-footer .btn-primary",run:"click",},{trigger:"body:not(:has(.modal))",},{content:"Check for the new mega menu",trigger:`:iframe .top_menu:has(.nav-item a.o_mega_menu_toggle:contains("Megatron"))`,},clickOnExtraMenuItem({},true),toggleMegaMenu({}),...openLinkPopup(":iframe .s_mega_menu_odoo_menu .nav-link:contains('Laptops')","Laptops"),{content:"Click on 'Edit Link'",trigger:".o-we-linkpopover a.o_we_edit_link",run:"click",},{content:"Change the link",trigger:".o-we-linkpopover input.o_we_href_input_link",run:"edit /new_page",},...clickOnSave(),clickOnExtraMenuItem({},true),toggleMegaMenu(),{content:"Click on the first menu link of the first column",trigger:":iframe .s_mega_menu_odoo_menu .row > div:first-child .nav > :nth-child(1)",run:"click",},{content:"Check if the new mega menu is active",trigger:`:iframe .top_menu:has(.nav-item a.o_mega_menu_toggle.active:contains("MegaTron"))`,},]);registerWebsitePreviewTour("edit_megamenu_big_icons_subtitles",{url:"/",edition:true,},()=>[...openLinkPopup(":iframe .top_menu .nav-item a","Home",1),{content:"Click on 'Link' to open Link Dialog",trigger:".o-we-linkpopover .js_edit_menu",run:"click",},{trigger:".o_website_dialog",},{content:"Trigger the link dialog (click 'Add Mega Menu Item')",trigger:".modal-body a:eq(1)",run:"click",},{content:"Write a label for the new menu item",trigger:".modal-dialog .o_website_dialog input",run:"edit Megaaaaa2!",},{content:"Confirm the mega menu label",trigger:".modal .modal-footer .btn-primary:contains(Continue)",run:"click",},{trigger:'.oe_menu_editor [data-is-mega-menu="true"] .js_menu_label:contains("Megaaaaa2!")',},{content:"Save the website menu with a new mega menu",trigger:".modal-footer .btn-primary",run:"click",},{trigger:"body:not(:has(.modal))",},{content:"Check for the new mega menu",trigger:':iframe .top_menu:has(.nav-item a.o_mega_menu_toggle:contains("Megaaaaa2!"))',},clickOnExtraMenuItem({},true),toggleMegaMenu({}),{content:"Select the first menu link of the first column",trigger:":iframe .s_mega_menu_odoo_menu .row > div:first-child .nav > :first-child",run:"click",},...changeOptionInPopover("Mega Menu","Template","[title='Big Icons Subtitles']"),...clickToolbarButton("h4 of first menu link of the first column",".s_mega_menu_big_icons_subtitles .row > div:first-child .nav > :first-child h4","Toggle bold"),...clickOnSave(),clickOnExtraMenuItem({},true),toggleMegaMenu(),{content:"The menu item should only convert selected text to Bold.",trigger:":iframe .s_mega_menu_big_icons_subtitles .row > div:first-child .nav > :first-child span:not(:has(strong))",},]);const createMegaMenu=function(name){return[{content:"Create a new mega menu item",trigger:".modal-body a:eq(1)",run:"click",},{content:"Set the mega menu item name to "+name,trigger:".modal:not(.o_inactive_modal) .modal-dialog .o_website_dialog input:eq(0)",run:"edit "+name,},{trigger:".modal:not(.o_inactive_modal) .modal-footer .btn-primary",run:"click",},];};const createDropdown=function(name){return[{content:"Create a new menu item for the dropdown",trigger:".modal-body a:eq(0)",run:"click",},{content:"Set the dropdown name to "+name,trigger:".modal:not(.o_inactive_modal) .modal-dialog .o_website_dialog input:eq(0)",run:"edit "+name,},{trigger:".modal:not(.o_inactive_modal) .modal-dialog .o_website_dialog input:eq(1)",run:"edit /",},{trigger:".modal:not(.o_inactive_modal) .modal-footer .btn-primary",run:"click",},{content:"Create a new menu item for the dropdown item",trigger:".modal-body a:eq(0)",run:"click",},{trigger:".modal:not(.o_inactive_modal) .modal-dialog .o_website_dialog input:eq(0)",run:"edit "+name+" item",},{trigger:".modal:not(.o_inactive_modal) .modal-dialog .o_website_dialog input:eq(1)",run:"edit /",},{trigger:".modal:not(.o_inactive_modal) .modal-footer .btn-primary",run:"click",},{content:"Move the dropdown item into the dropdown",trigger:'.oe_menu_editor li:contains("'+name+" item"+'") .oi-draggable',run(helpers){return helpers.drag_and_drop('.oe_menu_editor li:contains("'+name+'")',{position:{left:50,top:5,},relative:true,});},},];};const testHeaderNavVisibility=function(elementsVisibility){const test=[];for(const[menu,visibility]of Object.entries(elementsVisibility)){test.push({trigger:`:iframe .top_menu li:contains('${menu}')${
                visibility ? ":visible" : ":not(:visible)"
            }`,});}
return test;};const openMenu=()=>({content:"Open Menu",trigger:":iframe span.navbar-toggler-icon",run:"click",});registerWebsitePreviewTour("edit_megamenu_visibility",{url:"/",edition:true,},()=>[{content:"Click on a menu item",trigger:":iframe .top_menu .nav-item a span",run:"click",},{content:"Click on Edit Menu",trigger:".o-we-linkpopover button.js_edit_menu",run:"click",},{trigger:".o_website_dialog:visible",},...createMegaMenu("MM des"),...createDropdown("Drop 1"),...createMegaMenu("MM mob"),...createDropdown("Drop 2"),...createMegaMenu("MM cond"),{trigger:".modal:not(.o_inactive_modal) .modal-footer .btn-primary:contains(save)",run:"click",},selectHeader(),...changeOptionInPopover("Header","Template",".dropdown-item[data-action-param*=hamburger]"),{trigger:":iframe span.navbar-toggler-icon",timeout:30000,},openMenu(),{content:"Open the first mega menu",trigger:":iframe header#top span:contains('MM des')",run:"click",},{content:"Click on the first mega menu content",trigger:":iframe header#top div.o_mega_menu.show section",run:"click",},{trigger:'.options-container [data-label="Visibility"] button[data-action-param="no_mobile"]',run:"click",},{content:"Open the second mega menu",trigger:":iframe header#top span:contains('MM mob')",run:"click",},{content:"Click on the second mega menu content",trigger:":iframe header#top div.o_mega_menu.show section",run:"click",},{trigger:'.options-container [data-label="Visibility"] button[data-action-param="no_desktop"]',run:"click",},{content:"Open the third mega menu",trigger:":iframe header#top span:contains('MM cond')",run:"click",},{content:"Click on the third mega menu content",trigger:":iframe header#top div.o_mega_menu.show section",run:"click",},...changeOptionInPopover("Block","Visibility","Conditionally"),...changeOptionInPopover("Block","Users","Visible for Logged Out"),...clickOnSave(),openMenu(),...testHeaderNavVisibility({"MM des":true,"Drop 1":true,"MM mob":false,"Drop 2":true,"MM cond":false,}),{content:"Switch to mobile view",trigger:".o_mobile_preview > a",run:"click",},openMenu(),...testHeaderNavVisibility({"MM des":false,"Drop 1":true,"MM mob":true,"Drop 2":true,"MM cond":false,}),...clickOnEditAndWaitEditMode(),...testHeaderNavVisibility({"MM des":true,"Drop 1":true,"MM mob":true,"Drop 2":true,"MM cond":true,}),{content:"Switch to desktop view",trigger:"button:has(> span.fa-mobile)",run:"click",},openMenu(),...testHeaderNavVisibility({"MM des":true,"Drop 1":true,"MM mob":true,"Drop 2":true,"MM cond":true,}),]);return __exports;});;

/* /website/static/tests/tours/edit_menus.js */
odoo.define('@website/../tests/tours/edit_menus',['@web/core/utils/concurrency','@web/core/registry','@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{delay}=require("@web/core/utils/concurrency");const{registry}=require("@web/core/registry");const{clickOnEditAndWaitEditMode,clickOnExtraMenuItem,clickOnSave,goBackToBlocks,insertSnippet,openLinkPopup,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");registry.category("web_tour.tours").add("parent_child_menu",{steps:()=>[{content:"Open Menu Form View",trigger:".o_list_button_add",run:"click",},{content:"Insert Menu Name",trigger:"input[id='name_0']",run:"edit Parent",},{content:"Insert Menu URL",trigger:"input[id='url_0']",run:"edit /parent",},{content:"Click on Save Button",trigger:".o_form_button_save",run:"click",},{content:"Wait for the record to be saved",trigger:".o_form_button_save:not(:visible)",},{content:"Click on Add a line button",trigger:"div[name='child_id'] td.o_field_x2many_list_row_add a",run:"click",},{content:"Insert Child Menu Name",trigger:".o_dialog input[id='name_0']",run:"edit Child",},{content:"Insert Child Menu URL",trigger:".o_dialog input[id='url_0']",run:"edit /child",},{content:"Click on Save & Close Button",trigger:"button:contains(Save & Close)",run:"click",},{content:"Click on Save Button",trigger:".o_form_button_save",run:"click",},{content:"Check the Parent's URL",trigger:"div[name='url']:contains('#')",},{content:"Check the Child's URL",trigger:"td[name='url']:contains('/child')",},],});registerWebsitePreviewTour("edit_menus",{url:"/",},()=>[{trigger:":iframe #wrapwrap",},{content:"open site menu",trigger:'button[data-menu-xmlid="website.menu_site"]',run:"click",},{content:"Click on Edit Menu",trigger:'a[data-menu-xmlid="website.menu_edit_menu"]',run:"click",},{trigger:".o_website_dialog:visible",},{content:"Trigger the link dialog (click 'Add Mega Menu Item')",trigger:".modal:not(.o_inactive_modal) .modal-body a:eq(1)",run:"click",},{content:"Write a label for the new menu item",trigger:".modal:not(.o_inactive_modal) .modal-dialog .o_website_dialog input",run:"edit Megaaaaa!",},{content:"Confirm the mega menu label",trigger:".modal:not(.o_inactive_modal) .modal-footer .btn-primary:contains(Continue)",run:"click",},{trigger:'.oe_menu_editor [data-is-mega-menu="true"] .js_menu_label:contains("Megaaaaa!")',},{content:"Save the new menu",trigger:".modal-footer .btn-primary",run:"click",},{trigger:"body:not(:has(.oe_menu_editor))",},{trigger:":iframe body:contains(welcome to your)",},clickOnExtraMenuItem({},true),{content:"There should be a new megamenu item.",trigger:':iframe .top_menu .nav-item a.o_mega_menu_toggle:contains("Megaaaaa!")',},...clickOnEditAndWaitEditMode(),...openLinkPopup(":iframe .top_menu .nav-item a:contains('Home')","Home",1),{content:"Click on Edit Menu",trigger:".o-we-linkpopover .js_edit_menu",run:"click",},{trigger:".o_website_dialog:visible",},{content:"Trigger the link dialog (click 'Add Menu Item')",trigger:".modal-body a:eq(0)",run:"click",},{trigger:".modal:not(.o_inactive_modal) .modal-dialog .o_website_dialog input:eq(0)",},{content:"Confirm the new menu entry without a label",trigger:".modal:not(.o_inactive_modal) .modal-footer .btn-primary:contains(Continue)",run:"click",},{content:"It didn't save without a label. Fill label input.",trigger:".modal:not(.o_inactive_modal) .modal-dialog .o_website_dialog input:eq(0)",run:"edit Random!",},{content:"Remove the URL input value",trigger:".modal:not(.o_inactive_modal) .modal-dialog .o_website_dialog input#url_input",run:"edit ",},{content:"Confirm the new menu entry without a url",trigger:".modal:not(.o_inactive_modal) .modal-footer .btn-primary:contains(Continue)",run:"click",},{content:"Re-open the link dialog ",trigger:'.modal .input-group:has(.js_menu_label:contains("Random!")) .js_edit_menu',run:"click",},{content:"Check that the URL is #",trigger:".modal:not(.o_inactive_modal) #url_input:value('#')",},{content:"Save the dialog",trigger:".modal:not(.o_inactive_modal) .modal-footer .btn-primary:contains(Continue)",run:"click",},{trigger:'.oe_menu_editor .js_menu_label:contains("Random!")',},{content:"Save the website menu with the new entry",trigger:".modal:not(.o_inactive_modal) .modal-footer .btn-primary",run:"click",},{trigger:"body:not(:has(.modal))",},clickOnExtraMenuItem({},true),...openLinkPopup(":iframe .top_menu .nav-item a:contains('Random!')","Random!",1),{content:"navbar shouldn't have any zwnbsp and no o_link_in_selection class",trigger:':iframe nav.navbar:not(:has(.o_link_in_selection)):not(:contains("\ufeff"))',},{content:"Click on Edit Link",trigger:".o-we-linkpopover a.o_we_edit_link",run:"click",},{content:"Change the label",trigger:".modal-dialog .o_website_dialog input:eq(0)",run:"edit Modnar",},{content:"Confirm the new label",trigger:".modal-footer .btn-primary",run:"click",},...clickOnSave(),clickOnExtraMenuItem({},true),{content:"Label should have changed",trigger:':iframe .top_menu .nav-item a:contains("Modnar")',},...clickOnEditAndWaitEditMode(),{content:"Wait for the builder sidebar to fully open",trigger:":iframe .editor_enable",run:async function(){await delay(200);},},clickOnExtraMenuItem({},true),...openLinkPopup(":iframe .top_menu .nav-item a:contains('Modnar')","Modnar",1),{content:"Click on the popover Edit Menu button",trigger:".o-we-linkpopover .js_edit_menu",run:"click",},{content:"Click on the dialog Edit Menu button",trigger:'.oe_menu_editor .js_menu_label:contains("Modnar")',run(){const liEl=this.anchor.closest("[data-menu-id]");liEl.querySelector("button.js_edit_menu").click();},},{content:"Change the label",trigger:".modal:not(.o_inactive_modal) .modal-dialog .o_website_dialog input:eq(0)",run:"edit Modnar !!",},{content:"Confirm the new menu label",trigger:".modal:not(.o_inactive_modal) .modal-footer button:contains(Continue)",run:"click",},{trigger:'.oe_menu_editor .js_menu_label:contains("Modnar !!")',},{content:"Save the website menu with the new menu label",trigger:".modal:not(.o_inactive_modal) .modal-footer button:contains(save)",run:"click",},{trigger:"body:not(:has(.oe_menu_editor))",},goBackToBlocks(),...insertSnippet({id:"s_media_list",name:"Media List",groupName:"Content"}),...clickOnSave(),clickOnExtraMenuItem({},true),{content:"Label should have changed",trigger:':iframe .top_menu .nav-item a:contains("Modnar !!")',},{content:"Click on the extra menu dropdown toggle if it is there to close it",trigger:":iframe .top_menu",async run(actions){const extraMenuButtonEl=this.anchor.querySelector(".o_extra_menu_items a.nav-link");if(extraMenuButtonEl&&extraMenuButtonEl.classList.contains("show")){const dropdownFullyClosed=Promise.withResolvers();extraMenuButtonEl.addEventListener("hidden.bs.dropdown",dropdownFullyClosed.resolve,{once:true});await actions.click(extraMenuButtonEl);await dropdownFullyClosed.promise;}},},{content:"open site menu",trigger:'button[data-menu-xmlid="website.menu_site"]',run:"click",},{content:"Click on Edit Menu",trigger:'a[data-menu-xmlid="website.menu_edit_menu"]',run:"click",},{content:`Drag "Contact Us" menu below "Home" menu`,trigger:'.oe_menu_editor li:contains("Contact us") .oi-draggable',run(helpers){return helpers.drag_and_drop('.oe_menu_editor li:contains("Home")',{position:{top:57,left:5,},relative:true,});},},{content:"Drag 'Contact Us' item as a child of the 'Home' item",trigger:'.oe_menu_editor li:contains("Contact us") .oi-draggable',run:'drag_and_drop .oe_menu_editor li:contains("Contact us") .form-control',},{content:"Wait for drop",trigger:'.oe_menu_editor li:contains("Home") ul li:contains("Contact us")',},{content:"Drag Mega at the top",trigger:'.oe_menu_editor li:contains("Megaaaaa!") .oi-draggable',run(helpers){return helpers.drag_and_drop('.oe_menu_editor li:contains("Home") .oi-draggable',{position:{top:20,},relative:true,});},},{content:"Wait for drop",trigger:'.oe_menu_editor:first-child:contains("Megaaaaa!")',},{content:"Save the website menu with new nested menus",trigger:".modal-footer .btn-primary",run:"click",},{content:"Menu item should have a child",trigger:':iframe .top_menu .nav-item a.dropdown-toggle:contains("Home")',run:"click",},{content:"When menu item is opened, child item must appear in the shown menu",trigger:':iframe .top_menu .nav-item:contains("Home") ul.show li a.dropdown-item:contains("Contact us")[href="/contactus"]',run(){this.anchor.closest("body").querySelector(".o_footer_copyright_name").scrollIntoView({block:"start",inline:"nearest",behavior:"smooth"});},},{content:"The Home menu should be closed",trigger:':iframe .top_menu .nav-item:contains("Home"):has(ul:not(.show))',},{content:"Open the Home menu after scroll",trigger:':iframe .top_menu .nav-item a.dropdown-toggle:contains("Home")',async run(helpers){await delay(1000);await helpers.click();},},{content:"Check that the Home menu is opened",trigger:':iframe .top_menu .nav-item:contains("Home") ul.show li'+' a.dropdown-item:contains("Contact us")[href="/contactus"]',},{content:"Close the Home menu",trigger:':iframe .top_menu .nav-item:has(a.dropdown-toggle:contains("Home"))',run:"click",},{content:"Check that the Home menu is closed",trigger:':iframe .top_menu .nav-item:contains("Home"):has(ul:not(.show))',},{content:"Open the mega menu",trigger:':iframe .top_menu .nav-item a.o_mega_menu_toggle:contains("Megaaaaa!")',run:"click",},{content:"When the mega menu is opened, scroll up",trigger:":iframe .top_menu .o_mega_menu_toggle.show",run(){const marginTopOfMegaMenu=getComputedStyle(this.anchor.closest(".dropdown").querySelector(".o_mega_menu"))["margin-top"];if(marginTopOfMegaMenu!=="0px"){console.error("The margin-top of the mega menu should be 0px");}
this.anchor.closest("body").querySelector(".s_media_list_item:nth-child(2)").scrollIntoView(true);},},{content:"Check that the mega menu is closed",trigger:':iframe .top_menu .nav-item:contains("Megaaaaa!"):has(div[data-name="Mega Menu"]:not(.show))',},{content:"Open the mega menu after scroll",trigger:':iframe .top_menu .nav-item a.o_mega_menu_toggle:contains("Megaaaaa!")',run:"click",},{content:"Check that the mega menu is opened",trigger:':iframe .top_menu .nav-item:has(a.o_mega_menu_toggle:contains("Megaaaaa!")) '+".s_mega_menu_odoo_menu",},...clickOnEditAndWaitEditMode(),{trigger:":iframe main section.s_media_list .s_media_list_item:eq(2) h3:contains(post)",},{content:"Open nested menu item",trigger:':iframe .o_top_fixed_element .nav-item:contains("Home"):nth-child(2) .dropdown-toggle',run:"click",},{content:"Press the 'down arrow' key.",trigger:':iframe .top_menu .nav-item:contains("Home") li:contains("Contact us")',run:"press ArrowDown",},...clickOnSave(),{content:"Open site menu",trigger:'button[data-menu-xmlid="website.menu_site"]',run:"click",},{content:"Click on Edit Menu",trigger:'a[data-menu-xmlid="website.menu_edit_menu"]',run:"click",},{content:"Trigger link dialog (click 'Add Menu Item')",trigger:".modal-body a:eq(0)",run:"click",},{content:"Write a label for the new menu item",trigger:".modal-dialog .o_website_dialog input:eq(0)",run:"edit new_menu",},{content:"Write a url for the new menu item",trigger:".modal-dialog .o_website_dialog input:eq(1)",run:"edit #",},{content:"Confirm the new menu entry",trigger:".modal:not(.o_inactive_modal) .modal-footer .btn-primary:contains(Continue)",run:"click",},{content:"Check if new menu(new_menu) is added",trigger:'.oe_menu_editor li:contains("new_menu")',},{content:"Trigger link dialog (click 'Add Menu Item')",trigger:".modal-body a:eq(0)",run:"click",},{content:"Write a label for the new menu item",trigger:".modal-dialog .o_website_dialog input:eq(0)",run:"edit new_nested_menu",},{content:"Write a url for the new menu item",trigger:".modal-dialog .o_website_dialog input:eq(1)",run:"edit #",},{content:"Confirm the new menu entry",trigger:".modal:not(.o_inactive_modal) .modal-footer .btn-primary:contains(Continue)",run:"click",},{content:"Check if new menu(new_nested_menu) is added",trigger:'.oe_menu_editor li:contains("new_nested_menu")',},{content:"Nest 'new_nested_menu' under 'new_menu'",trigger:'.oe_menu_editor li:contains("new_nested_menu") .oi-draggable',run(helpers){return helpers.drag_and_drop(".oe_menu_editor li:contains('new_menu') .form-control",{position:"bottom",});},},{content:"Drag 'Modnar !!' below 'new_menu'",trigger:'.oe_menu_editor li:contains("Modnar !!") .oi-draggable',run(helpers){return helpers.drag_and_drop('.oe_menu_editor li:contains("new_menu") .oi-draggable',{position:"bottom",});},},{content:"Nest 'Modnar !!' under 'new_menu'",trigger:'.oe_menu_editor li:contains("Modnar !!") .oi-draggable',run(helpers){return helpers.drag_and_drop(".oe_menu_editor li:contains('new_menu') .form-control",{position:"bottom",});},},{content:"Check if 'new_nested_menu' and 'Modnar !!' is nested under 'new_menu'",trigger:'.oe_menu_editor li:contains("new_menu") > ul > li:contains("Modnar !!") + li:contains("new_nested_menu")',},{content:"Move 'Modnar !!' below 'new_nested_menu' inside the 'new_menu'",trigger:'.oe_menu_editor  li:contains("new_menu") > ul > li:contains("Modnar !!") .oi-draggable',run(helpers){return helpers.drag_and_drop(".oe_menu_editor  li:contains('new_menu') > ul > li:contains('new_nested_menu') .oi-draggable",{position:"bottom",});},},{content:"Check if 'Modnar !!' is now below 'new_nested_menu' in 'new_menu'",trigger:'.oe_menu_editor li:contains("new_menu") > ul > li:last-child:contains("Modnar !!")',},]);registerWebsitePreviewTour("edit_menus_delete_parent",{url:"/",},()=>[{trigger:":iframe #wrapwrap",},{content:"Open site menu",trigger:'button[data-menu-xmlid="website.menu_site"]',run:"click",},{content:"Click on Edit Menu",trigger:'a[data-menu-xmlid="website.menu_edit_menu"]',run:"click",},{content:"Delete Home menu",trigger:".modal-body ul li:nth-child(1) button.js_delete_menu",run:"click",},{content:"Save",trigger:".modal-footer button:first-child",run:"click",},]);return __exports;});;

/* /website/static/tests/tours/edit_translated_page.js */
odoo.define('@website/../tests/tours/edit_translated_page',['@web/core/registry','@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{clickOnEditAndWaitEditModeInTranslatedPage}=require("@website/js/tours/tour_utils");registry.category("web_tour.tours").add("edit_translated_page_redirect",{url:"/nl/contactus",steps:()=>[{content:"Enter backend",trigger:"a.o_frontend_to_backend_edit_btn",run:"click",expectUnloadPage:true,},{content:"Check the data-for attribute",trigger:':iframe main span[data-for="contactus_form"]:not(:visible)',},...clickOnEditAndWaitEditModeInTranslatedPage(),{content:"Go to /nl",trigger:"body",run:()=>{location.href="/nl";},expectUnloadPage:true,},{content:"Enter backend",trigger:"a.o_frontend_to_backend_edit_btn",run:"click",expectUnloadPage:true,},...clickOnEditAndWaitEditModeInTranslatedPage(),],});return __exports;});;

/* /website/static/tests/tours/editable_root_as_custom_snippet.js */
odoo.define('@website/../tests/tours/editable_root_as_custom_snippet',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{changeOption,clickOnEditAndWaitEditMode,clickOnSave,clickOnSnippet,insertSnippet,registerWebsitePreviewTour,goBackToBlocks,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("editable_root_as_custom_snippet",{edition:true,url:"/custom-page",},()=>[...clickOnSnippet(".s_title.custom[data-oe-model][data-oe-id][data-oe-field][data-oe-xpath]"),changeOption("Title",".oe_snippet_save"),{content:"Confirm modal",trigger:".modal-footer .btn-primary",run:"click",},goBackToBlocks(),{content:"Wait for the custom category to appear in the panel",trigger:'.o_snippet[name="Custom"]',},...clickOnSave(),{content:"Go to homepage",trigger:':iframe a[href="/"].nav-link',run:"click",},{content:"Wait to land on homepage",trigger:':iframe a[href="/"].nav-link.active',},...clickOnEditAndWaitEditMode(),...insertSnippet({customID:"s_title",name:"Custom Title",groupName:"Custom"}),{content:"Check that the custom snippet does not have branding",trigger:":iframe #wrap .s_title.custom:not([data-oe-model]):not([data-oe-id]):not([data-oe-field]):not([data-oe-xpath])",},]);return __exports;});;

/* /website/static/tests/tours/font_family.js */
odoo.define('@website/../tests/tours/font_family',['@website/js/tours/tour_utils','@web/core/utils/patch'],function(require){'use strict';let __exports={};const{registerWebsitePreviewTour,goToTheme}=require("@website/js/tours/tour_utils");const{patch}=require("@web/core/utils/patch");registerWebsitePreviewTour("website_font_family",{url:"/",edition:true,},()=>[...goToTheme(),{content:"Click on the heading font family selector",trigger:"[data-container-title='Headings'] [data-label='Font Family'] .dropdown-toggle",run:"click",},{content:"Click on the 'Arvo' font we-button from the font selection list.",trigger:`.o_popover [data-action-value="'Arvo'"]`,run:"click",},{content:"Verify that the 'Arvo' font family is correctly applied to the heading.",trigger:"button.dropdown-toggle span[style*='font-family: Arvo;']",},{content:"Open the heading font family selector",trigger:"button:has(span[style*='font-family: Arvo;'])",run:"click",},{trigger:"[data-container-title='Headings'] [data-label='Font Family'] .dropdown-toggle",run:function(){const options=odoo.loader.modules.get("@website/builder/plugins/customize_website_plugin")["CustomizeWebsitePlugin"];patch(options.prototype,{async reloadBundles(){console.error("The font family selector value get reload to its default.");},});},},{content:"Click on the 'Add a custom font' button",trigger:".o_popover .o_we_add_font_btn",run:"click",},{content:"Wait for the modal to open and then refresh",trigger:"body .o_dialog button.btn-secondary",run:"click",},{content:"Check that 'Arvo' font family is still applied and not reverted",trigger:"button:has(span[style*='font-family: Arvo;'])",},]);return __exports;});;

/* /website/static/tests/tours/gray_color_palette.js */
odoo.define('@website/../tests/tours/gray_color_palette',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{goToTheme,registerWebsitePreviewTour,clickOnSave}=require("@website/js/tours/tour_utils");function waitForCSSReload(){return[{content:"Wait for no loading",trigger:"body:not(:has(.o_we_ui_loading)) :iframe body:not(:has(.o_we_ui_loading))",},];}
registerWebsitePreviewTour("website_gray_color_palette",{url:"/",edition:true,},()=>[...goToTheme(),{content:"Toggle gray color palette",trigger:".we-bg-options-container [data-label=Grays] div",run:"click",},{content:"Drag the hue slider",trigger:".o_we_slider_tint [data-action-param=gray-hue] input",run:"range 100",},...waitForCSSReload(),{content:"Check the preview of the gray 900 after hue change",trigger:".o_we_gray_preview span[variable='900'][style='background-color: #242921 !important']",},{content:"Drag the saturation slider",trigger:"div[data-action-param=gray-extra-saturation] input",run:"range 15",},...waitForCSSReload(),{content:"Check the preview of the gray 900 after saturation change",trigger:".o_we_gray_preview span[variable='900'][style='background-color: #222F1B !important']",},...clickOnSave(),{content:"Check value of the gray 900 color",trigger:":iframe #wrapwrap:not(.odoo-editor-editable)",run(){const iframeEl=document.querySelector(".o_website_preview iframe");const styles=getComputedStyle(iframeEl.contentDocument.documentElement);if(styles.getPropertyValue("--900").trim()!=="#222F1B"){throw new Error("The value for the gray 900 is not right");}},},]);return __exports;});;

/* /website/static/tests/tours/grid_layout.js */
odoo.define('@website/../tests/tours/grid_layout',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{changeOption,clickOnSave,clickOnSnippet,insertSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");const snippet={id:"s_text_image",name:"Text - Image",groupName:"Content",};registerWebsitePreviewTour("website_replace_grid_image",{url:"/",edition:true,},()=>[...insertSnippet(snippet),{trigger:`:iframe:has(#wrap[contenteditable='true'])`,},...clickOnSnippet(snippet),{content:"Toggle to grid mode",trigger:"[data-action-id='setGridLayout']",run:"click",},{content:"Replace image",trigger:":iframe .s_text_image img",run:"dblclick",},{content:"Pick new image",trigger:'.o_select_media_dialog .o_button_area[aria-label="s_banner_default_image.jpg"]',run:"click",},{content:"Add new image column",trigger:"[data-action-id='addGridElement'][data-action-param='image']",run:"click",},{content:"Pick new image",trigger:'.o_select_media_dialog .o_button_area[aria-label="s_banner_default_image2.webp"]',run:"click",},{content:"Replace new image",trigger:':iframe .s_text_image img[src*="s_banner_default_image2.webp"]',run:"dblclick",},{content:"Pick new image",trigger:'.o_select_media_dialog .o_button_area[aria-label="s_banner_default_image.jpg"]',run:"click",},...clickOnSave(),]);registerWebsitePreviewTour("scroll_to_new_grid_item",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_text_image",name:"Text - Image",groupName:"Content"}),...insertSnippet({id:"s_image_text",name:"Image - Text",groupName:"Content"}),...insertSnippet({id:"s_image_text",name:"Image - Text",groupName:"Content"}),...clickOnSnippet({id:"s_text_image",name:"Text - Image"}),changeOption("Text - Image","setGridLayout"),changeOption("Text - Image","[data-action-id='addGridElement'][data-action-param='image']"),{content:"Select the new image in the media dialog",trigger:'.o_select_media_dialog .o_button_area[aria-label="s_banner_default_image.jpg"]',run:"click",},{content:"Check that the page scrolled to the new grid item",trigger:":iframe .s_text_image .o_grid_item:nth-child(3)",async run(){await new Promise((r)=>setTimeout(r,500));const newItemPosition=this.anchor.getBoundingClientRect();if(newItemPosition.top<0){throw new Error("The page did not scroll to the new grid item.");}
document.body.classList.add("o_scrolled_to_grid_item");},},{content:"Make sure the scroll check is done",trigger:".o_scrolled_to_grid_item",},...clickOnSave(),]);return __exports;});;

/* /website/static/tests/tours/hide_sidebar_header.js */
odoo.define('@website/../tests/tours/hide_sidebar_header',['@web_tour/tour_utils','@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{stepUtils}=require("@web_tour/tour_utils");const{clickOnSave,goToTheme,registerWebsitePreviewTour}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("hide_sidebar_header",{url:"/",edition:true,},()=>[{content:"Click on the header",trigger:":iframe #o_main_nav",run:"click",},{content:"Click on header template",trigger:".hb-row[data-label='Template'] button.o-hb-select-toggle",run:"click",},{content:"Change header template to 'Sidebar'",trigger:".dropdown-menu .o-hb-select-dropdown-item[title='Sidebar']",run:"click",},{content:"Wait for the builder to mount after iframe reload",trigger:":iframe body.editor_enable",},{content:"Check that the header changed to 'Sidebar'",trigger:":iframe #wrapwrap>header.o_header_sidebar",},{content:"Check that the builder is not disabled",trigger:".o-website-builder_sidebar:not(:has(.o_builder_disabled))",},...goToTheme(),{content:"Toggle 'Show Header' off",trigger:".hb-row[data-label='Show Header'] input[type='checkbox']",run:"click",},stepUtils.waitIframeIsReady(),{content:"Check that the header has been hidden",trigger:":iframe #wrapwrap:not(:has(:scope > header))",},{content:"Check that there's no header padding on the #wrapwrap",trigger:":iframe #wrapwrap",run(){const style=getComputedStyle(this.anchor);if(style.paddingLeft!=="0px"){throw new Error("There shouldn't be padding for the header");}},},...clickOnSave(),]);return __exports;});;

/* /website/static/tests/tours/html_editor.js */
odoo.define('@website/../tests/tours/html_editor',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{clickOnSave,registerWebsitePreviewTour}=require("@website/js/tours/tour_utils");const adminCssModif="#wrap {display: none;}";const demoCssModif="// demo_edition";registerWebsitePreviewTour("html_editor_language",{url:"/test_page",},()=>[{content:"Wait the content is loaded and html/css editor is in menu before clicking on open site menu",trigger:":iframe main:contains(rommelpot)",},{content:"open site menu",trigger:'button[data-menu-xmlid="website.menu_site"]',run:"click",},{content:"open html editor",trigger:'a[data-menu-xmlid="website.menu_ace_editor"]',run:"click",},{content:"add something in the page's default language version",trigger:'div.ace_line .ace_xml:contains("rommelpot")',run:()=>{ace.edit(document.querySelector("#resource-editor div")).getSession().insert({row:1,column:1,},'<div class="test_language"/>\n');},},{content:"save the html editor",trigger:'body:has(div.ace_line .ace_xml:contains("test_language")) .o_resource_editor .btn-primary',run:"click",},{content:"check that the page has the modification",trigger:":iframe #wrapwrap:has(.test_language)",},{content:"check that the page has not lost the original text",trigger:':iframe #wrapwrap:contains("rommelpot")',},]);registerWebsitePreviewTour("html_editor_multiple_templates",{url:"/generic",edition:true,},()=>[{content:"drop a snippet group",trigger:".o-website-builder_sidebar .o_snippet[name=Intro].o_draggable .o_snippet_thumbnail",run:"drag_and_drop :iframe #oe_structure_test_ui",},{content:"Click on the s_cover snippet",trigger:":iframe .o_snippet_preview_wrap .s_cover",run:"click",},...clickOnSave(),{content:"open site menu",trigger:'button[data-menu-xmlid="website.menu_site"]',run:"click",},{content:"open html editor",trigger:'a[data-menu-xmlid="website.menu_ace_editor"]',run:"click",},{content:"add something in the generic view",trigger:'div.ace_line .ace_xml:contains("Generic")',run(){ace.edit(document.querySelector("#resource-editor div")).getSession().insert({row:3,column:1},"<p>somenewcontent</p>\n");},},{content:"select oe_structure specific view",trigger:'div.ace_line .ace_xml:contains("somenewcontent")',},{content:"open file selector menu",trigger:".o_resource_editor .o_select_menu_toggler",run:"click",},{content:"open oe_structure_test_ui view",trigger:".o-dropdown--menu .o-dropdown-item:contains(oe_structure_test_ui)",run:"click",},{trigger:'.o_resource_editor .o_select_menu_toggler:contains("oe_structure_test_ui")',},{content:"add something in the oe_structure specific view",trigger:'div.ace_line .ace_xml:contains("s_cover")',run(){ace.edit(document.querySelector("#resource-editor div")).getSession().insert({row:2,column:1},"<p>anothernewcontent</p>\n");},},{trigger:'div.ace_line .ace_xml:contains("anothernewcontent")',},{content:"save the html editor",trigger:".o_resource_editor button:contains(Save)",run:"click",},{trigger:':iframe #wrapwrap:contains("anothernewcontent")',},{content:"check that the page has both modification",trigger:':iframe #wrapwrap:contains("somenewcontent")',},]);registerWebsitePreviewTour("test_html_editor_scss",{url:"/contactus",},()=>[{trigger:":iframe #wrap:visible",},{trigger:":iframe h1:contains(contact us)",},{trigger:":iframe input[name=company]",},{content:"open site menu",trigger:'nav button[data-menu-xmlid="website.menu_site"]:contains(site)',run:"click",},{content:"open html editor",trigger:'.o_popover a[data-menu-xmlid="website.menu_ace_editor"]:contains(/^HTML/)',run:"click",},{content:"open type switcher",trigger:".o_resource_editor_type_switcher button",run:"click",},{content:"select scss files",trigger:'.o-dropdown--menu .dropdown-item:contains("SCSS")',run:"click",},{content:"select 'user_custom_rules'",trigger:'.o_resource_editor .o_select_menu_toggler:contains("user_custom_rules")',},{content:"add some scss content in the file",trigger:'div.ace_line .ace_comment:contains("footer {")',run(){ace.edit(document.querySelector("#resource-editor div")).getSession().insert({row:2,column:0},`${adminCssModif}\n`);},},{trigger:`div.ace_line:contains("${adminCssModif}")`,},{content:"save the html editor",trigger:".o_resource_editor_title button:contains(Save)",run:"click",},{content:"check that the scss modification got applied",trigger:":iframe body:has(#wrap:hidden)",timeout:30000,},{content:"reset view (after reload, html editor should have been reopened where it was)",trigger:"#resource-editor-id button:contains(Reset)",run:"click",},{content:"confirm reset warning",trigger:".modal-footer .btn-primary",run:"click",},{content:"check that the scss file was reset correctly, wrap content should now be visible again",trigger:":iframe #wrap:visible",timeout:30000,},{content:"add some scss content in the file",trigger:'div.ace_line .ace_comment:contains("footer {")',run(){ace.edit(document.querySelector("#resource-editor div")).getSession().insert({row:2,column:0},`${adminCssModif}\n`);},},{trigger:`div.ace_line:contains("${adminCssModif}")`,},{content:"save the html editor",trigger:".o_resource_editor_title button:contains(Save)",run:"click",},{content:"check that the scss modification got applied",trigger:":iframe body:has(#wrap:hidden)",},{trigger:"nav img[src]:not([src=''])",},]);registerWebsitePreviewTour("test_html_editor_scss_2",{url:"/",},()=>[{trigger:":iframe [is-ready=true] #wrapwrap",},{content:"open site menu",trigger:'button[data-menu-xmlid="website.menu_site"]',run:"click",},{content:"open html editor",trigger:'.o_popover a[data-menu-xmlid="website.menu_ace_editor"]:contains(/^HTML/)',run:"click",},{content:"open type switcher",trigger:".o_resource_editor_type_switcher button",run:"click",},{content:"select scss files",trigger:'.o-dropdown--menu .dropdown-item:contains("SCSS")',run:"click",},{content:"select 'user_custom_rules'",trigger:'.o_resource_editor .o_select_menu_toggler:contains("user_custom_rules")',},{content:"add some scss content in the file",trigger:`div.ace_line:contains("${adminCssModif}")`,run(){ace.edit(document.querySelector("#resource-editor div")).getSession().insert({row:2,column:0},`${demoCssModif}\n`);},},{trigger:`div.ace_line:contains("${demoCssModif}")`,},{content:"save the html editor",trigger:".o_resource_editor button:contains(Save)",run:"click",},{content:"reset view (after reload, html editor should have been reopened where it was)",trigger:"#resource-editor-id button:contains(Reset)",timeout:30000,run:"click",},{content:"confirm reset warning",trigger:".modal:contains(careful) .modal-footer .btn-primary",run:"click",},{trigger:`body:not(:has(div.ace_line:contains("${adminCssModif}")))`,},{content:"check that the scss file was reset correctly",trigger:`body:not(:has(div.ace_line:contains("${demoCssModif}")))`,timeout:30000,},]);registerWebsitePreviewTour("website_code_editor_usable",{url:"/",},()=>[{trigger:":iframe #wrapwrap",},{content:"Open Site menu",trigger:'button[data-menu-xmlid="website.menu_site"]',run:"click",},{content:"Open HTML / CSS Editor",trigger:'.o_popover a[data-menu-xmlid="website.menu_ace_editor"]:contains(/^HTML/)',run:"click",},{content:"Bypass warning",trigger:".o_resource_editor_wrapper div:nth-child(2) > button",run:"click",},...[{menuItemIndex:1,editorMode:"qweb",},{menuItemIndex:2,editorMode:"scss",},{menuItemIndex:3,editorMode:"javascript",},].map(({menuItemIndex,editorMode})=>[{content:"Open file type dropdown",trigger:".o_resource_editor_type_switcher .dropdown-toggle",run:"click",},{content:`Select type ${menuItemIndex}`,trigger:`.o-overlay-container .o-dropdown--menu .dropdown-item:nth-child(${menuItemIndex})`,run:"click",},{content:"Wait for editor mode to change",trigger:`.ace_editor[data-mode="${editorMode}"]`,},{content:"Make sure text is being highlighted",trigger:".ace_content .ace_text-layer .ace_line:first-child span",},]).flat(),]);registerWebsitePreviewTour("test_ace_editor_is_hidden",{url:"/",},()=>[{trigger:":iframe #wrapwrap",},{content:"Open Site menu",trigger:"button[data-menu-xmlid='website.menu_site']",run:"click",},{content:"Open HTML / CSS Editor",trigger:".o_popover a[data-menu-xmlid='website.menu_ace_editor']:contains(/^HTML/)",run:"click",},{content:"Make sure the editor is open",trigger:".o_resource_editor",},{content:"Click on edit",trigger:".o_menu_systray_item.o_edit_website_container > button",run:"click",},{content:"Wait for it to open",trigger:".o-website-builder_sidebar",},{content:"Make sure the editor has been hidden after starting editing",trigger:":not(.o_resource_editor)",},{content:"Discard edit mode",trigger:".o-website-builder_sidebar .o-snippets-top-actions button:contains(Discard)",run:"click",},{content:"Open Site menu",trigger:"button[data-menu-xmlid='website.menu_site']",run:"click",},{content:"Open HTML / CSS Editor",trigger:".o_popover a[data-menu-xmlid='website.menu_ace_editor']:contains(/^HTML/)",run:"click",},{content:"Make sure the editor is open",trigger:".o_resource_editor",},{content:"Navigate to contact us page",trigger:":iframe a[href='/contactus']",run:"click",},{content:"Make sure the editor has been hidden after navigating to other page",trigger:":not(.o_resource_editor)",},]);return __exports;});;

/* /website/static/tests/tours/interaction_lifecycle.js */
odoo.define('@website/../tests/tours/interaction_lifecycle',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{clickOnEditAndWaitEditMode,insertSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");const localStorageKey="interactionAndWysiwygLifecycle";registerWebsitePreviewTour("interaction_lifecycle",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_countdown",name:"Countdown",groupName:"Content",}),{content:"Wait for the interaction to be started and empty the interactionAndWysiwygLifecycle list",trigger:":iframe .s_countdown.interaction_started",run:()=>{window.localStorage.setItem(localStorageKey,"[]");},},{trigger:"button[data-action=save]:enabled:contains(save)",run:"click",},{content:"Wait for the interaction to be started",trigger:":iframe .s_countdown.interaction_started",},...clickOnEditAndWaitEditMode(),{content:"Wait for the interaction to be started and check the order of the lifecycle method call of the interaction and the wysiwyg",trigger:":iframe .s_countdown.interaction_started",run(){const result=JSON.parse(window.localStorage.interactionAndWysiwygLifecycle);const expected=["interactionStop","interactionStart","interactionStop","interactionStart",];const alternative=["interactionStop","interactionStart","wysiwygStop","interactionStop","wysiwygStart","wysiwygStarted","interactionStart",];const resultIsEqualTo=(arr)=>arr.length===result.length&&arr.every((item,i)=>item===result[i]);if(!(resultIsEqualTo(expected)||resultIsEqualTo(alternative))){console.error(`
                    Expected: ${expected.toString()}
                    Or:       ${alternative.toString()}
                    Result:   ${result.toString()}
                `);}},},]);return __exports;});;

/* /website/static/tests/tours/link_to_document.js */
odoo.define('@website/../tests/tours/link_to_document',['@website/js/tours/tour_utils','@web/core/utils/patch'],function(require){'use strict';let __exports={};const{insertSnippet,openLinkPopup,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");const{patch}=require("@web/core/utils/patch");let unpatch;const patchStep={content:"Patch upload service",trigger:"body",run:()=>{const uploadService=odoo.__WOWL_DEBUG__.root.env.services.uploadLocalFiles;unpatch=patch(uploadService,{async upload(){return[{id:1,name:"file.txt",public:true,checksum:"123"}];},});},};const unpatchStep={content:"Unpatch upload service",trigger:"body",run:()=>unpatch(),};const editLinkPopup=()=>[...openLinkPopup(`:iframe #wrap .s_banner a:nth-child(1)`,"Start Now",1,true),{trigger:".o-we-linkpopover .o_we_edit_link",run:"click",},];const saveLinkPopup=()=>[{content:"Save the link by clicking on Apply button",trigger:".o-we-linkpopover .o_we_apply_link",run:"click",},];registerWebsitePreviewTour("test_link_to_document",{url:"/",edition:true,},()=>[...insertSnippet({name:"Banner",id:"s_banner",groupName:"Intro",}),patchStep,...editLinkPopup(),{trigger:".o-we-linkpopover .o_we_href_input_link",run:"edit ",},{content:"Click on link to an uploaded document",trigger:".o-we-linkpopover div.o-autocomplete ~ span > button",run:"click",},...saveLinkPopup(),{content:"Check if a document link is created",trigger:":iframe #wrap .s_banner a:nth-child(1)[href^='/web/content']",},{content:"Check if by default the option auto-download is enabled",trigger:":iframe #wrap .s_banner a:nth-child(1)[href$='download=true']",},unpatchStep,{content:`Click on outside to select something else`,trigger:`:iframe #wrap .s_banner p:nth-child(2)`,async run(){const el=this.anchor;const sel=el.ownerDocument.getSelection();sel.collapse(el.childNodes[1],1);el.focus();},},...editLinkPopup(),{content:"Deactivate direct download",trigger:".o-we-linkpopover .direct-download-option > input",run:"click",},...saveLinkPopup(),{content:"Check if auto-download is disabled",trigger:":iframe #wrap .s_banner a:nth-child(1):not([href$='download=true'])",},]);return __exports;});;

/* /website/static/tests/tours/media_dialog.js */
odoo.define('@website/../tests/tours/media_dialog',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{changeOption,clickOnSave,insertSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("website_media_dialog_undraw",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_text_image",name:"Text - Image",groupName:"Content",}),{content:"Open the media dialog from the snippet",trigger:":iframe .s_text_image img",run:"dblclick",},{content:"Search for 'banner' to call the media library",trigger:".o_select_media_dialog .o_we_search",run:"edit banner",},{content:"Check that the media library is available",trigger:'.o_select_media_dialog:has(.o_we_search_select option[value="media-library"])',},{content:"Ensure all images are loaded to avoid CORS is misconfigured on the API server, image will be treated as non-dynamic.",trigger:".modal .o_load_done_msg",},]);registerWebsitePreviewTour("website_media_dialog_external_library",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_text_image",name:"Text - Image",groupName:"Content",}),{content:"Open the media dialog from the snippet",trigger:":iframe .s_text_image img",run:"dblclick",},{content:"Dummy search to call the media library",trigger:".o_select_media_dialog .o_we_search",run:"edit a",},{content:"Choose the media library to only show its media",trigger:".o_select_media_dialog .o_we_search_select",run:"select Illustrations",},{content:"Double click on the first image",trigger:".o_select_media_dialog img.o_we_attachment_highlight",run:"click",},{content:"Reopen the media dialog",trigger:":iframe .s_text_image img",run:"dblclick",},{content:"Check that the image was created only once",trigger:".o_select_media_dialog .o_we_existing_attachments .o_existing_attachment_cell img[src^='/html_editor/shape/illustration/']",run(){const listEl=this.anchor.closest(".o_select_media_dialog .o_we_existing_attachments");const selector=".o_existing_attachment_cell img[src^='/html_editor/shape/illustration/']";const uploadedImgs=listEl.querySelectorAll(`${selector}[title='${this.anchor.title}']`);if(uploadedImgs.length!==1){throw new Error(`${uploadedImgs.length} attachment(s) were found. Exactly 1 should have been created.`);}},},{content:"Click on the first illustration image",trigger:".o_select_media_dialog .o_we_attachment_highlight",run:"click",},{content:"Select the image",trigger:":iframe .s_text_image img",run:"click",},{content:"Try to crop the image",trigger:"#oe_snippets .o_we_customize_panel .o_we_user_value_widget[data-crop='true']",run:"click",},{content:"Observe the crop is denied for illustration image",trigger:".o_notification_manager .o_notification",},...clickOnSave(),]);registerWebsitePreviewTour("website_media_dialog_icons",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_social_media",name:"Social Media",}),{content:"Open MediaDialog from a snippet icon",trigger:":iframe .s_social_media .fa-instagram",run:"dblclick",},{content:"Pick the same icon",trigger:".o_select_media_dialog .o_we_attachment_selected.fa-instagram",run:"click",},{content:"Check if the icon remains the same",trigger:":iframe .s_social_media .fa-instagram",},{content:"Open MediaDialog again",trigger:":iframe .s_social_media .fa-instagram",run:"dblclick",},{content:"Click on the ADD button",trigger:".o_select_media_dialog .btn:contains(Add)",run:"click",},{content:"Check if the icon remains the same",trigger:":iframe .s_social_media .fa-instagram",},...clickOnSave(),]);registerWebsitePreviewTour("website_media_dialog_image_shape",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_text_image",name:"Text - Image",groupName:"Content",}),{content:"Click on the image",trigger:":iframe .s_text_image img:not(:visible), :iframe .s_text_image img",run:"click",},changeOption("Image","[data-label='Shape'] .dropdown-toggle"),{content:"Click on the first image shape",trigger:"[data-action-id='setImageShape']",run:"click",},{content:"Open MediaDialog from an image",trigger:".btn-success[data-action-id='replaceMedia']",run:"click",},{content:"Click on the 'Icons' tab",trigger:'.o_select_media_dialog .o_notebook_headers .nav-item a:contains("Icons")',run:"click",},{content:"Select an icon",trigger:".o_select_media_dialog:has(.nav-link.active:contains('Icons')) .tab-content span.fa-heart",run:"click",},{content:"Checks that the icon doesn't have a shape",trigger:":iframe .s_text_image .fa-heart:not([data-shape])",},]);registerWebsitePreviewTour("website_media_dialog_insert_media",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_text_block",name:"Text",groupName:"Text",}),{content:"Click on the first paragraph",trigger:":iframe .s_text_block p",run:"editor test",},{content:"Show the powerbox",trigger:":iframe .s_text_block p:last-child",async run(actions){await actions.editor(`/`);const wrapwrap=this.anchor.closest("#wrapwrap");wrapwrap.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:"/",}));},},{content:"Click on the media item from powerbox",trigger:"div.o-we-command-name:contains('Media')",run:"click",},{content:"Click on the 'Icons' tab",trigger:".o_select_media_dialog a.nav-link:contains('Icons')",run:"click",},{content:"Click on the first icon",trigger:".o_select_media_dialog .font-icons-icon",run:"click",},{content:"Verify that the icon was inserted",trigger:":iframe .s_text_block p > span.fa",},]);registerWebsitePreviewTour("website_media_dialog_insert_file",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_text_block",name:"Text",groupName:"Text",}),{content:"Click on the first paragraph",trigger:":iframe .s_text_block p",run:"editor test",},{content:"Show the powerbox",trigger:":iframe .s_text_block p:last-child",async run(actions){await actions.editor(`/`);const wrapwrap=this.anchor.closest("#wrapwrap");wrapwrap.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:"/",}));},},{content:"Click on the media item from powerbox",trigger:"div.o-we-command-name:contains('Media')",run:"click",},{content:"Click on the 'Documents' tab",trigger:".o_select_media_dialog a.nav-link:contains('Documents')",run:"click",},{content:"Click on the first document",trigger:".o_select_media_dialog .o_existing_attachment_cell .o_button_area",run:"click",},{content:"Verify that the document was inserted and reopen the media dialog with a double click",trigger:":iframe .s_text_block p > .o_file_box",run:"dblclick",},{content:"Verify that the dialog opened on the Documents tab",trigger:".o_select_media_dialog a.nav-link.active:contains('Documents')",},]);registerWebsitePreviewTour("website_replace_remove_image",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_text_image",name:"Text - Image",groupName:"Content",}),{content:"Open the media dialog from the snippet",trigger:":iframe .s_text_image img",run:"dblclick",},{content:"Click on the toolbar's 'Add URL' button",trigger:".o_upload_media_url_button",run:"click",},{content:"Edit input field value",trigger:".o_we_url_input",run:"edit website/static/src/img/backgrounds/city.jpg",},{content:"Click on the toolbar's 'Add URL' button",trigger:".o_upload_media_url_button",run:"click",},{content:"Open the media dialog from the snippet",trigger:":iframe .s_text_image img",run:"dblclick",},{content:"Click on remove attachment",trigger:".o_we_attachment_selected .fa-trash:not(:visible)",run:"click",},{content:"Confirm the removal of the attachment",trigger:".btn:contains('Ok')",run:"click",},{content:"Click 'Discard' to close the media dialog",trigger:".modal:not(.o_inactive_modal) .o_select_media_dialog .btn:contains(Discard)",run:"click",},...clickOnSave(),{content:"Ensure the image is replaced with a placeholder thumbnail",trigger:":iframe .s_text_image img[src='/html_editor/static/src/img/placeholder_thumbnail.png']",},]);return __exports;});;

/* /website/static/tests/tours/media_iframe_video.js */
odoo.define('@website/../tests/tours/media_iframe_video',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{insertSnippet,registerWebsitePreviewTour}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("website_media_iframe_video",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_text_image",name:"Text - Image",groupName:"Content",}),{content:"Select the image",trigger:":iframe #wrap .s_text_image img, :iframe #wrap .s_text_image img:not(:visible)",run:"click",},{content:"Open image link options",trigger:"[data-action-id='setLink']",run:"click",},{content:"Enter the url",trigger:"input[placeholder='www.example.com']",run:"edit odoo.com",},{content:"Click on replace media",trigger:"[data-action-id='replaceMedia']",run:"click",},{content:"Click on video button",trigger:"a:contains('Videos')",run:"click",},{content:"Enter text in video link input to enable add button",trigger:"#o_video_text",run:"edit https://youtu.be/nbso3NVz3p8",},{content:"Wait for add button to be enabled",trigger:".modal-footer button:contains('Add'):not([disabled])",run:()=>{},},{content:"Remove video link",trigger:"#o_video_text",run(){const inputEl=this.anchor;inputEl.value="";inputEl.dispatchEvent(new Event("input",{bubbles:true}));},},{content:"Video input field should not be in valid state",trigger:"#o_video_text:not(.is-valid)",run:()=>{},},{content:"Check that the preview is not shown",trigger:".media_iframe_video:not(:has(iframe))",run:()=>{},},{content:"Check that the add button is disabled in footer",trigger:".modal-footer",run:function(){const addButtonEl=this.anchor.querySelector(".btn.btn-primary");if(!addButtonEl.disabled){console.error("Add button is not disabled.");}},},{content:"Enter video link",trigger:"#o_video_text",run:"edit https://youtu.be/nbso3NVz3p8",},{content:"Check video is preview",trigger:".o_video_dialog_iframe",},{content:"Click on 'add' button",trigger:".modal-footer button:contains('Add')",run:"click",},{content:"Click on replace media",trigger:"[data-action-id='replaceMedia']",run:"click",},{content:"Check that video url has protocol",trigger:"#o_video_text",run(){if(!this.anchor.value.startsWith("https")){console.error("Video Url is missing protocol");}},},{content:"Close the dialog",trigger:"button.btn-close",run:"click",},{content:"Ensure that the parent of media_iframe_video is not an 'a' tag.",trigger:":iframe .media_iframe_video",run:function(){if(this.anchor.parentElement.tagName==="A"){console.error("Iframe video has link!!!");}},},]);return __exports;});;

/* /website/static/tests/tours/mega_footer.js */
odoo.define('@website/../tests/tours/mega_footer',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{changeOptionInPopover,clickOnEditAndWaitEditMode,clickOnSave,clickOnSnippet,clickToolbarButton,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("mega_footer",{url:"/",edition:true,},()=>[{content:"Mark the current footer (to tell when it is gone)",trigger:":iframe footer",run(){this.anchor.ownerDocument.querySelector("footer #footer p").classList.add("if_this_is_here_this_is_the_old_footer");},},...clickOnSnippet({id:"o_footer",name:"Footer"}),...changeOptionInPopover("Footer","Template","Mega"),{content:"Check that the footer has been replaced",trigger:":iframe footer:not(:has(.if_this_is_here_this_is_the_old_footer))",},...clickToolbarButton("copyright and company name text",".o_footer_copyright span","bold"),...clickOnSave(),...clickOnEditAndWaitEditMode(),{content:"The company name at the bottom of the footer has the new content",trigger:":iframe .o_footer_copyright span strong",},]);return __exports;});;

/* /website/static/tests/tours/multi_edition.js */
odoo.define('@website/../tests/tours/multi_edition',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{clickOnSave,insertSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("website_multi_edition",{url:"/",edition:true,},()=>[{content:"Check the current page has not the elements that will be added",trigger:":iframe body:not(:has(.s_text_image)):not(:has(.s_hr))",},...insertSnippet({id:"s_text_image",name:"Text - Image",groupName:"Content",}),{trigger:".o-website-builder_sidebar.o_builder_sidebar_open .o_snippet",},{trigger:`.o-snippets-menu .o_block_tab:not(.o_we_ongoing_insertion) .o_snippet[name="Separator"].o_draggable .o_snippet_thumbnail`,content:"Drag the Separator building block and drop it at the bottom of the page.",run:"drag_and_drop :iframe .oe_drop_zone:last",},...clickOnSave(),{content:"Check that the main element of the page was properly saved",trigger:":iframe main .s_text_image",},{content:"Check that the footer was properly saved",trigger:":iframe footer .s_hr",},]);return __exports;});;

/* /website/static/tests/tours/navigation.js */
odoo.define('@website/../tests/tours/navigation',['@web_tour/tour_utils','@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{stepUtils}=require("@web_tour/tour_utils");const{insertSnippet,registerWebsitePreviewTour}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("website_editing_awaits_navigation",{url:"/",},()=>[{content:"Navigate to the 'Contact Us' page",trigger:":iframe .top_menu a[href='/contactus']:not(:visible)",run:"click",},{content:"Click on Edit right after that",trigger:".o_menu_systray_item.o_edit_website_container > button",run:"click",},stepUtils.waitIframeIsReady(),{content:"Contact us page appears first before the builder sidebar",trigger:":iframe section h1:contains('Contact Us'), :not(.o-website-builder_sidebar)",},{content:"Can insert a snippet",trigger:".o-website-builder_sidebar",},...insertSnippet({id:"s_banner",name:"Banner",groupName:"Intro",}),{content:"",trigger:":iframe section.s_banner",},]);return __exports;});;

/* /website/static/tests/tours/page_manager.js */
odoo.define('@website/../tests/tours/page_manager',['@website/js/tours/tour_utils','@web/core/registry'],function(require){'use strict';let __exports={};const{testSwitchWebsite,registerWebsitePreviewTour}=require("@website/js/tours/tour_utils");const{registry}=require("@web/core/registry");const checkKanbanGroupBy=[{content:"Click on Kanban View",trigger:".o_cp_switch_buttons .o_kanban",run:"click",},{trigger:".o_kanban_renderer",},{content:"Open search panel menu",trigger:".o_control_panel .o_searchview_dropdown_toggler",run:"click",},{content:"Select 'Active' in the select of Custom Group",trigger:"select.o_add_custom_group_menu",run:"select active",},{trigger:".o_kanban_renderer .o_kanban_header",},{content:"Click on List View",trigger:".o_cp_switch_buttons .o_list",run:"click",},{trigger:".o_list_renderer",},{content:"Remove applied Group By",trigger:".o_cp_searchview .o_facet_values:contains('Active') .o_facet_remove",run:"click",},];const verifySelectedWebsiteFilter=(website_name)=>[{content:`Check if the search view facet is of ${website_name}`,trigger:`.o_searchview_facet .o_facet_value:contains('${website_name}')`,},{content:"Open the search menu dropdown",trigger:".o_searchview_dropdown_toggler",run:"click",},{content:`Check if '${website_name}' is selected in the Filters menu`,trigger:`.o_filter_menu .o-dropdown-item.selected:contains('${website_name}')`,},{content:"Close the search menu dropdown",trigger:".o_searchview_dropdown_toggler",run:"click",},];const checkWebsiteFilters=[...verifySelectedWebsiteFilter("My Website"),{content:"Check that the homepage is the one of 'My Website'",trigger:".o_list_table .o_data_row .o_data_cell[name=name]:contains('Home') "+"~ .o_data_cell[name=website_id]:contains('My Website')",},{content:"Open the search menu dropdown",trigger:".o_searchview_dropdown_toggler",run:"click",},{content:"Check if 'My Website' is in the Filters menu",trigger:".o_filter_menu .o-dropdown-item:contains('My Website')",},{content:"Check if 'Test Website' is in the Filters menu",trigger:".o_filter_menu .o-dropdown-item:contains('Test Website')",},{content:"Select the 'Test Website' filter",trigger:".o_filter_menu .o-dropdown-item:contains('Test Website')",run:"click",},{content:"Check if the selected website filter now shows both 'My Website' and 'Test Website'",trigger:".o_searchview_facet .o_facet_value:contains('My Website') "+"~ em.o_facet_values_sep:contains('or') "+"~ .o_facet_value:contains('Test Website') ",},{content:"Check that the first homepage is of 'My Website'",trigger:".o_list_table .o_data_row .o_data_cell[name=name]:contains('Home'):eq(0) "+"~ .o_data_cell[name=website_id]:contains('My Website')",},{content:"Check that the second homepage is of 'Test Website'",trigger:".o_list_table .o_data_row .o_data_cell[name=name]:contains('Home'):eq(1) "+"~ .o_data_cell[name=website_id]:contains('Test Website')",},{content:"Remove the website filter",trigger:".o_searchview_input_container .o_searchview_facet .o_facet_remove",run:"click",},{content:"Check if we got an extra homepage that does not belong to any website",trigger:".o_list_table .o_data_row .o_data_cell[name=name]:contains('Home'):eq(0) "+"~ .o_data_cell[name=website_id]:empty",},];const deleteSelectedPage=[{content:"Click on Action",trigger:".o_cp_action_menus button",run:"click",},{content:"Click on Delete",trigger:'.o-dropdown--menu span:contains("Delete")',run:"click",},{content:"Click on I am sure about this",trigger:'main.modal-body input[type="checkbox"]',timeout:20000,run:"click",},{content:"Click on OK",trigger:".modal-content footer button.btn-primary:not([disabled])",run:"click",},];const homePage='tr:contains("Home")';const duplicateSinglePage=[{content:"Click on checkbox",trigger:'.o_list_renderer tr:contains("/test-duplicate") td.o_list_record_selector input[type="checkbox"]',run:"click",},{content:"Click on Action button",trigger:".o_cp_action_menus button",run:"click",},{content:"Click on Duplicate",trigger:'.o-dropdown--menu span:contains("Duplicate")',run:"click",},{content:"Put your website name as 'Test Duplicate' here",trigger:'main.modal-body input[type="text"]',run:"edit Test Duplicate",},{content:"Click on OK",trigger:".modal-footer button.btn-primary",run:"click",},{content:"Wait for the Test Duplicate to appear",trigger:"td:contains('/test-duplicate-1')",},];const duplicateMultiplePage=[{content:"Click on checkbox",trigger:'.o_list_renderer tr:contains("/test-duplicate") td.o_list_record_selector input[type="checkbox"]',run:"click",},{content:"Click on checkbox",trigger:'.o_list_renderer tr:contains("/test-duplicate-1") td.o_list_record_selector input[type="checkbox"]',run:"click",},{content:"Click on Action button",trigger:".o_cp_action_menus button",run:"click",},{content:"Click on Duplicate",trigger:'.o-dropdown--menu span:contains("Duplicate")',run:"click",},{content:"Put your website name as 'Test Duplicate' here",trigger:'main.modal-body input[type="text"]',run:"edit Test Duplicate",},{content:"Click on OK",trigger:".modal-footer button.btn-primary",run:"click",},];registerWebsitePreviewTour("website_page_manager",{url:"/",},()=>[{content:"Click on Site",trigger:'button.dropdown-toggle[data-menu-xmlid="website.menu_site"]',run:"click",},{content:"Click on Pages",trigger:'a.dropdown-item[data-menu-xmlid="website.menu_website_pages_list"]',run:"click",},...checkKanbanGroupBy,...checkWebsiteFilters,{content:"Open the search menu dropdown",trigger:".o_searchview_dropdown_toggler",run:"click",},{content:"Select 'My Website' filter",trigger:".o_filter_menu .o-dropdown-item:contains('My Website')",run:"click",},{content:"Click on Home Page",trigger:`.o_list_renderer ${homePage} td.o_list_record_selector input[type="checkbox"]`,run:"click",},...deleteSelectedPage,{content:"Check that the page has been removed",trigger:`.o_list_renderer:not(:has(${homePage}))`,},{content:"Click on All Pages",trigger:'.o_list_renderer thead input[type="checkbox"]',run:"click",},...deleteSelectedPage,{content:"Check that all pages have been removed",trigger:".o_list_renderer tbody:not(:has([data-id]))",},]);registerWebsitePreviewTour("website_page_manager_session_forced",{url:"/",},()=>[...testSwitchWebsite("Test Website"),{content:"Click on Site",trigger:'button.dropdown-toggle[data-menu-xmlid="website.menu_site"]',run:" click",},{content:"Click on Pages",trigger:'a.dropdown-item[data-menu-xmlid="website.menu_website_pages_list"]',run:" click",},{content:"Check that the homepage is the one of Test Website",trigger:".o_list_table .o_data_row .o_data_cell[name=name]:contains('Home') "+"~ .o_data_cell[name=website_id]:contains('Test Website')",},...verifySelectedWebsiteFilter("Test Website"),]);registry.category("web_tour.tours").add("website_page_manager_direct_access",{url:"/odoo/action-website.action_website_pages_list",steps:()=>[{content:"Check that the homepage is the one of Test Website",trigger:".o_list_table .o_data_row .o_data_cell[name=name]:contains('Home') "+"~ .o_data_cell[name=website_id]:contains('Test Website')",},...verifySelectedWebsiteFilter("Test Website"),],});registerWebsitePreviewTour("website_clone_pages",{url:"/",},()=>[{content:"Click on Site",trigger:'button.dropdown-toggle[data-menu-xmlid="website.menu_site"]',run:"click",},{content:"Click on Pages",trigger:'a.dropdown-item[data-menu-xmlid="website.menu_website_pages_list"]',run:"click",},...duplicateSinglePage,...duplicateMultiplePage,{trigger:"td:contains('/test-duplicate-2-1')",},]);return __exports;});;

/* /website/static/tests/tours/parallax.js */
odoo.define('@website/../tests/tours/parallax',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{changeOptionInPopover,clickOnEditAndWaitEditMode,clickOnSave,clickOnSnippet,insertSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");const coverSnippet={id:"s_cover",name:"Cover",groupName:"Intro"};registerWebsitePreviewTour("test_parallax",{url:"/",edition:true,},()=>[...insertSnippet(coverSnippet),...clickOnSnippet(coverSnippet),...changeOptionInPopover("Cover","Filter","Blur"),{content:"Check that the Cover snippet has the Blur filter on its background image",trigger:":iframe .s_cover span[data-gl-filter='blur']",},...changeOptionInPopover("Cover","Scroll Effect","None"),{content:"Check that the data related to the filter have been transferred to the new target",trigger:":iframe .s_cover[data-gl-filter='blur']",},{content:"Check that the 'o_modified_image_to_save' class has been transferred to the new target",trigger:":iframe .s_cover.o_modified_image_to_save",},...changeOptionInPopover("Cover","Scroll Effect","Fixed"),{content:"Check that the 'o_modified_image_to_save' class has been deleted from the old target",trigger:":iframe .s_cover:not(.o_modified_image_to_save)",},{content:"Check that the 'o_modified_image_to_save' class has been transferred to the new target",trigger:":iframe span.s_parallax_bg.o_modified_image_to_save",},{content:"Check that the data related to the filter have been transferred to the new target",trigger:":iframe span.s_parallax_bg[data-gl-filter='blur']",},...changeOptionInPopover("Cover","Scroll Effect","Parallax to Top"),{content:"Check that the option was correctly applied",trigger:":iframe span.s_parallax_bg[style*=top][style*=bottom][style*=transform]",},...changeOptionInPopover("Cover","Scroll Effect","Zoom In"),{content:"Check that the option was correctly applied",trigger:':iframe span.s_parallax_bg[style*="transform: scale("]',},...clickOnSave(),...clickOnEditAndWaitEditMode(),{content:"The parallax should not add o_dirty when entering edit mode",trigger:":iframe #wrap:not(.o_dirty)",},]);return __exports;});;

/* /website/static/tests/tours/popup_visibility_option.js */
odoo.define('@website/../tests/tours/popup_visibility_option',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{insertSnippet,registerWebsitePreviewTour}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("website_popup_visibility_option",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_popup",name:"Popup",groupName:"Content",}),{content:"Click on the column within the popup snippet.",trigger:":iframe #wrap .s_popup .o_cc1",run:"click",},{content:"Click the 'No Desktop' visibility option to hide the banner.",trigger:`.options-container [data-label="Visibility"] button[data-action-param="no_desktop"]`,run:"click",},{content:"Check that the popup is visible.",trigger:".o_we_invisible_root_parent i.fa-eye",},{content:"Check that the banner is invisible.",trigger:"ul .o_we_invisible_entry i.fa-eye-slash",},]);return __exports;});;

/* /website/static/tests/tours/powerbox_snippet.js */
odoo.define('@website/../tests/tours/powerbox_snippet',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{clickOnSnippet,insertSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("website_powerbox_snippet",{edition:true,},()=>[...insertSnippet({id:"s_text_block",name:"Text",groupName:"Text",}),...clickOnSnippet({id:"s_text_block",name:"Text",}),{content:"Select the last paragraph",trigger:":iframe .s_text_block p:last-child",run:"click",},{content:"Show the powerbox",trigger:":iframe .s_text_block p:last-child",async run(actions){await actions.editor(`/`);const wrapwrap=this.anchor.closest("#wrapwrap");wrapwrap.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:"/",}));},},{content:"Click on the alert snippet",trigger:".o-we-powerbox .o-we-command:contains('Alert')",run:"click",},{content:"Check if s_alert snipept is inserted",trigger:":iframe .s_alert",},]);registerWebsitePreviewTour("website_powerbox_keyword",{edition:true,},()=>[...insertSnippet({id:"s_text_block",name:"Text",groupName:"Text",}),...clickOnSnippet({id:"s_text_block",name:"Text",}),{content:"Select the last paragraph",trigger:":iframe .s_text_block p:last-child",run:"click",},{content:"Show the powerbox",trigger:":iframe .s_text_block p:last-child",async run(actions){await actions.editor(`/`);const wrapwrapEl=this.anchor.closest("#wrapwrap");wrapwrapEl.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:"/",}));},},{content:"Initially alert snippet should be present in the powerbox",trigger:".o-we-powerbox .o-we-command:contains('Alert')",},{content:"Change the content to '/table' so that alert snippet should not be present in the powerbox",trigger:":iframe .s_text_block p:last-child",run(){const wrapwrapEl=this.anchor.closest("#wrapwrap");this.anchor.textContent="/table";wrapwrapEl.ownerDocument.dispatchEvent(new KeyboardEvent("keyup",{key:"DummyKey",code:"KeyDummy",cancelable:true,}));},},{content:"Alert snippet should not be present in the powerbox",trigger:".o-we-powerbox .o-we-command:not(:contains('Alert'))",},{content:"Change the content to '/banner'",trigger:":iframe .s_text_block p:last-child",run(){const wrapwrapEl=this.anchor.closest("#wrapwrap");this.anchor.textContent="/banner";wrapwrapEl.ownerDocument.dispatchEvent(new KeyboardEvent("keyup",{key:"DummyKey",code:"KeyDummy",cancelable:true,}));},},{content:"Alert snippet should be present in the powerbox",trigger:".o-we-powerbox .o-we-command:contains('Alert')",},{content:"Click on the alert snippet",trigger:".o-we-powerbox .o-we-command:contains('Alert')",run:"click",},{content:"Check if s_alert snippet is inserted",trigger:":iframe .s_alert",},]);return __exports;});;

/* /website/static/tests/tours/reset_password.js */
odoo.define('@website/../tests/tours/reset_password',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("website_reset_password",{steps:()=>[{content:"fill new password",trigger:'.oe_reset_password_form input[name="password"]',run:"edit adminadmin",},{content:"fill confirm password",trigger:'.oe_reset_password_form input[name="confirm_password"]',run:"edit adminadmin",},{content:"submit reset password form",trigger:'.oe_reset_password_form button[type="submit"]',run:"click",expectUnloadPage:true,},{content:"check that we get the success alert",trigger:".alert-success",},{content:"click on the back to login link",trigger:".btn-link",},{content:"check that we're on the login page",trigger:".oe_login_form",},],});return __exports;});;

/* /website/static/tests/tours/restricted_editor.js */
odoo.define('@website/../tests/tours/restricted_editor',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{clickOnEditAndWaitEditMode,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("restricted_editor",{url:"/",},()=>[...clickOnEditAndWaitEditMode()]);return __exports;});;

/* /website/static/tests/tours/rte.js */
odoo.define('@website/../tests/tours/rte',['@website/js/tours/tour_utils','@odoo/owl','@html_editor/../tests/tours/helpers/editor'],function(require){'use strict';let __exports={};const{clickOnEditAndWaitEditModeInTranslatedPage,clickOnSave,insertSnippet,goToTheme,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");const{whenReady}=require("@odoo/owl");const{editorsWeakMap,setSelection}=require("@html_editor/../tests/tours/helpers/editor");registerWebsitePreviewTour("rte_translator",{url:"/",edition:true,wait_for:whenReady(),},()=>[...goToTheme(),{content:"click on Add a language",trigger:"button[data-action-id='addLanguage']",run:"click",},{content:"confirm leave editor",trigger:".modal-dialog button.btn-primary",run:"click",},{content:"type Parseltongue",trigger:'div[name="lang_ids"] .o_input_dropdown input',run:"edit Parseltongue",},{content:"select Parseltongue",trigger:".dropdown-item:contains(Parseltongue)",run:"click",},{trigger:'.modal-dialog div[name="lang_ids"] .rounded-pill .o_tag_badge_text:contains(Parseltongue)',},{content:"load Parseltongue",trigger:".modal-footer .btn-primary",run:"click",},{content:"click language dropdown (2)",trigger:":iframe .js_language_selector .dropdown-toggle",timeout:60000,run:"click",},{trigger:':iframe html[lang*="pa-GB"]',},{content:"go to english version",trigger:':iframe .o_header_language_selector a[data-url_code="en"]',run:"click",},{trigger:':iframe html[lang*="en-US"]',},{content:"Open new page menu",trigger:".o_menu_systray .o_new_content_container button",run:"click",},{content:"click on new page",trigger:"button.o_new_content_element",run:"click",},{content:"click on Use this template",trigger:".o_page_template .o_button_area:not(:visible)",run:"click",},{content:"insert file name",trigger:".modal:not(.o_inactive_modal):contains(new page) .modal-body input[type=text]",run:"edit rte_translator.xml && press Enter",},{trigger:'.modal:not(.o_inactive_modal):contains(new page) .modal-body input[type="text"]:value(rte_translator.xml)',},{content:"create file",trigger:".modal:not(.o_inactive_modal):contains(new page) button.btn-primary:contains(create)",run:"click",},{content:"click on the 'page manager' button",trigger:'button[name="website.action_website_pages_list"]',run:"click",},{content:"click on the record to display the xml file in the iframe",trigger:'td:contains("rte_translator.xml")',run:"click",},{content:"Open new page menu",trigger:".o_menu_systray .o_new_content_container button",run:"click",},{content:"click on new page",trigger:"button.o_new_content_element",run:"click",},{content:"click on Use this template",trigger:".o_page_template .o_button_area:not(:visible)",run:"click",},{content:"insert page name",trigger:'.modal .modal-dialog .modal-body input[type="text"]',run:"edit rte_translator",},{trigger:'input[type="text"]:value(rte_translator)',},{content:"create page",trigger:".modal button.btn-primary:contains(create)",run:"click",},{trigger:"body:not(:has(.modal))",},...insertSnippet({id:"s_cover",name:"Cover",groupName:"Intro",}),{content:"change content",trigger:":iframe #wrap",run(){this.anchor.querySelector("p").innerHTML='<p>Write one or <font style="background-color: yellow;">two paragraphs <b>describing</b></font> your product or\
            <font style="color: rgb(255, 0, 0);">services</font>. To be successful your content needs to be\
            useful to your <a href="/999">readers</a>.</p> <input value="test translate default value" placeholder="test translate placeholder"/>\
            <p>&lt;b&gt;&lt;/b&gt; is an HTML&nbsp;tag &amp; is empty</p>';this.anchor.querySelector(".oe_img_bg").title="test translate image title";const editor=editorsWeakMap.get(this.anchor.ownerDocument);editor.shared.history.addStep();},},{content:"ensure change was applied",trigger:":iframe #wrap p:first b",},...clickOnSave(),{content:"click language dropdown (3)",trigger:":iframe .js_language_selector .dropdown-toggle",run:"click",},{trigger:':iframe html[lang*="en"]',},{content:"click on Parseltongue version",trigger:':iframe .js_language_selector a[data-url_code="pa_GB"]',run:"click",},{content:"edit",trigger:".o-website-btn-custo-primary.dropdown-toggle:contains('edit')",run:"click",},{trigger:":iframe html:not(:has(#wrap p span))",},{content:"translate",trigger:".o_translate_website_dropdown_item",run:"click",},{content:"close modal",trigger:".modal-footer .btn-secondary",run:"click",},{content:"check if translation is activate",trigger:":iframe [data-oe-translation-source-sha]",},{trigger:".o_builder_sidebar_open",},{content:"translate text",trigger:":iframe #wrap p font:first",async run(actionHelper){await actionHelper.editor("translated Parseltongue text");setSelection({anchorNode:this.anchor.childNodes[0],anchorOffset:22});this.anchor.dispatchEvent(new KeyboardEvent("keyup",{bubbles:true,key:"_"}));this.anchor.dispatchEvent(new InputEvent("input",{bubbles:true}));},},{content:"translate text with special char",trigger:":iframe #wrap input + p span:first",async run(actionHelper){await actionHelper.click();this.anchor.textContent="<{translated}>"+this.anchor.textContent;const editor=editorsWeakMap.get(this.anchor.ownerDocument);editor.shared.history.addStep();setSelection({anchorNode:this.anchor.childNodes[0],anchorOffset:0});this.anchor.dispatchEvent(new KeyboardEvent("keyup",{bubbles:true,key:"_"}));this.anchor.dispatchEvent(new InputEvent("input",{bubbles:true}));},},{trigger:":iframe #wrap .o_dirty font:first:contains(translated Parseltongue text)",},{content:"click on input",trigger:":iframe #wrap input:first",run:"click",},{content:"translate placeholder",trigger:".modal-dialog input:first",run:"edit test Parseltongue placeholder",},{content:"translate default value",trigger:".modal-dialog input:last",run:"edit test Parseltongue default value",},{trigger:'.modal input:value("test Parseltongue placeholder")',},{content:"close modal",trigger:".modal-footer .btn-primary",run:"click",},{content:"check: input marked as translated",trigger:':iframe input[placeholder="test Parseltongue placeholder"].oe_translated',},...clickOnSave(),{content:"check: content is translated",trigger:":iframe #wrap p font:first:contains(translated Parseltongue text)",},{content:"check: content with special char is translated",trigger:":iframe #wrap input + p:contains(<{translated}><b></b> is an HTML tag & )",},{content:"check: placeholder translation",trigger:':iframe input[placeholder="test Parseltongue placeholder"]',},{content:"check: default value translation",trigger:':iframe input[value="test Parseltongue default value"]',},{trigger:':iframe html[lang*="pa-GB"]:not(:has(#wrap p span))',},{content:"open language selector",trigger:":iframe .js_language_selector button:first",run:"click",},{content:"return to english version",trigger:':iframe .js_language_selector a[data-url_code="en"]',run:"click",},{content:"Check body",trigger:":iframe body:not(:has(#wrap p font:first:text(paragraphs <b>describing</b>)))",},...clickOnEditAndWaitEditModeInTranslatedPage(),{content:"select text",trigger:":iframe #wrap p",async run(actionHelper){await actionHelper.click();var el=this.anchor;var mousedown=document.createEvent("MouseEvents");mousedown.initMouseEvent("mousedown",true,true,window,0,0,0,0,0,false,false,false,false,0,el);el.dispatchEvent(mousedown);var mouseup=document.createEvent("MouseEvents");setSelection({anchorNode:this.anchor.childNodes[0],anchorOffset:6,focusNode:el.childNodes[2],focusOffset:13,});mouseup.initMouseEvent("mouseup",true,true,window,0,0,0,0,0,false,false,false,false,0,el);el.dispatchEvent(mouseup);},},...clickOnSave(),{content:"click language dropdown (4)",trigger:":iframe .js_language_selector .dropdown-toggle",run:"click",},{content:"return in Parseltongue",trigger:':iframe html[lang="en-US"] .js_language_selector .js_change_lang[data-url_code="pa_GB"]',run:"click",},{trigger:':iframe html[lang*="pa-GB"]',},{content:"check bis: content is translated",trigger:":iframe #wrap p font:first:contains(translated Parseltongue text)",run:"click",},{content:"check bis: placeholder translation",trigger:':iframe input[placeholder="test Parseltongue placeholder"]',run:"edit Test",},{content:"open site menu",trigger:'button[data-menu-xmlid="website.menu_site"]',run:"click",},{content:"Open HTML editor",trigger:'a[data-menu-xmlid="website.menu_ace_editor"]',run:"click",},{content:"Check that the editor is not showing translated content (1)",trigger:'.ace_text-layer .ace_line:contains("an HTML")',run(){const parser=new DOMParser();const doc=parser.parseFromString(this.anchor.textContent,"text/html");const lineEscapedText=doc.body.querySelector("p:last-child").textContent;if(lineEscapedText!=="&lt;b&gt;&lt;/b&gt; is an HTML&nbsp;tag &amp; is empty"){console.error("The HTML editor should display the correct untranslated content");document.querySelector("iframe:not(.o_ignore_in_tour)").contentDocument.body.classList.add("rte_translator_error");const editor=editorsWeakMap.get(this.anchor.ownerDocument);editor.shared.history.addStep();}},},{content:"Check that the editor is not showing translated content (2)",trigger:":iframe body:not(.rte_translator_error)",},]);return __exports;});;

/* /website/static/tests/tours/shape_color_sync_with_theme_color.js */
odoo.define('@website/../tests/tours/shape_color_sync_with_theme_color',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{assertCssVariable,assertSvgColors,changeOption,clickOnElement,clickOnSnippet,goBackToBlocks,goToTheme,insertSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");const TEST_COLOR_HEX="1AEF74";const TEST_COLOR_HEX_2="7ED1ED";function verifyShapeColorsUpdated(trigger,expectedHex){return{content:"Verify that the shape colors are updated",trigger,async run(){const backgroundImageUrl=this.anchor.querySelector(".o_we_shape").style.backgroundImage;if(!backgroundImageUrl.includes(expectedHex)){throw new Error("Updating the theme color should also update the background shape color.");}
await assertSvgColors(this.anchor.querySelector("img[data-shape]"),"Updating the theme color should update the image shape SVG color.",[`#${expectedHex}`]);},};}
registerWebsitePreviewTour("shape_color_sync_with_theme_color",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_company_team",name:"Team",groupName:"People",}),...clickOnSnippet(".s_company_team"),changeOption("Team","toggleBgShape"),clickOnElement("rainy shape","[data-action-value='html_builder/Rainy/01_001']"),clickOnElement("flip shape horizontal option","[data-action-id='flipShape'] .oi-arrows-h"),clickOnElement("any image in the snippet",":iframe .s_company_team img"),changeOption("Image","[data-label='Shape'] .dropdown-toggle"),clickOnElement("solid square 3 shape","[data-action-value$='/solid_square_3']"),clickOnElement("custom snippet save button","[data-container-title='Team'] .oe_snippet_save"),clickOnElement("save confirmation button",".modal-dialog button:contains('Save')"),...goToTheme(),clickOnElement("Click color palette","div[data-container-title='Colors'] .o-hb-select-wrapper svg"),clickOnElement("Change color palette",`.o-color-palette-dropdown [data-action-value="'default-light-1'"]`),{content:"Wait for no loading",trigger:":iframe body:not(:has(.o_loading_screen))",},verifyShapeColorsUpdated(":iframe .s_company_team",TEST_COLOR_HEX_2),goBackToBlocks(),clickOnElement("custom category block",".o_snippet[name='Custom'] .o_snippet_thumbnail_area"),verifyShapeColorsUpdated(":iframe .o_snippets_preview_row .s_company_team",TEST_COLOR_HEX_2),clickOnElement("X to close the 'Insert snippet' dialog",".modal .btn-close"),...goToTheme(),clickOnElement("color picker of theme preset 1","[data-container-title='Colors'] .o_we_color_preview"),{content:"Set theme color to #"+TEST_COLOR_HEX,trigger:".o_colorpicker_widget input",run:"edit "+TEST_COLOR_HEX,},{content:"Wait for no loading",trigger:":iframe body:not(:has(.o_loading_screen))",},verifyShapeColorsUpdated(":iframe .s_company_team",TEST_COLOR_HEX),clickOnElement("any image in the snippet",":iframe .s_company_team img[data-shape]"),assertCssVariable("background-color","rgb(26, 239, 116)","[data-container-title='Image'] [data-label='Colors'] .o_we_color_preview"),goBackToBlocks(),clickOnElement("custom category block",".o_snippet[name='Custom'] .o_snippet_thumbnail_area"),verifyShapeColorsUpdated(":iframe .o_snippets_preview_row .s_company_team",TEST_COLOR_HEX),]);return __exports;});;

/* /website/static/tests/tours/skip_website_configurator.js */
odoo.define('@website/../tests/tours/skip_website_configurator',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("skip_website_configurator",{url:"/odoo/action-website.action_website_configuration",steps:()=>[{content:"create a new website",trigger:'button[name="action_website_create_new"]',run:"click",},{content:"insert website name",trigger:'div[name="name"] input',run:"edit Website EN",},{content:"validate the website creation modal",trigger:".modal button.btn-primary",run:"click",expectUnloadPage:true,},{content:"skip configurator",trigger:".o_configurator_container .container-fluid .btn.btn-link",run:"click",},{content:"Check that the homepage is loaded",trigger:".o_website_preview :iframe html[data-view-xmlid='website.homepage']",timeout:30000,},{content:"Wait title is present before close tour",trigger:":iframe h2:contains(welcome to your)",},],});return __exports;});;

/* /website/static/tests/tours/snippet_background_edition.js */
odoo.define('@website/../tests/tours/snippet_background_edition',['@html_editor/utils/image','@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{backgroundImageCssToParts}=require("@html_editor/utils/image");const{changeBackgroundColor,changeOption,clickOnEditAndWaitEditMode,clickOnSave,clickOnSnippet,insertSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");const snippets=[{id:"s_text_image",name:"Text - Image",groupName:"Content",},];const backgroundColors=[{code:"200",hex:"#e9ecef",},{code:"800",hex:"#343a40",},];const gradients=["linear-gradient(135deg, rgb(203, 94, 238) 0%, rgb(75, 225, 236) 100%)","linear-gradient(135deg, rgb(255, 222, 202) 0%, rgb(202, 115, 69) 100%)",];function typeToName(xType){return xType==="cc"?"Theme":xType==="bg"?"Custom":"Gradient";}
function switchTo(type,_name){const name=_name||typeToName(type);return{trigger:`.o_font_color_selector .btn-tab:contains("${name}")`,content:`Switch to ${name}`,run:"click",};}
function addCheck(steps,checkX,checkNoX,xType,noSwitch=false){if(!checkX&&!checkNoX){return;}
const name=typeToName(xType);const selectorCheckX=checkX&&`[data-color="${checkX}"].selected`;const selectorCheckNoX=checkNoX?`[data-color="${checkNoX}"]:not(.selected)`:null;const step={trigger:selectorCheckX||selectorCheckNoX,content:`The correct ${name} is marked as selected`,tooltipPosition:"bottom",};if(!noSwitch){steps.push(switchTo(xType,name));}
if(!selectorCheckX&&selectorCheckNoX){steps.push({trigger:selectorCheckNoX,});}
steps.push(step);}
function checkAndUpdateBackgroundColor({checkCC,checkNoCC,checkBg,checkNoBg,checkGradient,checkNoGradient,changeType,change,finalSelector,finalRun,}){const steps=[changeBackgroundColor()];addCheck(steps,checkCC,checkNoCC,"cc");addCheck(steps,checkBg,checkNoBg,"bg");addCheck(steps,checkGradient,checkNoGradient,"gradient");if(changeType){steps.push(switchTo(changeType));steps.push({content:"Change background color",trigger:`.o_popover [data-color="${change}"]`,run:"click",});steps.push({trigger:finalSelector,content:"The selected colors have been applied (CC AND (BG or GRADIENT))",tooltipPosition:"bottom",run:finalRun,});}
return steps;}
function updateAndCheckCustomGradient({updateStep,checkGradient}){const steps=[updateStep];addCheck(steps,checkGradient,checkGradient!==gradients[0]&&gradients[0],"gradient",true);return steps;}
registerWebsitePreviewTour("snippet_background_edition",{url:"/",edition:true,},()=>[...insertSnippet(snippets[0]),...clickOnSnippet(snippets[0]),changeOption("Text - Image","button[data-action-id='toggleBgImage']"),{content:"Click on image",trigger:".o_select_media_dialog .o_button_area[aria-label='test.png']",run:"click",},...clickOnSave(),{content:"Check that the image is set",trigger:`:iframe section.${snippets[0].id}[style^="background-image: url("]`,},...clickOnEditAndWaitEditMode(),...clickOnSnippet(snippets[0]),changeOption("Text - Image","button[data-action-id='toggleBgImage']"),...checkAndUpdateBackgroundColor({changeType:"cc",change:"o_cc3",finalSelector:`:iframe .${snippets[0].id}.o_cc3:not([class*=bg-]):not([style*="background"])`,}),...checkAndUpdateBackgroundColor({checkCC:"o_cc3",changeType:"cc",change:"o_cc2",finalSelector:`:iframe .${snippets[0].id}.o_cc2:not(.o_cc3):not([class*=bg-])`,}),...checkAndUpdateBackgroundColor({checkCC:"o_cc2",checkNoCC:"o_cc3",changeType:"bg",change:backgroundColors[0].code,finalSelector:`:iframe .${snippets[0].id}.o_cc2.bg-${backgroundColors[0].code}`,}),...checkAndUpdateBackgroundColor({checkCC:"o_cc2",checkBg:backgroundColors[0].code,changeType:"bg",change:backgroundColors[1].code,finalSelector:`:iframe .${snippets[0].id}.o_cc2.bg-${backgroundColors[1].code}:not(.bg-${backgroundColors[0].code})`,}),...checkAndUpdateBackgroundColor({checkCC:"o_cc2",checkNoBg:backgroundColors[0].code,changeType:"cc",change:"o_cc4",finalSelector:`:iframe .${snippets[0].id}.o_cc4:not(.o_cc2):not(.bg-${backgroundColors[1].code})`,}),...checkAndUpdateBackgroundColor({checkCC:"o_cc4",checkNoCC:"o_cc2",checkNoBg:backgroundColors[1].code,changeType:"gradient",change:gradients[0],finalSelector:`:iframe .${snippets[0].id}.o_cc4:not(.bg-${backgroundColors[1].code})[style*="background-image: ${gradients[0]}"]`,}),...checkAndUpdateBackgroundColor({checkCC:"o_cc4",checkNoBg:backgroundColors[1].code,checkGradient:gradients[0],changeType:"gradient",change:gradients[1],finalSelector:`:iframe .${snippets[0].id}.o_cc4[style*="background-image: ${gradients[1]}"]:not([style*="background-image: ${gradients[0]}"])`,}),...checkAndUpdateBackgroundColor({checkCC:"o_cc4",checkGradient:gradients[1],checkNoGradient:gradients[0],changeType:"cc",change:"o_cc1",finalSelector:`:iframe .${snippets[0].id}.o_cc1:not(.o_cc4):not([style*="background-image: ${gradients[1]}"])`,}),...checkAndUpdateBackgroundColor({checkCC:"o_cc1",checkNoCC:"o_cc4",checkNoGradient:gradients[1],changeType:"gradient",change:gradients[1],finalSelector:`:iframe .${snippets[0].id}.o_cc1:not(.o_cc4)[style*="background-image: ${gradients[1]}"]`,}),changeOption("Text - Image","button[data-action-id='toggleBgImage']"),{trigger:".o_existing_attachment_cell .o_button_area",content:"Select an image in the media dialog",run:"click",},{trigger:`:iframe .${snippets[0].id}.o_cc1`,run:function(){const parts=backgroundImageCssToParts(getComputedStyle(this.anchor)["background-image"]);if(!parts.url||!parts.url.startsWith("url(")){throw new Error("An image should have been added as background.");}
if(parts.gradient!==gradients[1]){throw new Error("The gradient should have been kept when adding the background image");}},},...checkAndUpdateBackgroundColor({checkCC:"o_cc1",checkGradient:gradients[1],changeType:"gradient",change:gradients[0],finalSelector:`:iframe .${snippets[0].id}.o_cc1:not([style*="${gradients[1]}"])`,finalRun:function(){const parts=backgroundImageCssToParts(getComputedStyle(this.anchor)["background-image"]);if(!parts.url||!parts.url.startsWith("url(")){throw new Error("The image should have been kept when changing the gradient");}
if(parts.gradient!==gradients[0]){throw new Error("The gradient should have been changed");}},}),changeBackgroundColor(),switchTo("gradient"),{content:"Click on 'Custom' button to show custom gradient options",trigger:".o_popover .o_custom_gradient_button",run:"click",},...updateAndCheckCustomGradient({updateStep:{trigger:".o_popover .gradient-preview",content:"Add step",run:"click",},checkGradient:"linear-gradient(135deg, rgb(203, 94, 238) 0%, rgb(139, 160, 237) 50%, rgb(75, 225, 236) 100%)",}),...updateAndCheckCustomGradient({updateStep:{trigger:".o_popover .gradient-colors input.active",content:"Move step",run:"range 45",},checkGradient:"linear-gradient(135deg, rgb(203, 94, 238) 0%, rgb(139, 160, 237) 45%, rgb(75, 225, 236) 100%)",}),...updateAndCheckCustomGradient({updateStep:{trigger:".o_popover .o_color_picker_inputs .o_hex_div input",content:"Pick step color",run:"edit #FF0000",},checkGradient:"linear-gradient(135deg, rgb(203, 94, 238) 0%, rgb(255, 0, 0) 45%, rgb(75, 225, 236) 100%)",}),...updateAndCheckCustomGradient({updateStep:{trigger:".o_popover .gradient-color-bin a",content:"Delete step",run:"click",},checkGradient:"linear-gradient(135deg, rgb(203, 94, 238) 0%, rgb(75, 225, 236) 100%)",}),...updateAndCheckCustomGradient({updateStep:{trigger:".o_popover input[name='angle']",content:"Change angle",run:"edit 50 && click .o_color_picker_inputs",},checkGradient:"linear-gradient(50deg, rgb(203, 94, 238) 0%, rgb(75, 225, 236) 100%)",}),...updateAndCheckCustomGradient({updateStep:{trigger:".o_popover button:contains('Radial')",content:"Switch to Radial",run:"click",},checkGradient:"radial-gradient(circle closest-side at 25% 25%, rgb(203, 94, 238) 0%, rgb(75, 225, 236) 100%)",}),...updateAndCheckCustomGradient({updateStep:{trigger:".o_popover input[name='positionX']",content:"Change X position",run:"edit 33 && click .o_color_picker_inputs",},checkGradient:"radial-gradient(circle closest-side at 33% 25%, rgb(203, 94, 238) 0%, rgb(75, 225, 236) 100%)",}),...updateAndCheckCustomGradient({updateStep:{trigger:".o_popover input[name='positionY']",content:"Change Y position",run:"edit 75 && click .o_color_picker_inputs",},checkGradient:"radial-gradient(circle closest-side at 33% 75%, rgb(203, 94, 238) 0%, rgb(75, 225, 236) 100%)",}),...updateAndCheckCustomGradient({updateStep:{trigger:".o_popover button[title='Extend to the farthest side']",content:"Change color spread size",run:"click",},checkGradient:"radial-gradient(circle farthest-side at 33% 75%, rgb(203, 94, 238) 0%, rgb(75, 225, 236) 100%)",}),{trigger:`.o_colorpicker_sections button[data-color="${gradients[0]}"]`,content:`Revert to predefiend gradient ${gradients[0]}`,run:"click",},...checkAndUpdateBackgroundColor({checkCC:"o_cc1",checkGradient:gradients[0],checkNoGradient:gradients[1],changeType:"bg",change:backgroundColors[1].code,finalSelector:`:iframe .${snippets[0].id}.o_cc1.bg-${backgroundColors[1].code}[style^="background-image: url("]:not([style*="${gradients[0]}"])`,}),...checkAndUpdateBackgroundColor({checkCC:"o_cc1",checkBg:backgroundColors[1].code,checkNoGradient:gradients[0],changeType:"gradient",change:gradients[1],finalSelector:`:iframe .${snippets[0].id}.o_cc1:not(.bg-${backgroundColors[1].code})`,finalRun(){const parts=backgroundImageCssToParts(getComputedStyle(this.anchor)["background-image"]);if(!parts.url||!parts.url.startsWith("url(")){throw new Error("The image should have been kept when re-adding the gradient");}
if(parts.gradient!==gradients[1]){throw new Error("The gradient should have been re-added");}},}),...checkAndUpdateBackgroundColor({checkCC:"o_cc1",checkNoBg:backgroundColors[1].code,checkGradient:gradients[1],}),{trigger:".o_popover button[title='Reset']",content:"Click on the None button of the color palette",run:"click",},{trigger:`:iframe .${snippets[0].id}:not(.o_cc1):not([style*="${gradients[1]}"])[style^="background-image: url("]`,content:"All color classes and properties should have been removed and image should still be applied",},]);return __exports;});;

/* /website/static/tests/tours/snippet_cache_across_websites.js */
odoo.define('@website/../tests/tours/snippet_cache_across_websites',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{clickOnEditAndWaitEditMode,clickOnSave,registerWebsitePreviewTour,testSwitchWebsite,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("snippet_cache_across_websites",{edition:true,url:"/@/",},()=>[{content:"Click on the Custom category block",trigger:".o-website-builder_sidebar .o_snippet[name='Custom'].o_draggable .o_snippet_thumbnail_area",run:"click",},{content:"Ensure custom snippet preview appeared in the dialog",trigger:":iframe .o_snippet_preview_wrap[data-snippet-id^='s_carousel_'] section[data-name='custom_snippet_test']",},{content:"Ensure custom snippet preview shows the base label",trigger:":iframe .o_snippet_preview_wrap[data-snippet-id^='s_carousel_'][data-label='Carousel']",},{content:"Close the 'add snippet' dialog",trigger:".o_add_snippet_dialog .modal-header .btn-close",run:"click",},...clickOnSave(),...testSwitchWebsite("Test Website"),...clickOnEditAndWaitEditMode(),{content:"Check that the custom snippet category is not here",trigger:".o-website-builder_sidebar:not(:has(.o_snippet[name='Custom']))",},]);return __exports;});;

/* /website/static/tests/tours/snippet_countdown.js */
odoo.define('@website/../tests/tours/snippet_countdown',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{changeOption,clickOnSnippet,insertSnippet,registerWebsitePreviewTour,changeOptionInPopover,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("snippet_countdown",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_countdown",name:"Countdown",groupName:"Content"}),...clickOnSnippet({id:"s_countdown",name:"Countdown"}),...changeOptionInPopover("Countdown","At The End","Show Message and keep countdown"),changeOption("Countdown","previewEndMessage"),{content:"Hover an option which has a preview",trigger:"[data-container-title='Countdown'] [data-action-param='o_half_screen_height']",run:"hover",},{content:"Check that the countdown message is still displayed",trigger:":iframe .s_countdown .s_picture",run(){const previousAnchor=document.querySelector("[data-action-param='o_half_screen_height']");previousAnchor.dispatchEvent(new Event("mouseout"));previousAnchor.dispatchEvent(new Event("mouseleave"));},},...changeOptionInPopover("Countdown","At The End","Show Message and hide countdown"),{content:"Check that the countdown is not displayed",trigger:":iframe .s_countdown:has(.s_countdown_canvas_wrapper:not(:visible))",},{content:"Check that the message is still displayed",trigger:":iframe .s_countdown .s_picture",},]);return __exports;});;

/* /website/static/tests/tours/snippet_editor_panel_options.js */
odoo.define('@website/../tests/tours/snippet_editor_panel_options',['@website/js/tours/tour_utils','@web/core/browser/browser','@web/core/utils/concurrency'],function(require){'use strict';let __exports={};const{changeOption,changeOptionInPopover,clickOnSave,insertSnippet,goBackToBlocks,registerWebsitePreviewTour,selectFullText,}=require("@website/js/tours/tour_utils");const{browser}=require("@web/core/browser/browser");const{delay}=require("@web/core/utils/concurrency");const checkIfParagraphSelected=(trigger)=>({content:"Check if the paragraph is selected.",trigger:trigger,run(){const pText=this.anchor.textContent;const selection=this.anchor.ownerDocument.getSelection().toString();if(pText!==selection){console.error("The paragraph was not correctly selected.");}},});const checkIfTextToolbarVisible={content:"Check if the text toolbar is visible",trigger:".o-we-toolbar",};const oldWriteText=browser.navigator.clipboard.writeText;registerWebsitePreviewTour("snippet_editor_panel_options",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_text_image",name:"Text - Image",groupName:"Content",}),selectFullText("first paragraph",".s_text_image p:not([data-selection-placeholder])"),checkIfParagraphSelected(":iframe .s_text_image p:not([data-selection-placeholder])"),checkIfTextToolbarVisible,{content:"Click on the width option.",trigger:"[data-action-param='o_container_small']",run:"click",},{content:"The snippet should have the correct class.",trigger:":iframe .s_text_image > .o_container_small",},checkIfParagraphSelected(":iframe .s_text_image p:not([data-selection-placeholder])"),{content:"Click on the anchor option",trigger:"[data-container-title='Text - Image'] .oe_snippet_anchor",async run(helpers){browser.navigator.clipboard.writeText=()=>{console.info("Copy in clipboard ignored!");};await helpers.click();},},{content:"Check the copied url from the notification toast",trigger:".o_notification_manager .o_notification_content",run(){browser.navigator.clipboard.writeText=oldWriteText;const{textContent}=this.anchor;const url=textContent.substring(textContent.indexOf("/"));if(url.startsWith("/@")){console.error("The anchor option should target the frontend");}
const iframeDocument=document.querySelector(".o_iframe_container iframe").contentDocument;const snippetId=iframeDocument.querySelector(".s_text_image").id;if(!url||url.indexOf(snippetId)<0){console.error("The anchor option does not target the correct snippet.");}},},goBackToBlocks(),...insertSnippet({id:"s_text_block",name:"Text",groupName:"Text",}),{content:"Wait for the Scroll to finish",trigger:":iframe .s_text_block",run:async function(){await delay(610);},},selectFullText("first paragraph",".s_text_block p:not([data-selection-placeholder])"),checkIfParagraphSelected(":iframe .s_text_block p:not([data-selection-placeholder])"),checkIfTextToolbarVisible,...changeOptionInPopover("Text","Layout","[data-action-value='3']"),{content:"The snippet should have the correct number of columns.",trigger:":iframe .s_text_block .container > .row .col-lg-4:eq(3)",run(){if([...this.anchor.children].filter(child=>!child.hasAttribute("data-selection-placeholder")).length!==3){console.error("The snippet does not have the correct number of columns");}},},checkIfParagraphSelected(":iframe .s_text_block p:not([data-selection-placeholder])"),...changeOptionInPopover("Text","Layout","[data-action-value='0']"),{content:"The snippet should have the correct number of columns.",trigger:":iframe .s_text_block .container:not(:has(.row))",},checkIfParagraphSelected(":iframe .s_text_block p:not([data-selection-placeholder])"),changeOption("Text","[data-action-id='setGridLayout']"),{content:"The snippet row should have the grid mode class.",trigger:":iframe .s_text_block .row.o_grid_mode",},checkIfParagraphSelected(":iframe .s_text_block p:not([data-selection-placeholder])"),changeOption("Text","[data-action-id='setColumnLayout']"),{content:"The snippet row should not have the grid mode class anymore.",trigger:":iframe .s_text_block .row:not(.o_grid_mode)",},checkIfParagraphSelected(":iframe .s_text_block p:not([data-selection-placeholder])"),...clickOnSave(),]);return __exports;});;

/* /website/static/tests/tours/snippet_empty_parent_autoremove.js */
odoo.define('@website/../tests/tours/snippet_empty_parent_autoremove',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{changeOption,clickOnSnippet,insertSnippet,registerWebsitePreviewTour,changeOptionInPopover,}=require("@website/js/tours/tour_utils");function removeSelectedBlock(){return{content:"Remove selected block",trigger:".o-overlay-container .o_overlay_options .oe_snippet_remove",run:"click",};}
registerWebsitePreviewTour("snippet_empty_parent_autoremove",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_text_image",name:"Text - Image",groupName:"Content",}),{content:"Click on second column",trigger:":iframe #wrap .s_text_image .row > :nth-child(2)",run:"click",},removeSelectedBlock(),{content:"Click on first column",trigger:":iframe #wrap .s_text_image .row > :first-child",run:"click",},removeSelectedBlock(),{content:"Check that #wrap is empty",trigger:":iframe #wrap:empty",},...insertSnippet({id:"s_cover",name:"Cover",groupName:"Intro",}),...clickOnSnippet({id:"s_cover",name:"Cover",}),changeOption("Cover","toggleBgShape"),{content:"Click on the back button",trigger:".o_pager_nav_angle",run:"click",},{content:"Check that the parallax element is present",trigger:":iframe #wrap .s_cover .s_parallax_bg",},{content:"Check that the filter element is present",trigger:":iframe #wrap .s_cover .o_we_bg_filter",},{content:"Check that the shape element is present",trigger:":iframe #wrap .s_cover .o_we_shape",},...changeOptionInPopover("Cover","Layout","[data-action-value='1']"),{content:"Click on the created column",trigger:":iframe #wrap .s_cover .row > :first-child",run:"click",},removeSelectedBlock(),{content:"Check that #wrap is empty",trigger:":iframe #wrap:empty",},]);return __exports;});;

/* /website/static/tests/tours/snippet_image.js */
odoo.define('@website/../tests/tours/snippet_image',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{insertSnippet,registerWebsitePreviewTour}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("snippet_image",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_image",name:"Image"},{ignoreLoading:true}),{content:"Verify if the media dialog opens",trigger:".o_select_media_dialog",},{content:"Close the media dialog",trigger:".o_select_media_dialog .btn-close",run:"click",},{content:"Verify if the image placeholder has been removed",trigger:":iframe footer:not(:has(.s_image > svg))",},...insertSnippet({id:"s_image",name:"Image"},{ignoreLoading:true}),{content:"Verify that the image placeholder is within the page",trigger:":iframe footer .s_image > svg",},{content:"Click on the image",trigger:".o_select_media_dialog .o_existing_attachment_cell .o_button_area",run:"click",},{content:"Verify if the image has been added in the footer and if the image placeholder has been removed",trigger:":iframe footer:not(:has(.s_image > svg)) img.o_we_custom_image",},{content:"Click on the 'undo' button",trigger:".o-snippets-top-actions button.fa-undo",run:"click",},{content:"Check that the image and the image placeholder have been removed",trigger:":iframe footer:not(:has(.s_image > svg)):not(:has(img.o_we_custom_image))",},]);return __exports;});;

/* /website/static/tests/tours/snippet_image_gallery.js */
odoo.define('@website/../tests/tours/snippet_image_gallery',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{addMedia,changeOption,clickOnSave,clickOnSnippet,insertSnippet,registerWebsitePreviewTour,changeOptionInPopover,clickOnEditAndWaitEditMode,assertCssVariable,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("snippet_image_gallery",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_images_wall",name:"Images Wall",groupName:"Images"}),...clickOnSave(),{content:"Click on an image of the Image Wall",trigger:":iframe .s_image_gallery img",run:"click",},{content:"Check that the modal has opened properly",trigger:":iframe .s_gallery_lightbox img",},]);registerWebsitePreviewTour("snippet_image_gallery_remove",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_image_gallery",name:"Image Gallery",groupName:"Images",}),...clickOnSnippet({id:"s_image_gallery",name:"Image Gallery",}),{content:"Click on Remove all",trigger:"button[data-action-id='removeAllImages']",run:"click",},{content:"Click on Add Images",trigger:":iframe span:contains('Add Images')",run:"click",},{content:"Click on the first new image",trigger:".o_select_media_dialog .o_button_area[aria-label='s_default_image.jpg']",run:"click",},{content:"Click on the second new image",trigger:".o_select_media_dialog .o_button_area[aria-label='s_default_image2.webp']",run:"click",},addMedia(),{content:"Click on the image of the Image Gallery snippet",trigger:":iframe .s_image_gallery .carousel-item.active  img",run:"click",},{content:"Check that the Snippet Editor of the clicked image has been loaded with its size",trigger:".o-tab-content [data-container-title='Image']:has([title='Size']:text(.+ kB)",},{content:"Click on Remove Block",trigger:".o_customize_tab .options-container[data-container-title='Image Gallery'] .oe_snippet_remove",run:"click",},{content:"Check that the Image Gallery snippet has been removed",trigger:":iframe #wrap:not(:has(.s_image_gallery))",},]);registerWebsitePreviewTour("snippet_image_gallery_reorder",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_image_gallery",name:"Image Gallery",groupName:"Images",}),{content:"Click on the first image of the snippet",trigger:":iframe .s_image_gallery .carousel-item.active img",run:"click",},...changeOptionInPopover("Image","Filter","Blur"),{content:"Check that the image has the correct filter",trigger:".o_customize_tab [data-container-title='Image'] [data-label='Filter'] .o-dropdown:contains('Blur')",},changeOption("Image","[data-label='Re-order'] button[data-action-value='next']"),{content:"Check that the image has been moved",trigger:":iframe .s_image_gallery .carousel-item.active img[data-index='1']",},{content:"Click on the footer to reload the editor panel",trigger:":iframe #footer",run:"click",},{content:"Check that the footer options have been loaded",trigger:".o-tab-content [data-container-title='Footer']",},{content:"Click on the moved image",trigger:":iframe .s_image_gallery .carousel-item.active img",run:"click",},{content:"Check that the image still has the correct filter",trigger:".o_customize_tab [data-container-title='Image'] [data-label='Filter'] .o-dropdown:contains('Blur')",},{content:"Click to access next image",trigger:":iframe .s_image_gallery .carousel-control-next",run:"click",},{content:"Check that the option has changed",trigger:".o_customize_tab [data-container-title='Image'] [data-label='Filter'] .o-dropdown:contains('None')",},{content:"Click to access previous image",trigger:":iframe .s_image_gallery .carousel-control-prev",run:"click",},{content:"Check that the option is restored",trigger:".o_customize_tab [data-container-title='Image'] [data-label='Filter'] .o-dropdown:contains('Blur')",},{content:"Change the height of the snippet",trigger:`.o_customize_tab [data-container-title="Image Gallery"] [data-label="Height"] input`,run:"edit 400",},changeOption("Image","[data-label='Re-order'] button[data-action-value='next']"),{content:"Click on the moved image",trigger:":iframe .s_image_gallery .carousel-item.active img[data-index='2']",run:"click",},assertCssVariable("height","400px",":iframe .s_image_gallery"),]);registerWebsitePreviewTour("snippet_image_gallery_thumbnail_update",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_image_gallery",name:"Image Gallery",groupName:"Images",}),...clickOnSnippet({id:"s_image_gallery",name:"Image Gallery",}),...changeOptionInPopover("Image Gallery","Indicators","Squared Miniatures"),changeOption("Image Gallery","addImage"),{content:"Click on the default image",trigger:".o_select_media_dialog .o_button_area[aria-label='s_default_image.jpg']",run:"click",},addMedia(),{content:"Check that the new image has been added",trigger:":iframe .s_image_gallery_indicators_squared:has(img[data-index='3'])",},{content:"Check that the thumbnail of the first image has not been changed",trigger:":iframe .s_image_gallery div.carousel-indicators button:first-child[style='background-image: url(/web/image/website.library_image_08)']",},...clickOnSave(),...clickOnEditAndWaitEditMode(),{content:"Check that the thumbnail of the new image is displayed",trigger:":iframe .s_image_gallery div.carousel-indicators button:nth-child(4)[style*='s_default_image']",},{content:"Select the first image in the gallery",trigger:":iframe .s_image_gallery .carousel-item:first-child img",run:"click",},{content:"Open the replace media dialog",trigger:"[data-action-id='replaceMedia']",run:"click",},{content:"Pick another image to replace the first one",trigger:".o_select_media_dialog .o_button_area[aria-label='s_default_image_2.jpg']",run:"click",},...clickOnSave(),...clickOnEditAndWaitEditMode(),{content:"Check that the first image has been replaced",trigger:":iframe .s_image_gallery .carousel-item:first-child img[src*='s_default_image_2']",},{content:"Check that the thumbnail of the first image is updated",trigger:":iframe .s_image_gallery div.carousel-indicators button:first-child[style*='s_default_image_2']",},{content:"Select the second image in the gallery",trigger:":iframe .s_image_gallery .carousel-control-next-icon",run:"click",},changeOption("Image","[data-label='Shape'] .dropdown-toggle"),{content:"Click on the first image shape",trigger:"[data-action-id='setImageShape']",run:"click",},{content:"Check that the thumbnail of the second image is an SVG",trigger:":iframe .s_image_gallery div.carousel-indicators button:nth-child(2)[style*='data:image/svg+xml']",},]);return __exports;});;

/* /website/static/tests/tours/snippet_image_quality.js */
odoo.define('@website/../tests/tours/snippet_image_quality',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{insertSnippet,registerWebsitePreviewTour}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("website_image_quality",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_text_image",name:"Text - Image",groupName:"Content",}),{content:"Select image",trigger:":iframe .s_text_image img",run:"click",},{content:"Set low quality",trigger:".o_customize_tab div[data-container-title='Image'] div[data-action-id='setImageQuality'] input",run:"range 5",},{content:"Wait for image update: NOT original image",trigger:':iframe .s_text_image img:not([src$="s_text_image_default_image"])',},{content:"Check image size",trigger:".o_customize_tab [data-container-title='Image'] span[title='Size']:contains(' kb'):not(:contains('42.9 kb'))",run(){if(parseFloat(this.anchor.innerText)>=42.9){throw new Error("Image size should be smaller than original");}},},{content:"Set high quality",trigger:".o_customize_tab div[data-container-title='Image'] div[data-action-id='setImageQuality'] input",run:"range 99",},{content:"Wait for image update: back to original image",trigger:':iframe .s_text_image img[src$="S55YBaZ4YLuRoopv55ZIqZKBC8uATEEUgAAA="]',},{content:"Check image size",trigger:".o_customize_tab [data-container-title='Image'] span[title='Size']:contains('22.8')",},]);return __exports;});;

/* /website/static/tests/tours/snippet_images_wall.js */
odoo.define('@website/../tests/tours/snippet_images_wall',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{clickOnSnippet,insertSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");const wallRaceConditionClass="image_wall_race_condition";const preventRaceConditionSteps=[{content:"Wait a few ms to avoid race condition",trigger:`body:not(.${wallRaceConditionClass})`,run(){setTimeout(()=>{document.body.classList.add(wallRaceConditionClass);},500);},},{content:"Check the race condition class is added after a few ms",trigger:`body.${wallRaceConditionClass}`,run(){document.body.classList.remove(wallRaceConditionClass);},},];const selectSignImageStep=[{trigger:".o_customize_tab:not(:has([data-label='Re-order']))",},{content:"Click on image 14",trigger:":iframe .s_image_gallery img[src*='library_image_14']",run:"click",},];const reselectSignImageSteps=[...preventRaceConditionSteps,{trigger:":iframe .s_image_gallery .o_masonry_col:nth-child(2):has(img[data-index='1'])",},{content:"Select footer",trigger:":iframe footer",run:"click",},...selectSignImageStep,];registerWebsitePreviewTour("snippet_images_wall",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_images_wall",name:"Images Wall",groupName:"Images",}),...clickOnSnippet({id:"s_image_gallery",name:"Images Wall",}),...selectSignImageStep,{content:"Click on add a link",trigger:"div[data-label='Media'] button[data-action-id='setLink']",run:"click",},{content:"Change the link of the image",trigger:"div[data-label='Your URL'] div[data-action-id='setUrl'] input",run:"edit /contactus && click body",},{content:"Click on move to previous",trigger:"div[data-label='Re-order'] button[data-action-value='prev']",run:"click",},{content:"Check if sign is in second column",trigger:":iframe .s_image_gallery .o_masonry_col:nth-child(2):has(img[data-index='1'][src*='library_image_14'])",},...reselectSignImageSteps,{content:"Click on move to first",trigger:"div[data-label='Re-order'] button[data-action-value='first']",run:"click",},{content:"Check if sign is in first column",trigger:":iframe .s_image_gallery .o_masonry_col:nth-child(1):has(img[data-index='0'][src*='library_image_14'])",},...reselectSignImageSteps,{content:"Click on move to previous",trigger:"div[data-label='Re-order'] button[data-action-value='prev']",run:"click",},{content:"Check if sign is in third column",trigger:":iframe .s_image_gallery .o_masonry_col:nth-child(3):has(img[data-index='5'][src*='library_image_14'])",},...reselectSignImageSteps,{content:"Click on move to next",trigger:"div[data-label='Re-order'] button[data-action-value='next']",run:"click",},{content:"Check if sign is in first column",trigger:":iframe .s_image_gallery .o_masonry_col:nth-child(1):has(img[data-index='0'][src*='library_image_14'])",},...reselectSignImageSteps,{content:"Click on move to last",trigger:"div[data-label='Re-order'] button[data-action-value='last']",run:"click",},{content:"Check layout",trigger:":iframe .s_image_gallery .o_masonry_col:nth-child(3):has(img[data-index='5'][src*='library_image_14'])",},]);return __exports;});;

/* /website/static/tests/tours/snippet_popup_add_remove.js */
odoo.define('@website/../tests/tours/snippet_popup_add_remove',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{clickOnEditAndWaitEditMode,clickOnSave,insertSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("snippet_popup_add_remove",{url:"/",edition:true,},()=>[...insertSnippet({name:"Popup",id:"s_popup",groupName:"Content",}),{content:"Edit s_popup snippet",trigger:':iframe #wrap.o_editable [data-snippet="s_popup"] .row > div',run:"click",},{content:"Check s_popup setting are loaded, wait panel is visible",trigger:".o_customize_tab",},...clickOnSave(),...clickOnEditAndWaitEditMode(),{content:"Toggle the visibility of the Popup",trigger:'.o_we_invisible_el_panel .o_we_invisible_entry:contains("Popup")',run:"click",},{content:"Edit s_popup snippet(2)",trigger:':iframe #wrap.o_editable [data-snippet="s_popup"] h2',run:function(){const anchor=this.anchor;anchor.dispatchEvent(new KeyboardEvent("keydown",{key:"Enter",bubbles:true}));anchor.dispatchEvent(new InputEvent("input",{inputType:"insertLineBreak",bubbles:true}));},},{content:"Check the s_popup was visible",trigger:':iframe #wrapwrap:has([data-snippet="s_popup"]:not(.d-none))',},{content:`Remove the s_popup snippet`,trigger:".o_customize_tab [data-container-title='Popup'] button.oe_snippet_remove",run:"click",},{content:"Check the s_popup was removed",trigger:":iframe #wrap.o_editable:not(:has([data-snippet='s_popup']))",},...insertSnippet({name:"Popup",id:"s_popup",groupName:"Content",}),{content:"The popup should be in the invisible elements panel.",trigger:".o_we_invisible_el_panel .o_we_invisible_entry",},{content:"Click on the 'undo' button.",trigger:".o-snippets-top-actions button.fa-undo",run:"click",},{content:"Check that the s_popup was removed.",trigger:':iframe #wrap.o_editable:not(:has([data-snippet="s_popup"]))',},{content:"The invisible elements panel should also be removed.",trigger:".o-snippets-menu:not(:has(.o_we_invisible_el_panel)",},]);return __exports;});;

/* /website/static/tests/tours/snippet_popup_and_animations.js */
odoo.define('@website/../tests/tours/snippet_popup_and_animations',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{clickOnEditAndWaitEditMode,clickOnElement,clickOnSave,insertSnippet,registerWebsitePreviewTour,changeOptionInPopover,}=require("@website/js/tours/tour_utils");const snippets=[{id:"s_popup",name:"Popup",groupName:"Content",},{id:"s_media_list",name:"Media List",groupName:"Content",},{id:"s_three_columns",name:"Columns",groupName:"Columns",},];const setOnScrollAnim=function(){return[...changeOptionInPopover("Card","Animation","On Scroll"),...changeOptionInPopover("Card","Effect","Slide"),];};function scrollToSnippet(snippetId){return[{trigger:`:iframe .${snippetId}`,content:`Scroll to the ${snippetId} snippet`,run(){this.anchor.scrollIntoView();},},];}
registerWebsitePreviewTour("snippet_popup_and_animations",{url:"/",edition:true,},()=>[...insertSnippet(snippets[1]),...insertSnippet(snippets[1]),...insertSnippet(snippets[2]),clickOnElement("3rd columns",":iframe .s_three_columns .row > :last-child"),...setOnScrollAnim(),{content:"Open the Cookies Bar.",trigger:".o_we_invisible_el_panel .o_we_invisible_entry",run:"click",},{trigger:":iframe #website_cookies_bar:not(.d-none):not(:visible)",},{content:"Scroll to top",trigger:":iframe html",run(){const animatedColumnEl=this.anchor.querySelector(".s_three_columns .row > :last-child");if(Math.round(parseFloat(animatedColumnEl.style.animationDelay))!==-1){throw new Error("The scroll animation in the page did not start properly with the cookies bar open.");}
this.anchor.scrollTo({top:0,left:0,behavior:"smooth",});},},{trigger:":iframe header#top:not(.o_header_affixed)",},{content:"Wait for the page to be scrolled to the top.",trigger:":iframe .s_three_columns .row > .o_animating:last-child",isActive:[`:iframe .s_three_columns .row > .o_animating:last-child`],async run({waitUntil,anchor}){await waitUntil(()=>!anchor.classList.contains(`o_animating`),{timeout:10000,});},},{content:"Close the Cookies Bar.",trigger:".o_we_invisible_el_panel .o_we_invisible_entry",run:"click",},...insertSnippet(snippets[0]),...insertSnippet(snippets[1]),{content:"Drag the Columns snippet group and drop it at the bottom of the popup.",trigger:".o-snippets-menu .o_block_tab:not(.o_we_ongoing_insertion) .o_snippet[name='Columns'].o_draggable .o_snippet_thumbnail",run:"drag_and_drop :iframe #wrap .s_popup .modal-content.oe_structure .oe_drop_zone:last",},{content:"Click on the s_three_columns snippet.",trigger:":iframe .o_add_snippets_preview [data-snippet-id='s_three_columns']",run:"click",},{trigger:":iframe:not(:has(.o_loading_screen))",},clickOnElement("3rd columns",":iframe .s_popup .s_three_columns .row > :last-child"),...setOnScrollAnim(),{content:"Verify the animation delay of the animated element in the popup at the beginning",trigger:":iframe .s_popup .modal",run(){const animatedColumnEl=this.anchor.querySelector(".s_three_columns .row > :last-child");if(Math.round(parseFloat(animatedColumnEl.style.animationDelay))!==-1){throw new Error("The scroll animation in the modal did not start properly.");}
this.anchor.closest(".modal").scrollTo({top:0,left:0,behavior:"smooth",});},},{content:"Wait until the column is no longer animated/visible.",trigger:":iframe .s_three_columns .row > .o_animating:last-child",isActive:[`:iframe .s_three_columns .row > .o_animating:last-child`],async run({anchor,waitUntil}){await waitUntil(()=>!anchor.classList.contains(`o_animating`),{timeout:10000,});},},{content:"Close the Popup",trigger:".o_we_invisible_el_panel .o_we_invisible_entry:contains('Popup') i.fa-eye",run:"click",},{content:"Check that the popup has been closed",trigger:":iframe [data-snippet=s_popup] > .modal:not(:visible)",},...scrollToSnippet("s_three_columns"),clickOnElement("Last image of the 'Columns' snippet",":iframe .s_three_columns .o_animate_on_scroll img"),...changeOptionInPopover("Image","Animation","On Hover"),{content:"Check that the hover effect animation has been applied on the image",trigger:":iframe .s_three_columns .o_animate_on_scroll img[data-hover-effect='overlay']",},...clickOnSave(),...clickOnEditAndWaitEditMode(),...scrollToSnippet("s_three_columns"),clickOnElement("Image of the 'Columns' snippet with the overlay effect",":iframe .s_three_columns .o_animate_on_scroll img[data-hover-effect='overlay']"),...changeOptionInPopover("Image","Effect","Outline"),{trigger:".o_customize_tab .options-container[data-container-title='Image'] [data-label='Effect'] button:contains('Outline')",},{content:"Check that the outline effect has been applied on the image",trigger:":iframe .s_three_columns .o_animate_on_scroll img[data-hover-effect='outline']",},...clickOnSave(),{content:"Check that the image src is not the raw data",trigger:":iframe .s_three_columns .o_animate_on_scroll img[data-hover-effect='outline']",run(){const imgEl=document.querySelector("iframe").contentDocument.querySelector(".s_three_columns .o_animate_on_scroll img[data-hover-effect='outline']");const src=imgEl.getAttribute("src");if(src.startsWith("data:image")){throw new Error("The image source should not be raw data after the editor save");}},},...clickOnEditAndWaitEditMode(),...scrollToSnippet("s_three_columns"),clickOnElement("Image of the 'Columns' snippet with the outline effect",":iframe .s_three_columns .o_animate_on_scroll img[data-hover-effect='outline']"),...changeOptionInPopover("Image","Filter","Blur"),{trigger:".o_customize_tab .options-container[data-container-title='Image'] [data-label='Filter'] button:contains('Blur')",},{content:"Check that the Blur filter has been applied on the image",trigger:":iframe .s_three_columns .o_animate_on_scroll img[data-gl-filter='blur']",},{content:"Click on the 'undo' button",trigger:".o-snippets-top-actions button.fa-undo",run:"click",},{content:"Check that the Blur filter has been removed from the image",trigger:":iframe .s_three_columns .o_animate_on_scroll img:not([data-gl-filter='blur'])",},...clickOnSave(),{content:"Check that the image src is not the raw data",trigger:":iframe .s_three_columns .o_animate_on_scroll img[data-hover-effect='outline']",run(){const imgEl=document.querySelector("iframe").contentDocument.querySelector(".s_three_columns .o_animate_on_scroll img[data-hover-effect='outline']");const src=imgEl.getAttribute("src");if(src.startsWith("data:image")){throw new Error("The image source should not be raw data after the editor save");}},},]);return __exports;});;

/* /website/static/tests/tours/snippet_popup_and_scrollbar.js */
odoo.define('@website/../tests/tours/snippet_popup_and_scrollbar',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{changeOption,insertSnippet,goBackToBlocks,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");const snippets=[{id:"s_popup",name:"Popup",groupName:"Content",},{id:"s_media_list",name:"Media List",groupName:"Content",},];const checkScrollbar=function(hasScrollbar){return{content:`Check that the page ${
            hasScrollbar ? "has" : "does not have"
        } a vertical scrollbar.`,trigger:`:iframe ${hasScrollbar ? "body:not(.modal-open)" : "body.modal-open"}`,run:function(){const style=window.getComputedStyle(this.anchor);if(!hasScrollbar&&(style.overflow!=="hidden"||parseFloat(style.paddingRight)<1)){console.error("error The vertical scrollbar should be hidden");}else if(hasScrollbar&&(style.overflow==="hidden"||parseFloat(style.paddingRight)>0)){console.error("error The vertical scrollbar should be displayed");}},};};function toggleBackdrop(snippet){return changeOption(`${snippet}`,"[data-action-id='setBackdrop'] .form-check-input");}
const scrollIntoView=(selector)=>({content:`Scroll into view to make sure snippet controls are visible`,trigger:`:iframe ${selector}`,run(){this.anchor.scrollIntoView();},});registerWebsitePreviewTour("snippet_popup_and_scrollbar",{url:"/",edition:true,},()=>[...insertSnippet(snippets[1]),...insertSnippet(snippets[0]),checkScrollbar(false),{content:"Click on the s_popup snippet",trigger:":iframe .s_popup .modal",run:"click",},toggleBackdrop("Popup"),checkScrollbar(true),goBackToBlocks(),{content:"Drag the Content snippet group and drop it at the bottom of the popup.",trigger:".o-snippets-menu .o_block_tab:not(.o_we_ongoing_insertion) .o_snippet[name='Content'].o_draggable .o_snippet_thumbnail",run:"drag_and_drop :iframe #wrap .s_popup .oe_drop_zone:last",},{content:"Click on the s_media_list snippet.",trigger:":iframe .o_add_snippets_preview [data-snippet='s_media_list']",run:"click",},checkScrollbar(false),{trigger:":iframe:not(:has(.o_loading_screen))",},{content:"Select the Media List snippet in the Popup.",trigger:":iframe .s_popup .s_media_list",run:"click",},{content:"Remove the s_media_list snippet",trigger:".overlay .o_overlay_options .oe_snippet_remove",run:"click",},checkScrollbar(true),toggleBackdrop("Popup"),{content:"Close the Popup that has now backdrop.",trigger:".o_we_invisible_el_panel .o_we_invisible_entry:first",run:"click",},checkScrollbar(true),{content:"Open the Cookies Bar.",trigger:".o_we_invisible_el_panel .o_we_invisible_entry:last",run:"click",},checkScrollbar(true),toggleBackdrop("Cookies Bar"),toggleBackdrop("Cookies Bar"),checkScrollbar(true),{content:"Open the Popup that has backdrop.",trigger:".o_we_invisible_el_panel .o_we_invisible_entry:first",run:"click",},goBackToBlocks(),{content:"Drag the Content snippet group and drop it at the bottom of the popup.",trigger:".o-snippets-menu .o_snippet[name='Content'] .o_snippet_thumbnail:not(.o_we_ongoing_insertion)",run:"drag_and_drop :iframe #wrap .s_popup .modal-content.oe_structure .oe_drop_zone:last",},{content:"Click on the s_media_list snippet.",trigger:":iframe .o_add_snippets_preview [data-snippet='s_media_list']",run:"click",},{content:"Click on the s_popup snippet",trigger:":iframe .s_popup .modal",run(){this.anchor.scrollIntoView();this.anchor.click();},},{content:"Remove the s_popup snippet",trigger:".overlay .o_overlay_options .oe_snippet_remove",run:"click",},checkScrollbar(true),{content:"Open the Cookie Bar.",trigger:".o_we_invisible_el_panel .o_we_invisible_entry",run:"click",},goBackToBlocks(),{content:"Drag the Content snippet group and drop it in the Cookies Bar.",trigger:".o-snippets-menu .o_snippet[name='Content'] .o_snippet_thumbnail:not(.o_we_ongoing_insertion)",run:"drag_and_drop :iframe #website_cookies_bar .modal-content.oe_structure",},{content:"Click on the s_media_list snippet.",trigger:":iframe .o_add_snippets_preview [data-snippet='s_media_list']",run:"click",},{trigger:":iframe:not(:has(.o_loading_screen))",},{content:"Select the Media List snippet in the Cookies Bar.",trigger:":iframe #website_cookies_bar .modal-content .s_media_list",run:"click",},{content:"Duplicate the Media List snippet",trigger:".o_customize_tab .options-container[data-container-title='Media List'] .oe_snippet_clone",run:"click",},checkScrollbar(false),{content:"Select the Media List snippet in the Cookies Bar.",trigger:":iframe #website_cookies_bar .modal-content .s_media_list",run:"click",},scrollIntoView("#website_cookies_bar .s_media_list_item:last-child"),{content:"Remove the first Media List snippet in the Cookies Bar.",trigger:".overlay .o_overlay_options .oe_snippet_remove",run:"click",},scrollIntoView("#website_cookies_bar .s_media_list_item:last-child"),{content:"Remove the second Media List snippet in the Cookies Bar.",trigger:".overlay .o_overlay_options .oe_snippet_remove",run:"click",},checkScrollbar(true),]);return __exports;});;

/* /website/static/tests/tours/snippet_popup_display_on_click.js */
odoo.define('@website/../tests/tours/snippet_popup_display_on_click',['@website/js/tours/tour_utils','@web/core/browser/browser'],function(require){'use strict';let __exports={};const{clickOnEditAndWaitEditMode,clickOnElement,clickOnSave,insertSnippet,registerWebsitePreviewTour,openLinkPopup,}=require("@website/js/tours/tour_utils");const{browser}=require("@web/core/browser/browser");const oldWriteText=browser.navigator.clipboard.writeText;registerWebsitePreviewTour("snippet_popup_display_on_click",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_text_image",name:"Image - Text",groupName:"Content"}),...insertSnippet({id:"s_popup",name:"Popup",groupName:"Content"}),{content:"Click inside the popup to access its options menu.",trigger:":iframe .s_popup .s_banner",run:"click",},{content:"Click on Display option",trigger:".o_customize_tab [data-container-title='Popup'] [data-label='Display'] .dropdown-toggle",run:"click",},{content:"Click on the display 'On Click' option",trigger:".o_popover [data-action-id='copyAnchor']",async run(helpers){browser.navigator.clipboard.writeText=()=>{console.info("Copy in clipboard ignored!");};await helpers.click();},},{content:"Check the copied anchor from the notification toast",trigger:".o_notification_manager .o_notification_content",run(){browser.navigator.clipboard.writeText=oldWriteText;const notificationContent=this.anchor.innerText;const anchor=notificationContent.substring(notificationContent.indexOf("#"));if(anchor!=="#Win-%2420"){console.error("The popup anchor is not '#Win-%2420' as expected.");}},},clickOnElement("button to close the popup",":iframe .s_popup_close"),...openLinkPopup(":iframe .s_text_image a.btn-secondary","Button",1),clickOnElement("text image snippet button",".o-we-linkpopover .o_we_edit_link"),{content:"Add a link to the popup in the URL input",trigger:".o-we-linkpopover .o_we_href_input_link",run:"edit #Win-%2420",},...clickOnSave(),{content:"Wait content of iframe is loaded",trigger:":iframe main:contains(enhance your)",},clickOnElement("text image snippet button",":iframe .s_text_image .btn-secondary"),{content:"Verify that the popup opens after clicked the button.",trigger:":iframe .s_popup .modal[id='Win-%2420'].show",run:"click",},clickOnElement("button to close the popup",":iframe .s_popup_close"),{content:"Go to the 'contactus' page.",trigger:":iframe a[href='/contactus']",run:"click",},{content:"wait for the page to be loaded",trigger:":iframe [data-view-xmlid='website.contactus']",},...clickOnEditAndWaitEditMode(),...insertSnippet({id:"s_text_image",name:"Image - Text",groupName:"Content"}),{content:"Click on the text image snippet to edit it.",trigger:":iframe .s_text_image",run:"click",},...openLinkPopup(":iframe .s_text_image a.btn-secondary","Button",1),clickOnElement("text image snippet button",".o-we-linkpopover .o_we_edit_link"),{content:"Add a link to the homepage in the URL input",trigger:".o-we-linkpopover .o_we_href_input_link",run:"edit /#Win-%2420",},...clickOnSave(),{content:"Wait content of iframe is loaded",trigger:":iframe main:contains(enhance your)",},{content:"Wait form is patched",trigger:":iframe form#contactus_form input[name=company]:value(yourcompany)",},clickOnElement("text image snippet button",":iframe .s_text_image .btn-secondary"),{trigger:":iframe [data-view-xmlid='website.homepage']",},{content:"Verify that the popup opens when the homepage page loads.",trigger:":iframe .s_popup .modal[id='Win-%2420'].show",},]);return __exports;});;

/* /website/static/tests/tours/snippet_popup_esc.js */
odoo.define('@website/../tests/tours/snippet_popup_esc',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{clickOnSave,insertSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("snippet_popup_esc",{url:"/",edition:true,},()=>[...insertSnippet({name:"Popup",id:"s_popup",groupName:"Content",}),{content:"Click inside the popup to access its options",trigger:":iframe .s_popup .modal-content .btn:contains('New customer')",run:"click",},{content:"Remove the 'New customer' button so the popup has no focusable elements",trigger:".options-container[data-container-title=Button] [title='Remove this block']",run:"click",},{content:"Set delay to 0 so the popup appears immediately after save",trigger:'[data-label="Delay"] input',run:"edit 0",},...clickOnSave(),{content:"Wait for the popup to be displayed after save",trigger:":iframe .s_popup .modal",async run(){const{promise,resolve}=Promise.withResolvers();this.anchor.addEventListener("shown.bs.modal",resolve);await promise;},},{content:"Press ESC to close the popup",trigger:":iframe",run:"press Escape",},{content:"Verify the popup is closed",trigger:":iframe .s_popup .modal:not(.show)",},]);return __exports;});;

/* /website/static/tests/tours/snippet_popup_open_on_top.js */
odoo.define('@website/../tests/tours/snippet_popup_open_on_top',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{clickOnSave,insertSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("snippet_popup_open_on_top",{url:"/",edition:true,},()=>[...insertSnippet({name:"Popup",id:"s_popup",groupName:"Content",}),{content:"Change content for long text.",trigger:":iframe .s_popup p.lead",run:"editor "+" hello world".repeat(300),},{content:"Set delay to 0 second",trigger:'[data-action-id="setPopupDelay"] input',run:"edit 0",},...clickOnSave(),{content:"Check that the modal is scrolled on top",trigger:":iframe .s_popup .modal.show:contains('hello world')",run:async function(){const modalEl=this.anchor;let activeEl=modalEl.ownerDocument.activeElement;if(activeEl.parentElement.closest(".modal")!==modalEl){await new Promise((resolve)=>modalEl.addEventListener("shown.bs.modal",resolve));}
if(modalEl.scrollHeight<=modalEl.clientHeight){console.error("There is no scrollbar on the modal");}
activeEl=modalEl.ownerDocument.activeElement;if(activeEl.parentElement.closest(".modal")!==modalEl){console.error("The focus should be on an element inside the modal");}
if(modalEl.scrollTop!==0){console.error("The modal scrollbar is not scrolled at the top");}},},]);return __exports;});;

/* /website/static/tests/tours/snippet_rating.js */
odoo.define('@website/../tests/tours/snippet_rating',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{changeOptionInPopover,clickOnSnippet,insertSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("snippet_rating",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_rating",name:"Rating"}),...clickOnSnippet({id:"s_rating",name:"Rating"}),...changeOptionInPopover("Rating","Title Position","[data-class-action='s_rating_inline']"),{content:"Check whether s_rating_inline class applied or not",trigger:":iframe .s_rating_inline",},...changeOptionInPopover("Rating","Title Position","[data-class-action='s_rating_no_title']"),{content:"Check whether s_rating_no_title class applied or not",trigger:":iframe .s_rating_no_title",},...changeOptionInPopover("Rating","Title Position","Top"),{content:"Check whether s_rating_no_title class removed or not",trigger:":iframe .s_rating:not(.s_rating_no_title)",},]);return __exports;});;

/* /website/static/tests/tours/snippet_social_media.js */
odoo.define('@website/../tests/tours/snippet_social_media',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{clickOnEditAndWaitEditMode,clickOnSave,clickOnSnippet,insertSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");const socialRaceConditionClass="social_media_race_condition";const preventRaceConditionStep=[{trigger:`body:not(.${socialRaceConditionClass})`,},{content:"Wait a few ms to avoid race condition",trigger:":iframe .s_social_media",run(){setTimeout(()=>{document.body.classList.add(socialRaceConditionClass);},500);},},{content:"Check the race condition class is added after a few ms",trigger:`body.${socialRaceConditionClass}`,run(){document.body.classList.remove(socialRaceConditionClass);},},];const replaceIconByImage=function(url){return[{content:"Replace the icon by an image",trigger:`:iframe .s_social_media a[href='${url}'] i.fa`,run:"dblclick",},{content:"Go to the Images tab in the media dialog",trigger:".o_select_media_dialog .o_notebook_headers .nav-item a:contains('Images')",run:"click",},{content:"Select the image",trigger:".o_select_media_dialog .o_button_area[aria-label='s_banner_default_image.jpg']",run:"click",},...preventRaceConditionStep,];};const addNewSocialNetwork=function(optionIndex,linkIndex,url,replaceIcon=false){const replaceIconByImageSteps=replaceIcon?replaceIconByImage("https://www.example.com"):[];return[{content:"Click on Add New Social Network",trigger:"div[data-container-title='Social Media'] button[data-action-id='addSocialMediaLink']",run:"click",},{content:"Ensure new option is found",trigger:`.o_social_media_list tr:eq(${optionIndex}):has(div[data-action-id="editSocialMediaLink"])`,},{content:"Ensure new link is found",trigger:`:iframe .s_social_media:has(a:eq(${linkIndex})[href='https://www.example.com'])`,},...replaceIconByImageSteps,{content:"Change added Option label",trigger:`.o_social_media_list tr:eq(${optionIndex}) input`,run:`edit ${url} && click body`,},{content:"Ensure new link is changed",trigger:`:iframe .s_social_media:has(a:eq(${linkIndex})[href='${url}'])`,},...preventRaceConditionStep,];};registerWebsitePreviewTour("snippet_social_media",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_social_media",name:"Social Media"}),...clickOnSnippet({id:"s_social_media",name:"Social Media"}),...addNewSocialNetwork(8,8,"https://www.youtu.be/y7TlnAv6cto"),{content:"Click on the toggle to hide Facebook",trigger:".o_social_media_list div[data-action-id='toggleRecordedSocialMediaLink'] input[type='checkbox']",run:"click",},{content:"Ensure twitter became first",trigger:':iframe .s_social_media:has(a:eq(0)[href="/website/social/twitter"])',},{content:"Drag the facebook link at the end of the list",trigger:".o_social_media_list button.o_drag_handle",tooltipPosition:"bottom",run:"drag_and_drop .o_social_media_list tr:last-child",},{content:"Check drop completed",trigger:".o_social_media_list tr:eq(8) div[data-action-param='facebook']",},...preventRaceConditionStep,...addNewSocialNetwork(9,8,"https://whatever.it/1EdSw9X"),...addNewSocialNetwork(10,9,"https://instagr.am/odoo.official/"),{content:"Check if the result is correct before removing",trigger:":iframe .s_social_media"+":has(a:eq(0)[href='/website/social/twitter'])"+":has(a:eq(1)[href='/website/social/linkedin'])"+":has(a:eq(2)[href='/website/social/youtube'])"+":has(a:eq(3)[href='/website/social/instagram'])"+":has(a:eq(4)[href='/website/social/github'])"+":has(a:eq(5)[href='/website/social/tiktok'])"+":has(a:eq(6)[href='/website/social/discord'])"+":has(a:eq(7)[href='https://www.youtu.be/y7TlnAv6cto']:has(i.fa-youtube-play))"+":has(a:eq(8)[href='https://whatever.it/1EdSw9X']:has(i.fa-pencil))"+":has(a:eq(9)[href='https://instagr.am/odoo.official/']:has(i.fa-instagram))",},{content:"Change custom social to unsupported link",trigger:".o_social_media_list tr:eq(7) input",run:"edit https://www.paypal.com/abc && click body",},{content:"Ensure paypal icon is found",trigger:":iframe .s_social_media"+":has(a:eq(7)[href='https://www.paypal.com/abc']:has(i.fa-paypal))",},...preventRaceConditionStep,{content:"Delete the custom link",trigger:".o_social_media_list button[data-action-id='deleteSocialMediaLink']",run:"click",},{content:"Ensure custom link was removed",trigger:':iframe .s_social_media:has(a:eq(7)[href="https://whatever.it/1EdSw9X"]:has(i.fa-pencil))',},{content:"Click on the toggle to show Facebook",trigger:".o_social_media_list input[type='checkbox']:not(:checked)",run:"click",},{content:"Check if the result is correct after removing",trigger:":iframe .s_social_media"+":has(a:eq(0)[href='/website/social/twitter'])"+":has(a:eq(1)[href='/website/social/linkedin'])"+":has(a:eq(2)[href='/website/social/youtube'])"+":has(a:eq(3)[href='/website/social/instagram'])"+":has(a:eq(4)[href='/website/social/github'])"+":has(a:eq(5)[href='/website/social/tiktok'])"+":has(a:eq(6)[href='/website/social/discord'])"+":has(a:eq(7)[href='/website/social/facebook'])"+":has(a:eq(8)[href='https://whatever.it/1EdSw9X']:has(i.fa-pencil))"+":has(a:eq(9)[href='https://instagr.am/odoo.official/']:has(i.fa-instagram))",},{content:"Change url of the DB instagram link",trigger:".o_social_media_list tr:eq(3) input",run:"edit https://instagram.com/odoo.official/ && click body",},...preventRaceConditionStep,...clickOnSave(),...clickOnEditAndWaitEditMode(),...clickOnSnippet({id:"s_social_media",name:"Social Media",}),{content:"Check if we can still change custom icons",trigger:':iframe .s_social_media a[href="https://whatever.it/1EdSw9X"] i.fa-pencil',run:"dblclick",},{content:"Select a new icon",trigger:".o_select_media_dialog .fa-heart",run:"click",},{content:"Check if the result is correct after setting the icon",trigger:":iframe .s_social_media"+":has(a:eq(0)[href='/website/social/twitter'])"+":has(a:eq(1)[href='/website/social/linkedin'])"+":has(a:eq(2)[href='/website/social/youtube'])"+":has(a:eq(3)[href='/website/social/instagram'])"+":has(a:eq(4)[href='/website/social/github'])"+":has(a:eq(5)[href='/website/social/tiktok'])"+":has(a:eq(6)[href='/website/social/discord'])"+":has(a:eq(7)[href='/website/social/facebook'])"+":has(a:eq(8)[href='https://whatever.it/1EdSw9X']:has(i.fa-heart))"+":has(a:eq(9)[href='https://instagr.am/odoo.official/']:has(i.fa-instagram))",},...addNewSocialNetwork(10,10,"https://google.com",true),...replaceIconByImage("/website/social/twitter"),...addNewSocialNetwork(11,11,"https://facebook.com"),{content:"Check if the result is correct after adding images",trigger:":iframe .s_social_media"+":has(a:eq(0)[href='/website/social/twitter']:has(img))"+":has(a:eq(10)[href='https://google.com']:has(img))"+":has(a:eq(11)[href='https://facebook.com']:has(img))",},...clickOnSave(),]);return __exports;});;

/* /website/static/tests/tours/snippet_table_of_content.js */
odoo.define('@website/../tests/tours/snippet_table_of_content',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{clickOnEditAndWaitEditMode,clickOnSave,insertSnippet,goBackToBlocks,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");const scrollToHeading=function(position){return{content:`Scroll to h2 number ${position}`,trigger:`:iframe .s_table_of_content h2:eq(${position})`,run:function(){this.anchor.scrollIntoView(true);},};};const checkTOCNavBar=function(tocPosition,activeHeaderPosition){return{content:`Check that the header ${activeHeaderPosition} is active for TOC ${tocPosition}`,trigger:`:iframe .s_table_of_content:eq(${tocPosition}) .table_of_content_link:eq(${activeHeaderPosition}).active `,};};registerWebsitePreviewTour("snippet_table_of_content",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_table_of_content",name:"Table of Content",groupName:"Text"}),{content:"Drag the Text snippet group and drop it.",trigger:".o-snippets-menu .o_block_tab:not(.o_we_ongoing_insertion) .o_snippet[name='Text'] .o_snippet_thumbnail",run:"drag_and_drop :iframe #wrap",},{content:"Click on the s_table_of_content snippet.",trigger:':iframe .o_add_snippets_preview [data-snippet="s_table_of_content"]',run:"click",},...insertSnippet({id:"s_banner",name:"Banner",groupName:"Intro"}),{content:"Drag the Intro snippet group and drop it.",trigger:".o-snippets-menu .o_block_tab:not(.o_we_ongoing_insertion) .o_snippet[name='Intro'] .o_snippet_thumbnail",run:"drag_and_drop :iframe #wrap",},{content:"Click on the s_banner snippet.",trigger:':iframe .o_add_snippets_preview [data-snippet="s_banner"]',run:"click",},...clickOnSave(),checkTOCNavBar(0,0),checkTOCNavBar(1,0),scrollToHeading(1),checkTOCNavBar(0,1),checkTOCNavBar(1,0),scrollToHeading(2),checkTOCNavBar(1,0),scrollToHeading(3),checkTOCNavBar(1,1),...clickOnEditAndWaitEditMode(),{content:"Click on the first TOC's title",trigger:":iframe .s_table_of_content:eq(0) h2",run:"click",},{content:"Hide the first TOC on mobile",trigger:'[data-action-param="no_mobile"]',run:"click",},goBackToBlocks(),{content:"Click on the second TOC's title",trigger:":iframe .s_table_of_content:eq(1) h2",run:"click",},{content:"Hide the second TOC on desktop",trigger:'[data-action-param="no_desktop"]',run:"click",},...clickOnSave(),{content:"Check that we have the good TOC on desktop",trigger:":iframe .s_table_of_content.o_snippet_mobile_invisible",},{content:"The mobile TOC should not be visible on desktop",trigger:":iframe .s_table_of_content.o_snippet_desktop_invisible:not(:visible)",},{content:"Toggle the mobile view",trigger:".o_mobile_preview > a",run:"click",},{content:"Check that we have the good TOC on mobile",trigger:":iframe .s_table_of_content.o_snippet_desktop_invisible",},{content:"The desktop TOC should not be visible on mobile",trigger:":iframe .s_table_of_content.o_snippet_mobile_invisible:not(:visible)",},]);return __exports;});;

/* /website/static/tests/tours/snippet_tabs.js */
odoo.define('@website/../tests/tours/snippet_tabs',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{registerWebsitePreviewTour,insertSnippet,changeOption,clickOnSnippet,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("snippet_tabs",{edition:true,url:"/",},()=>[...insertSnippet({id:"s_tabs",name:"Tabs",groupName:"Content",}),...clickOnSnippet(".s_tabs_common.s_tabs"),changeOption("Tabs","button[aria-label='Remove Tab']"),{content:"Check that only 2 tab panes remain",trigger:":iframe .s_tabs .s_tabs_content",run(){if(this.anchor.querySelectorAll(".tab-pane").length!==2){console.error("There should be exactly 2 tab panes in the DOM.");}},},{content:"Check that the first tab link is active",trigger:":iframe .s_tabs .nav-item:nth-of-type(1) .nav-link.active",},changeOption("Tabs","button[aria-label='Add Tab']"),{content:"Check there are 3 tab panes",trigger:":iframe .s_tabs .s_tabs_content",run(){if(this.anchor.querySelectorAll(".tab-pane").length!==3){console.error("There should be exactly 3 tab panes in the DOM.");}},},]);return __exports;});;

/* /website/static/tests/tours/snippet_translation.js */
odoo.define('@website/../tests/tours/snippet_translation',['@web/core/l10n/localization','@web/core/l10n/translation','@website/js/tours/tour_utils','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{localization}=require("@web/core/l10n/localization");const{translatedTermsGlobal}=require("@web/core/l10n/translation");const{clickOnEditAndWaitEditMode,clickOnEditAndWaitEditModeInTranslatedPage,clickOnSave,insertSnippet,registerWebsitePreviewTour,testSwitchWebsite,}=require("@website/js/tours/tour_utils");const{stepUtils}=require("@web_tour/tour_utils");registerWebsitePreviewTour("snippet_translation",{url:"/",},()=>[{content:"Wait for website preview and check language",trigger:":iframe html:has(body:contains(welcome to your)):has(.o_top_fixed_element)",run:()=>{if(localization.code!=="fu_GB"){console.error("the user language is not properly set");}else{translatedTermsGlobal["Save"]="Save in fu_GB";}},},...clickOnEditAndWaitEditMode(),...insertSnippet({id:"s_cover",name:"Cover",groupName:"Intro"}),{content:"Check that contact us contain Parseltongue",trigger:':iframe .s_cover .btn-outline-secondary:contains("Contact us in Parseltongue")',},{content:"Check that the save button contains 'in fu_GB'",trigger:'.btn[data-action="save"]:contains("Save in fu_GB")',},]);registerWebsitePreviewTour("snippet_translation_changing_lang",{url:"/",},()=>[stepUtils.waitIframeIsReady(),{content:"Open dropdown language selector",trigger:":iframe .js_language_selector button",run:"click",},{content:"Select the language to Parseltongue",trigger:":iframe .js_language_selector .js_change_lang[data-url_code=pa_GB]",run:"click",},{content:"Wait the language has changed.",trigger:":iframe header.o_top_fixed_element nav li:contains(parseltongue)",},{content:"Open dropdown language selector",trigger:":iframe .js_language_selector button",run:"click",},{content:"Select the language to English",trigger:":iframe .js_language_selector .js_change_lang[data-url_code=en]",run:"click",},{content:"Wait the language has changed.",trigger:":iframe nav li:contains(english)",},{content:"Open Edit dropdown",trigger:".o_edit_website_container button",run:"click",},{content:"Enable translation",trigger:".o_translate_website_dropdown_item",run:"click",},{content:"Close the dialog",trigger:".modal-footer .btn-primary",run:"click",},...clickOnSave(),...clickOnEditAndWaitEditModeInTranslatedPage(),...insertSnippet({name:"Cover",id:"s_cover",groupName:"Intro"}),{content:"Check that contact us contain Parseltongue",trigger:':iframe .s_cover .btn-outline-secondary:contains("Contact us in Parseltongue")',},]);registerWebsitePreviewTour("snippet_translation_switching_website",{url:"/",},()=>[...clickOnEditAndWaitEditModeInTranslatedPage(),...insertSnippet({id:"s_cover",name:"Cover",groupName:"Intro"}),{content:"Check that contact us contain Parseltongue",trigger:":iframe .s_cover .btn-outline-secondary:contains('Contact us in Parseltongue')",},...clickOnSave(),...testSwitchWebsite("website fu_GB"),...clickOnEditAndWaitEditMode(),...insertSnippet({id:"s_cover",name:"Cover",groupName:"Intro"}),{content:"Check that contact us contain Fake User Lang",trigger:":iframe .s_cover .btn-outline-secondary:contains('Fake User Lang')",},]);registerWebsitePreviewTour("snippet_dialog_rtl",{url:"/",},()=>[...clickOnEditAndWaitEditMode(),{trigger:".o_builder_sidebar_open",},{content:"Select a category snippet to show the snippet dialog",trigger:`.o_block_tab:not(.o_we_ongoing_insertion) #snippet_groups .o_snippet[name="Intro"].o_draggable .o_snippet_thumbnail_area`,run:"click",},{content:"Check that the snippets preview is in rtl",trigger:":iframe .o_snippets_preview_row[dir=rtl]",},{content:"Check that web.assets_frontend CSS bundle is in rtl",trigger:":iframe link[type='text/css'][href*='/web.assets_frontend.rtl']:not(:visible)",},]);return __exports;});;

/* /website/static/tests/tours/snippet_version.js */
odoo.define('@website/../tests/tours/snippet_version',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{clickOnSave,insertSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("snippet_version_1",{edition:true,url:"/",},()=>[...insertSnippet({id:"s_test_snip",name:"Test snip",groupName:"Content",}),...insertSnippet({id:"s_text_image",name:"Text - Image",groupName:"Content",}),{content:"Test t-snippet and t-snippet-call: snippets have data-snippet set",trigger:".o-snippets-menu .o_snippets_container_body > .o_snippet",run:function(){const draggableSnippets=[...document.querySelectorAll(".o-snippets-menu .o_snippets_container_body > .o_snippet:not([data-module-id]) > :nth-child(2)"),];if(draggableSnippets.length&&!draggableSnippets.every((el)=>el.dataset.snippet)){console.error("error Some t-snippet are missing their template name or there are no snippets to drop");}
if(!document.querySelector("iframe:not(.o_ignore_in_tour)").contentDocument.querySelector('#wrap [data-snippet="s_test_snip"] [data-snippet="s_share"]')){console.error("error Dropped a s_test_snip snippet but missing s_share template name in it");}},},...clickOnSave(),]);return __exports;});;

/* /website/static/tests/tours/snippet_visibility_option.js */
odoo.define('@website/../tests/tours/snippet_visibility_option',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{insertSnippet,clickOnSave,clickOnEditAndWaitEditMode,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("snippet_visibility_option",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_popup",name:"Popup",groupName:"Content",}),{content:"Click on the column within the popup snippet.",trigger:":iframe #wrap .s_popup .o_cc1",run:"click",},{content:"Click the 'No Desktop' visibility option.",trigger:"[data-container-title='Column'] [data-action-param='no_desktop']",run:"click",},{content:"Click on the banner within the popup snippet.",trigger:":iframe #wrap .s_popup .s_banner",run:"click",},{content:"Click the 'No Desktop' visibility option.",trigger:"[data-container-title='Block'] [data-action-param='no_desktop']",run:"click",},{content:"Click on the popup snippet to hide",trigger:".o_we_invisible_root_parent",run:"click",},{content:"Click on the popup snippet in the list of invisible elements.",trigger:".o_we_invisible_root_parent",run:"click",},{content:"Check that only the banner is marked as invisible and the column entry does not appear in the panel.",trigger:"li > .o_we_invisible_entry",run:()=>{const isBlockInvisible=document.querySelector("li .o_we_invisible_entry i").classList.contains("fa-eye-slash");const isColumnEntryDisplayed=document.querySelector("li li .o_we_invisible_entry");if(!isBlockInvisible||!!isColumnEntryDisplayed){console.error("Visibility issue detected with the elements.");}},},...clickOnSave(),...clickOnEditAndWaitEditMode(),{content:"Check that only the popup entry is displayed and that it is invisible.",trigger:".o_we_invisible_root_parent",run:()=>{const isSubentryDisplayed=document.querySelector("li .o_we_invisible_entry");const isPopupInvisible=document.querySelector(".o_we_invisible_root_parent > i").classList.contains("fa-eye-slash");if(!!isSubentryDisplayed||!isPopupInvisible){console.error("Visibility issue detected with the elements.");}},},{content:"Click on the popup entry to show it.",trigger:".o_we_invisible_root_parent",run:"click",},{content:"Click on the banner entry to show it.",trigger:"li > .o_we_invisible_entry",run:"click",},{content:"Check that the popup and banner are visible and the column is still invisible.",trigger:"li li > .o_we_invisible_entry",run:()=>{const isPopupVisible=document.querySelector(".o_we_invisible_root_parent i").classList.contains("fa-eye");const isBannerVisible=document.querySelector("li .o_we_invisible_entry i").classList.contains("fa-eye");const isColumnInvisible=document.querySelector("li li .o_we_invisible_entry i").classList.contains("fa-eye-slash");if(!isPopupVisible||!isBannerVisible||!isColumnInvisible){console.error("Visibility issue detected with the elements.");}},},{content:"Click on the popup entry to hide it.",trigger:".o_we_invisible_root_parent",run:"click",},{content:"Check that only the popup entry is displayed and that it is invisible.",trigger:".o_we_invisible_root_parent",run:()=>{const isSubentryDisplayed=document.querySelector("li .o_we_invisible_entry");const isPopupInvisible=document.querySelector(".o_we_invisible_root_parent > i").classList.contains("fa-eye-slash");if(!!isSubentryDisplayed||!isPopupInvisible){console.error("Visibility issue detected with the elements.");}},},{content:"Click on the popup entry to show it.",trigger:".o_we_invisible_root_parent",run:"click",},{content:"Check that the popup and banner are visible and the column is still invisible.",trigger:"li > .o_we_invisible_entry",run:()=>{const isPopupVisible=document.querySelector(".o_we_invisible_root_parent i").classList.contains("fa-eye");const isBannerVisible=document.querySelector("li .o_we_invisible_entry i").classList.contains("fa-eye");const isColumnInvisible=document.querySelector("li li .o_we_invisible_entry i").classList.contains("fa-eye-slash");if(!isPopupVisible||!isBannerVisible||!isColumnInvisible){console.error("Visibility issue detected with the elements.");}},},]);return __exports;});;

/* /website/static/tests/tours/snippets_all_drag_and_drop.js */
odoo.define('@website/../tests/tours/snippets_all_drag_and_drop',['@website/js/tours/tour_utils','@web/core/registry'],function(require){'use strict';let __exports={};const{clickOnEditAndWaitEditMode,insertSnippet,goBackToBlocks,clickOnSnippet,changeOptionInPopover,}=require("@website/js/tours/tour_utils");const{registry}=require("@web/core/registry");const SUB_SNIPPET_TEMPLATES=__exports.SUB_SNIPPET_TEMPLATES={s_masonry_block_default_template:"s_masonry_block",s_masonry_block_reversed_template:"s_masonry_block",s_masonry_block_images_template:"s_masonry_block",s_masonry_block_mosaic_template:"s_masonry_block",s_masonry_block_alternation_text_image_template:"s_masonry_block",s_masonry_block_alternation_image_text_template:"s_masonry_block",};const DROP_IN_ONLY_SNIPPETS={s_button:".btn",s_video:".media_iframe_video",};let snippetsNames=new URL(document.location.href).searchParams.get("snippets_names")||"";const searchParams=new URLSearchParams(window.location.search).get("path");if(searchParams){snippetsNames=new URLSearchParams(searchParams.split("/")[1]).get("snippets_names")||"";snippetsNames=snippetsNames.split(",");}
registry.category("web_tour.tours").add("snippets_all_drag_and_drop",{steps:()=>{let steps=[];let n=0;for(let snippet of snippetsNames){n++;snippet={name:snippet.split(":")[0],group:snippet.split(":")[1],};const isModal=["s_popup","s_newsletter_subscribe_popup","s_newsletter_benefits_popup",].includes(snippet.name);const isDropInOnlySnippet=Object.keys(DROP_IN_ONLY_SNIPPETS).includes(snippet.name);const snippetKey=SUB_SNIPPET_TEMPLATES[snippet.name]||snippet.name;let draggableElSelector="";if(snippet.group){draggableElSelector=`.o_block_tab:not(.o_we_ongoing_insertion) #snippet_groups [data-snippet-group="${snippet.group}"] .o_snippet_thumbnail`;}else{draggableElSelector=`.o_block_tab:not(.o_we_ongoing_insertion) #snippet_content [data-snippet="${snippet.name}"].o_snippet_thumbnail`;}
const snippetSteps=[{content:`Drop ${snippet.group || snippet.name} ${
                        snippet.group ? "group" : "snippet"
                    } [${n}/${snippetsNames.length}]`,trigger:draggableElSelector,run:"drag_and_drop :iframe #wrapwrap .oe_drop_zone",},{content:"Wait for the drag and drop to be over",trigger:".o_block_tab:not(.o_we_ongoing_insertion)",},{content:`Click on ${snippet.name} snippet`,trigger:`:iframe #wrapwrap [data-snippet="${snippetKey}"]${
                        isModal ? " .modal.show" : ""
                    }`,run:"click",},{content:`Check ${snippet.name} settings are loaded, wait for panel to be visible`,trigger:".o_customize_tab",},{content:`Remove the ${snippet.name} snippet`,trigger:".options-container .oe_snippet_remove:last",run:"click",},goBackToBlocks(),];if(snippet.group){snippetSteps.splice(1,0,{content:"Click on the snippet preview in the dialog",trigger:`:iframe .o_snippet_preview_wrap[data-snippet-id="${snippet.name}"]`,run:"click",});}
if(snippet.name==="s_google_map"){snippetSteps.splice(3,3,{content:"Close API Key popup",trigger:":iframe .modal-footer .btn-secondary",run:"click",});}else if(isModal){snippetSteps.splice(5,0,{content:`Make sure ${snippet.name} is shown`,trigger:":iframe body.modal-open",});}else if(isDropInOnlySnippet){snippetSteps[2].trigger=`:iframe #wrapwrap ${
                    DROP_IN_ONLY_SNIPPETS[snippet.name]
                }`;}
steps=steps.concat(snippetSteps);}
return[...clickOnEditAndWaitEditMode(),{content:"Ensure snippets are actually passed at the test.",trigger:"body",run:function(){if(steps.length<500){console.error(`This test is not behaving as it should, got only ${steps.length} steps.`);}},},...insertSnippet({id:"s_text_image",name:"Text - Image",groupName:"Content"}),{content:"Click on s_text_image snippet",trigger:":iframe #wrap.o_editable [data-snippet='s_text_image']",run:"click",},{content:"Check settings are loaded, wait for panel to be visible",trigger:".o_customize_tab [data-container-title='Text - Image']",},...clickOnSnippet({id:"o_header_standard",name:"Header"}),...changeOptionInPopover("Header","Header Position","Hidden"),goBackToBlocks(),].concat(steps).map((step)=>{delete step.noPrepend;return step;});},});return __exports;});;

/* /website/static/tests/tours/specific_website_editor.js */
odoo.define('@website/../tests/tours/specific_website_editor',['@web/core/registry','@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{clickOnEditAndWaitEditMode,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("generic_website_editor",{edition:true,},()=>[{trigger:':iframe body:not([data-hello="world"])',content:"Check that the editor DOM matches its website-generic features",},]);registry.category("web_tour.tours").add("specific_website_editor",{steps:()=>[...clickOnEditAndWaitEditMode(),{trigger:':iframe body[data-hello="world"]',content:"Check that the editor DOM matches its website-specific features",},],});return __exports;});;

/* /website/static/tests/tours/start_cloned_snippet.js */
odoo.define('@website/../tests/tours/start_cloned_snippet',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{clickOnSnippet,registerWebsitePreviewTour,insertSnippet,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("website_start_cloned_snippet",{edition:true,url:"/",},()=>{const countdownSnippet={name:"Countdown",id:"s_countdown",};return[...insertSnippet(countdownSnippet),...clickOnSnippet(countdownSnippet),{content:"Click on clone snippet",trigger:".oe_snippet_clone",run:"click",},{content:"Check that the cloned snippet has a canvas and that something has been drawn inside of it",trigger:":iframe .s_countdown:eq(1) canvas",run:function(){if(!this.anchor.getContext("2d").getImageData(0,0,1000,1000).data.includes(1)){console.error("The cloned snippet should have been started");}},},];});return __exports;});;

/* /website/static/tests/tours/text_animations.js */
odoo.define('@website/../tests/tours/text_animations',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{insertSnippet,registerWebsitePreviewTour,clickToolbarButton,}=require("@website/js/tours/tour_utils");function setTextAnimation(trigger,value){return[...clickToolbarButton("snippet title",".s_cover h1","Animate Text",true),{content:"Open Effect options in the popover",trigger:".o_popover [data-label='Effect'] button.dropdown-toggle",run:"click",},{content:"Select the text animation",trigger:`.o_popover [data-action-value="${value}"]`,run:"click",},{content:"Click away to close the popover",trigger:`${trigger}:not(.o_popover)`,run:"click",},];}
registerWebsitePreviewTour("text_animations",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_cover",name:"Cover",groupName:"Intro",}),...setTextAnimation(":iframe .s_cover h1","o_anim_slide_in"),{content:"Check that the animation was applied",trigger:":iframe .s_cover .o_animated_text",},...clickToolbarButton("snippet title",".s_cover h1","Animate Text",true),{content:"Reset the text animation",trigger:".o_popover button[title='Reset']",run:"click",},{content:"Check that the animation was disabled for the title",trigger:":iframe .s_cover:not(:has(.o_animated_text))",},...setTextAnimation(":iframe .s_cover h1","o_anim_slide_in"),{content:"Check that the animation was applied",trigger:":iframe .s_cover:has(span.o_animated_text)",},]);return __exports;});;

/* /website/static/tests/tours/text_highlights.js */
odoo.define('@website/../tests/tours/text_highlights',['@website/js/tours/tour_utils','@html_editor/../tests/tours/helpers/editor'],function(require){'use strict';let __exports={};const{insertSnippet,registerWebsitePreviewTour,clickToolbarButton,}=require("@website/js/tours/tour_utils");const{editorsWeakMap}=require("@html_editor/../tests/tours/helpers/editor");function applyHighlight(target,targetName,highlight){return[...clickToolbarButton(targetName,target,"Apply highlight",true),{content:"Check that the highlights grid was displayed",trigger:".o_popover .o_text_highlight",},{content:"Select the highlight effect",trigger:`.o_popover span.o_text_highlight_${highlight}`,run:"click",},];}
function countLines(el){const range=document.createRange();range.selectNodeContents(el);const rects=range.getClientRects();const lines=new Set([...rects].map((r)=>Math.round(r.top)));return lines.size;}
registerWebsitePreviewTour("text_highlights",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_title",name:"Title",groupName:"Text",}),...insertSnippet({id:"s_cover",name:"Cover",groupName:"Intro",}),{content:"Set a long page title",trigger:":iframe .s_title h2",run:"editor This is an example of an unusually long title that exists purely to test multi-line wrapping",},...applyHighlight(".s_title h2","page title","underline"),{content:"Check that the highlights was correctly applied",trigger:":iframe .s_title .o_text_highlight",run(){if(this.anchor.querySelectorAll("svg").length!==countLines(this.anchor)){throw new Error("The highlight svgs are not correctly applied to text lines");}},},...applyHighlight(".s_cover h1","snippet title","underline"),{content:"Check that the highlight was applied",trigger:":iframe .s_cover h1 span.o_text_highlight_underline svg.o_text_highlight_svg",},{content:"Disable the highlight effect",trigger:".o_popover button[title='Reset']",run:"click",},{content:"Check that the highlight was disabled for the title",trigger:":iframe .s_cover:not(:has(.o_text_highlight))",},{content:"Update and select the snippet paragraph content",trigger:":iframe .s_cover p",run(){const iframeDOC=document.querySelector(".o_iframe_container > iframe").contentDocument;const firstLine=document.createElement("strong");firstLine.textContent="Text content line A";const secondLine=document.createElement("i");secondLine.textContent="Text content line B";this.anchor.replaceChildren(firstLine,document.createElement("br"),secondLine);const editor=editorsWeakMap.get(this.anchor.ownerDocument);editor.shared.history.addStep();const range=iframeDOC.createRange();const selection=iframeDOC.getSelection();range.selectNodeContents(this.anchor);selection.removeAllRanges();selection.addRange(range);},},{content:"Check that the highlights grid was displayed",trigger:".o_popover .o_text_highlight",},{content:"Select the highlight effect",trigger:".o_popover span.o_text_highlight_underline",run:"click",},{content:"Check if the text was correctly updated",trigger:":iframe span.o_text_highlight_underline:contains(Text content line A) + br + span.o_text_highlight_underline:contains(Text content line B)",},{content:"Click on highlight picker to change the highlight effect",trigger:".o_popover #highlightPicker",run:"click",},{content:"Check that the highlights grid was displayed",trigger:".o_popover .o_text_highlight",},{content:"Change the highlight effect",trigger:".o_popover span.o_text_highlight_jagged",run:"click",},{content:"Check if the text was correctly updated",trigger:":iframe span.o_text_highlight_jagged:contains('Text content line A') + br + span.o_text_highlight_jagged:contains('Text content line B')",},{content:"Disable the highlight effect",trigger:".o_popover button[title='Reset']",run:"click",},{content:"Check if the original DOM structure was restored",trigger:":iframe .s_cover p:has(strong:contains(Text content line A) + br + i:contains(Text content line B))",},]);return __exports;});;

/* /website/static/tests/tours/translate_menu_name.js */
odoo.define('@website/../tests/tours/translate_menu_name',['@website/js/tours/tour_utils','@web_tour/tour_utils','@web/core/l10n/translation'],function(require){'use strict';let __exports={};const{clickOnExtraMenuItem,clickOnSave,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");const{stepUtils}=require("@web_tour/tour_utils");const{translationIsReady}=require("@web/core/l10n/translation");registerWebsitePreviewTour("translate_menu_name",{url:"/pa_GB",edition:false,},()=>[{content:"Open Edit dropdown",trigger:".o_menu_systray button:contains('Edit')",run:"click",},{content:"activate translate mode",trigger:".o_translate_website_dropdown_item",run:"click",},{content:"Close the dialog",trigger:".modal-footer .btn-primary",run:"click",},clickOnExtraMenuItem({},true),{content:"translate the menu entry",trigger:':iframe a[href="/englishURL"] span',run:"editor value pa-GB",},...clickOnSave(),{content:"Back to preview mode",trigger:".o_edit_website_container button",},{trigger:"body:not(.o_builder_open)",noPrepend:true,},stepUtils.waitIframeIsReady(),{content:"Await translationIsReady",trigger:"body",run:async()=>{await translationIsReady;},},]);return __exports;});;

/* /website/static/tests/tours/translate_text_options.js */
odoo.define('@website/../tests/tours/translate_text_options',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{clickOnSave,insertSnippet,registerWebsitePreviewTour,selectFullText,clickToolbarButton,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("translate_text_options",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_text_block",name:"Text",groupName:"Text",}),...clickToolbarButton("first text block in the snippet","#wrap .s_text_block p","Animate Text",true),...clickToolbarButton("second text block in the snippet","#wrap .s_text_block p:last","Apply highlight",true),{content:"Apply underline highlight option from highlight options",trigger:".o_popover .o_text_highlight_underline",run:"click",},...clickOnSave(),{content:"Change the language to French",trigger:':iframe .js_language_selector .js_change_lang[data-url_code="fr"]',run:"click",},{content:"Click edit button",trigger:".o_menu_systray button:contains('Edit').dropdown-toggle",run:"click",},{content:"Enable translation",trigger:".o_translate_website_dropdown_item",run:"click",},{content:"Close the dialog",trigger:".modal-footer .btn-secondary",run:"click",},selectFullText("snippet highlighted text content","#wrap .s_text_block p:last .o_text_highlight"),{content:"Expand the toolbar for more buttons",trigger:".o-we-toolbar button[name='expand_toolbar']",run:"click",},{content:"Check that the highlight options were displayed and open highlight options",trigger:".o-we-toolbar button[title='Apply highlight'].active",run:"click",},{content:"Open highlight options picker",trigger:".o_popover button#highlightPicker",run:"click",},{content:"Change highlight to jagged",trigger:".o_popover .o_text_highlight_jagged",run:"click",},selectFullText("animated text content","#wrap .s_text_block p:first span"),{content:"Expand the toolbar for more buttons",trigger:".o-we-toolbar button[name='expand_toolbar']",run:"click",},{content:"Check that the animate options were displayed",trigger:".o-we-toolbar button[title='Animate Text'].active",},selectFullText("text content without any option","footer .s_text_block p:first span"),{content:"Expand the toolbar for more buttons",trigger:".o-we-toolbar button[name='expand_toolbar']",run:"click",},{content:"Check that all text options are removed",trigger:".o-we-toolbar button[title='Apply highlight']:not(:has(.active)), .o-we-toolbar button[title='Animate Text']:not(:has(.active))",},selectFullText("highlighted text content again","#wrap .s_text_block p:last .o_text_highlight"),{content:"Expand the toolbar for more buttons",trigger:".o-we-toolbar button[name='expand_toolbar']",run:"click",},{content:"Check that only the highlight options are displayed",trigger:".o-we-toolbar button[title='Apply highlight'].active, .o-we-toolbar button[title='Animate Text']:not(.active)",},...clickOnSave(),{content:"Check that the highlight effect was correctly translated",trigger:":iframe .s_text_block:has(.o_text_highlight_jagged)",},]);return __exports;});;

/* /website/static/tests/tours/unsplash_beacon.js */
odoo.define('@website/../tests/tours/unsplash_beacon',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("test_unsplash_beacon",{url:"/",steps:()=>[{content:"Verify whether beacon was sent.",trigger:'img[data-beacon="sent"]',},],});return __exports;});;

/* /website/static/tests/tours/website_backend_menus_redirect.js */
odoo.define('@website/../tests/tours/website_backend_menus_redirect',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("website_backend_menus_redirect",{url:"/",steps:()=>[{isActive:["enterprise"],content:"Need at least a step so the tour is not failing in enterprise",trigger:"body",},{isActive:["community"],content:"Make frontend to backend menus appears",trigger:"body:has(#wrap)",run:function(){this.anchor.querySelector(".o_frontend_to_backend_apps_menu").classList.add("show");},},{isActive:["community"],content:"Click on Test Root backend menu",trigger:'.o_frontend_to_backend_apps_menu a:contains("Test Root")',run:"click",expectUnloadPage:true,},{isActive:["community"],content:"Check that we landed on the apps page (Apps), and not the Home Action page (Settings)",trigger:".oe_module_flag:not(:visible)",},],});return __exports;});;

/* /website/static/tests/tours/website_click_tests.js */
odoo.define('@website/../tests/tours/website_click_tests',['@website/js/tours/tour_utils','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{clickOnEditAndWaitEditMode,clickOnSave,clickOnSnippet,insertSnippet,goBackToBlocks,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");const{stepUtils}=require("@web_tour/tour_utils");const cover={id:"s_cover",name:"Cover",groupName:"Intro",};registerWebsitePreviewTour("website_click_tour",{url:"/",},()=>[stepUtils.waitIframeIsReady(),{content:"trigger a page navigation",trigger:':iframe a[href="/contactus"]',run:"click",},{content:"wait for the page to be loaded",trigger:".o_website_preview :iframe [data-view-xmlid='website.contactus']",},...clickOnEditAndWaitEditMode(),{content:"click on a link that would trigger navigation",trigger:':iframe a[href="/"]',run:"click",},{content:"click the User dropdown to show Log out button",trigger:":iframe .dropdown:has(#o_logout) > a",run:"click",},{content:"click the Log out button and expect not to be logged out during the following steps",trigger:":iframe .editor_enable #o_logout",run:"click",},goBackToBlocks(),...insertSnippet(cover),...clickOnSnippet(cover),...clickOnSave(),]);return __exports;});;

/* /website/static/tests/tours/website_configurator.js */
odoo.define('@website/../tests/tours/website_configurator',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("configurator_params_step",{steps:()=>[{content:"Check if we are at the palette selection screen",trigger:".o_palette_selection_screen",},],});return __exports;});;

/* /website/static/tests/tours/website_form_editor.js */
odoo.define('@website/../tests/tours/website_form_editor',['@website/js/tours/tour_utils','@web_tour/tour_utils','@html_editor/../tests/tours/helpers/editor'],function(require){'use strict';let __exports={};const{changeOption,clickOnEditAndWaitEditMode,clickOnSave,insertSnippet,goBackToBlocks,registerWebsitePreviewTour,changeOptionInPopover,}=require("@website/js/tours/tour_utils");const{stepUtils}=require("@web_tour/tour_utils");const{editorsWeakMap}=require("@html_editor/../tests/tours/helpers/editor");const VISIBLE="Always Visible";const CONDITIONALVISIBILITY="Visible only if";const NB_NON_ESSENTIAL_REQUIRED_FIELDS_IN_DEFAULT_FORM=2;const ESSENTIAL_FIELDS_VALID_DATA_FOR_DEFAULT_FORM=[{name:"email_from",value:"admin@odoo.com",},{name:"subject",value:"Hello, world!",},];const essentialFieldsForDefaultFormFillInSteps=[];for(const data of ESSENTIAL_FIELDS_VALID_DATA_FOR_DEFAULT_FORM){essentialFieldsForDefaultFormFillInSteps.push({content:"Enter data in model-required field",trigger:`:iframe .s_website_form_model_required .s_website_form_input[name="${data.name}"]`,run:`edit ${data.value} && press Tab`,});essentialFieldsForDefaultFormFillInSteps.push({trigger:`:iframe .s_website_form_model_required .s_website_form_input[name="${data.name}"]:value(${data.value})`,});}
const getQuotesEncodedName=function(name){return name.replaceAll(/"/g,(character)=>`&quot;`);};const triggerFieldByLabel=(label)=>`.s_website_form_field.s_website_form_custom:has(label:contains("${label}"))`;const selectFieldByLabel=(label)=>[{content:`Select field "${label}"`,trigger:":iframe "+triggerFieldByLabel(label),run:"click",},];const selectButtonByText=function(text,dropdownContent){return[{content:"Open the select",trigger:`.o_customize_tab button:contains('${text}')`,run:"click",},{content:"Click on the option",trigger:`.o_popover div.dropdown-item:contains('${dropdownContent}')`,run:"click",},];};const selectButtonByData=function(text,data){return[{content:"Open the select",trigger:`.o_customize_tab button:contains('${text}')`,run:"click",},{content:"Click on the option",trigger:`.o_popover ${data}`,run:"click",},];};const addField=function(name,type,label,required,isCustom,display={visibility:VISIBLE,condition:""}){const data=isCustom?`[data-action-id='customField'][data-action-value='${name}']`:`[data-action-id='existingField'][data-action-value='${name}']`;const ret=[{trigger:":iframe .s_website_form_field",},{content:"Select form",trigger:":iframe section.s_website_form",run:"click",},{content:"Add field",trigger:"[data-container-title=Form] button:contains('+ Field')",run:"click",},...selectButtonByData("Text",data),{content:"Wait for field to load",trigger:`:iframe .s_website_form_field[data-type="${name}"],:iframe .s_website_form_input[name="${name}"]`,},...changeOptionInPopover("Field","Visibility",display.visibility),];let testText=":iframe .s_website_form_field";if(display.condition){ret.push({content:"Set the visibility condition",trigger:".o_customize_tab [data-name='hidden_condition_additional_text'] input",run:`edit ${display.condition} && press Tab`,});}
if(required){testText+=".s_website_form_required";ret.push({content:"Mark the field as required",trigger:".o_customize_tab div[data-action-id='toggleRequired'] input[type='checkbox']",run:"click",});}
if(label){testText+=`:has(label:contains(${label}))`;ret.push({content:"Change the label text",trigger:".o_customize_tab div[data-action-id='setLabelText'] input",run:`edit ${label} && press Tab`,});}
if(type!=="checkbox"&&type!=="radio"&&type!=="select"){const inputType=type==="textarea"?type:`input[type="${type}"]`;const nameAttribute=isCustom&&label?getQuotesEncodedName(label):name;testText+=`:has(${inputType}[name="${CSS.escape(nameAttribute)}"]${
            required ? "[required]" : ""
        })`;}
ret.push({content:"Check the resulting field",trigger:testText,});return ret;};const addCustomField=function(name,type,label,required,display){return addField(name,type,label,required,true,display);};const addExistingField=function(name,type,label,required,display){return addField(name,type,label,required,false,display);};const compareIds=({content,firstElSelector,secondElSelector,errorMessage})=>({content,trigger:`:iframe ${firstElSelector}`,run:function(){const firstEl=this.anchor;const secondEl=firstEl.ownerDocument.querySelector(secondElSelector);if(firstEl.id===secondEl.id){console.error(errorMessage);}},});registerWebsitePreviewTour("website_form_editor_tour",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_title_form",name:"Contact & Forms",groupName:"Contact & Forms",}),{trigger:":iframe .s_website_form_field",},{content:"Select form by clicking on an input field",trigger:":iframe .s_website_form_field .s_website_form_input",run:"click",},{content:"Verify that the form editor appeared",trigger:".o_customize_tab div[data-container-title='Form']",},goBackToBlocks(),{trigger:":iframe .s_website_form_field",},{content:"Select form by clicking on a text area",trigger:":iframe .s_website_form_field textarea.s_website_form_input",run:"click",},{content:"Verify that the form editor appeared",trigger:".o_customize_tab div[data-container-title='Form']",},{content:"Rename and leave the field label",trigger:".o_customize_tab div[data-action-id='setLabelText'] input",run:"edit Renamed && click body",},goBackToBlocks(),{trigger:":iframe .s_website_form_field",},{content:"Select form itself (not a specific field)",trigger:":iframe section.s_website_form",run:"click",},...changeOptionInPopover("Form","Action","Send an E-mail"),{content:"Form has a model name",trigger:':iframe section.s_website_form form[data-model_name="mail.mail"]',run:"click",},{content:"Set the offset and width of the Phone Number field",trigger:':iframe input[name="phone"]',run:function(){const fieldEl=this.anchor.closest(".s_website_form_field");fieldEl.classList.add("offset-lg-3");fieldEl.classList.add("col-lg-9");},},{content:"Edit the Phone Number field",trigger:':iframe input[name="phone"]',run:"click",},{content:"Change the label position of the phone field",trigger:".o_customize_tab div[data-label='Position'] button[data-action-value='right']",run:"click",},...addCustomField("char","text","Conditional Visibility Check 1",false),...addCustomField("char","text","Conditional Visibility Check 2",false),...changeOptionInPopover("Field","Visibility","Visible only if"),...selectButtonByData("Your Name","[data-action-value='Conditional Visibility Check 1']"),...addCustomField("char","text","Conditional Visibility Check 2",false),...selectFieldByLabel("Conditional Visibility Check 1"),...changeOptionInPopover("Field","Visibility","Visible only if"),{content:"Open list of the visibility selector of Conditional Visibility Check 1",trigger:".o_customize_tab button:contains('Your Name')",run:"click",},{content:"Check that 'Conditional Visibility Check 2' is not in the list of the visibility selector of Conditional Visibility Check 1",trigger:".o_popover div:not(:has([data-action-value='Conditional Visibility Check 2']))",},...addCustomField("char","text","Conditional Visibility Check 3",false),...addCustomField("char","text","Conditional Visibility Check 4",false),...changeOptionInPopover("Field","Visibility","Visible only if"),...selectButtonByData("Your Name","[data-action-value='Conditional Visibility Check 3']"),{content:"Change the label of 'Conditional Visibility Check 4' and change it to 'Conditional Visibility Check 3'",trigger:".o_customize_tab div[data-action-id='setLabelText'] input",run:"edit Conditional Visibility Check 3 && click body",},{content:"Check that the conditional visibility of the renamed field is removed",trigger:".o_customize_tab [data-label='Visibility'] button:contains('Always Visible')",},...addCustomField("char","text","Conditional Visibility Check 5",false),...addCustomField("char","text","Conditional Visibility Check 6",false),...changeOptionInPopover("Field","Visibility","Visible only if"),{content:"Change the label of 'Conditional Visibility Check 6' and change it to 'Conditional Visibility Check 5'",trigger:".o_customize_tab div[data-action-id='setLabelText'] input",run:"edit Conditional Visibility Check 5 && click body",},{content:"Open list of the visibility selector of Conditional Visibility Check 1",trigger:".o_customize_tab button:contains('Your Name')",run:"click",},{content:"Check that 'Conditional Visibility Check 5' is not in the list of the renamed field",trigger:".o_popover div:not(:has([data-action-value='Conditional Visibility Check 5']))",},...addExistingField("email_cc","text","Test conditional visibility",false,{visibility:CONDITIONALVISIBILITY,condition:"odoo",}),{content:"Ensure that the description has correctly been added on the field",trigger:":iframe .s_website_form_field:contains('Test conditional visibility') .s_website_form_field_description",},...addCustomField("char","text","dependent",false,{visibility:CONDITIONALVISIBILITY,}),...addCustomField("selection","radio","dependency",false),...selectFieldByLabel("dependent"),...selectButtonByData("Your Name","[data-action-value='dependency']"),...selectFieldByLabel("dependency"),...selectButtonByData("Radio Buttons","[data-action-value='char']"),...selectFieldByLabel("dependent"),{content:"Open the select",trigger:".o_customize_tab button:contains('Always Visible')",run:"click",},{content:"Check that the field no longer has conditional visibility",trigger:".o_popover div[data-action-value='visible'].active",},...addExistingField("date","text","Test Date",true),...addExistingField("body_html","textarea","Your Message",true),...addExistingField("recipient_ids","checkbox"),...addCustomField("one2many","checkbox","Products",true),{content:"Change Option 1 label",trigger:".o_we_table_wrapper table input[name='display_name']:eq(0)",run:"edit Iphone && press Tab",},{content:"Change Option 2 label",trigger:".o_we_table_wrapper table input[name='display_name']:eq(1)",run:"edit Galaxy S && press Tab",},{content:"Change first Option 3 label",trigger:".o_we_table_wrapper table input[name='display_name']:eq(2)",run:"edit Xperia && press Tab",},{content:"Click on Add new Checkbox",trigger:"button.builder_list_add_item",run:"click",},{content:"Change added Option label",trigger:".o_we_table_wrapper table input[name='display_name']:eq(3)",run:"edit Wiko Stairway && press Tab",},{content:"Check the resulting field",trigger:":iframe .s_website_form_field.s_website_form_custom.s_website_form_required"+":has(.s_website_form_multiple[data-display='horizontal'])"+":has(.checkbox:has(label:contains('Iphone')):has(input[type='checkbox'][required]))"+":has(.checkbox:has(label:contains('Galaxy S')):has(input[type='checkbox'][required]))"+":has(.checkbox:has(label:contains('Xperia')):has(input[type='checkbox'][required]))"+":has(.checkbox:has(label:contains('Wiko Stairway')):has(input[type='checkbox'][required]))",},...selectButtonByData("Horizontal","[data-action-value='vertical']"),{content:"Check the resulting field",trigger:":iframe .s_website_form_field.s_website_form_custom.s_website_form_required"+":has(.s_website_form_multiple[data-display='vertical'])"+":has(.checkbox:has(label:contains('Iphone')):has(input[type='checkbox'][required]))"+":has(.checkbox:has(label:contains('Galaxy S')):has(input[type='checkbox'][required]))"+":has(.checkbox:has(label:contains('Xperia')):has(input[type='checkbox'][required]))"+":has(.checkbox:has(label:contains('Wiko Stairway')):has(input[type='checkbox'][required]))",},...changeOptionInPopover("Field","Visibility","Visible only if"),...selectButtonByData("Your Name","[data-action-value='recipient_ids']"),...selectButtonByText("Is equal to","Is not equal to"),{content:"Click on option to change the partner for visiblity condition",trigger:"[data-name='hidden_condition_additional_text'] button",run:"click",},{content:"Click on option to change the partner for visiblity condition",trigger:".o_popover div[role='menuitem']:contains('Mitchell Admin')",run:"click",},...clickOnSave(),{content:"Check 'products' field is visible.",trigger:`:iframe .s_website_form:has(${triggerFieldByLabel("Products")}:visible)`,},{content:"choose the option 'Mitchell Admin' of partner.",trigger:":iframe .checkbox:has(label:contains('Mitchell Admin')) input[type='checkbox']",run:"click",},{content:"Check 'products' field is not visible.",trigger:":iframe .s_website_form"+`:has(${triggerFieldByLabel("Products")}:not(:visible))`,},...clickOnEditAndWaitEditMode(),...addCustomField("selection","radio","Service",true),{content:"Change Option 1 label",trigger:".o_we_table_wrapper table input[name='display_name']:eq(0)",run:"edit After-sales Service && press Tab",},{content:"Change Option 2 label",trigger:".o_we_table_wrapper table input[name='display_name']:eq(1)",run:"edit Invoicing Service && press Tab",},{content:"Change first Option 3 label",trigger:".o_we_table_wrapper table input[name='display_name']:eq(2)",run:"edit Development Service && press Tab",},{content:"Click on Add new Checkbox",trigger:"button.builder_list_add_item",run:"click",},{content:"Change last Option label",trigger:".o_we_table_wrapper table input[name='display_name']:eq(3)",run:"edit Management Service",},{content:"Mark the field as not required",trigger:"div[data-action-id='toggleRequired'] input[type='checkbox']",run:"click",},{content:"Check the resulting field",trigger:":iframe .s_website_form_field.s_website_form_custom:not(.s_website_form_required)"+":has(.radio:has(label:contains('After-sales Service')):has(input[type='radio']:not([required])))"+":has(.radio:has(label:contains('Invoicing Service')):has(input[type='radio']:not([required])))"+":has(.radio:has(label:contains('Development Service')):has(input[type='radio']:not([required])))"+":has(.radio:has(label:contains('Management Service')):has(input[type='radio']:not([required])))",},...addCustomField("many2one","select","State",true),{content:"Change Option 1 Label",trigger:".o_we_table_wrapper table input[name='display_name']:eq(0)",run:"edit Germany && press Tab",},{content:"Change Option 2 Label",trigger:".o_we_table_wrapper table input[name='display_name']:eq(1)",run:"edit Belgium && press Tab",},{content:"Change first Option 3 label",trigger:".o_we_table_wrapper table input[name='display_name']:eq(2)",run:"edit France && press Tab",},{content:"Click on Add new Checkbox",trigger:"button.builder_list_add_item",run:"click",},{content:"Change last Option label",trigger:".o_we_table_wrapper table input[name='display_name']:eq(3)",run:"edit Canada && press Tab",},{content:"Remove Germany Option",trigger:".builder_list_remove_item:eq(0)",run:"click",},{content:"Click on Add new Checkbox",trigger:"button.builder_list_add_item",run:"click",},{content:"Change last option label with a number",trigger:".o_we_table_wrapper table input[name='display_name']:eq(3)",run:"edit 44 - UK",},{content:"Check that the input value is the full option value",trigger:".o_we_table_wrapper table input[name='display_name']:eq(3)",run:()=>{setTimeout(()=>{const addedOptionEl=document.querySelector("iframe").contentDocument.querySelector('.s_website_form_field select option[value="44 - UK"]');if(!addedOptionEl){console.error("The number option was not correctly added");}},500);},},{content:"Check the resulting snippet",trigger:":iframe .s_website_form_field.s_website_form_custom.s_website_form_required"+":has(label:contains('State'))"+":has(select[required])"+":has(option:contains('Belgium')):not([selected])"+":has(option:contains('France'))"+":has(option:contains('Canada'))"+":has(option:contains('44 - UK'))"+":not(:has(option:contains('Germany')))",},...addExistingField("attachment_ids","file","Invoice Scan"),{content:"Insure the history step of the editor is not checking for unbreakable",trigger:":iframe #wrapwrap",run(){const editor=editorsWeakMap.get(this.anchor.ownerDocument);editor.shared.history.addStep();},},{content:"Click submit button to show edit popover",trigger:":iframe .s_website_form_send",run:"click",},{content:"Verify that the button options do not have clone/remove/save buttons.",trigger:"div[data-container-title='Button'] .options-container-header:not(:has(.oe_snippet_remove, .oe_snippet_clone, .oe_snippet_save))",},{content:"Click on Edit Link in Popover",trigger:".o-we-linkpopover .o_we_edit_link",run:"click",},{content:"Change button's style",trigger:".o-we-linkpopover select[name='link_type']",run:"select custom",},{trigger:".o-we-linkpopover select[name=link_style_shape]",run:"select rounded-circle",},{trigger:".o-we-linkpopover select[name='link_style_size']",run:"select sm",},{trigger:".o-we-linkpopover .o_we_apply_link",run:"click",},{content:"Check the resulting button",trigger:":iframe .s_website_form_send.btn.btn-sm.btn-custom.rounded-circle",},...selectFieldByLabel("Your Name"),{content:"Set a default value to the name field",trigger:"[data-label='Default Value'] input",run:"edit John Smith",},...addCustomField("char","text","field A",false,{visibility:CONDITIONALVISIBILITY}),...addCustomField("char","text","field B",false),...selectFieldByLabel("field A"),...selectButtonByData("Your Name","[data-action-value='field B']"),...selectButtonByText("Is equal to","Is set"),...selectFieldByLabel("field B"),{content:"Insert default value",trigger:"[data-label='Default Value'] input",run:"edit prefilled",},...clickOnSave(),{content:"Verify value attribute and property",trigger:":iframe .s_website_form_field input[value='John Smith']:value('Mitchell Admin')",run:"click",},{content:"Verify that phone field is still auto-fillable",trigger:':iframe .s_website_form_field input[data-fill-with="phone"]:value("+1 555-555-5555")',run:"click",},{content:"Check that the offset and width of the Phone Number field are still correct",trigger:':iframe .s_website_form_field input[data-fill-with="phone"]',run:function(){const fieldEl=this.anchor.closest(".s_website_form_field");if(!fieldEl.classList.contains("offset-lg-3")){throw new Error("The offset of the Phone Number field should have been kept");}
if(!fieldEl.classList.contains("col-lg-9")){throw new Error("The width of the Phone Number field should have been kept");}},},{content:"Check that field B prefill text is set",trigger:`:iframe ${triggerFieldByLabel("field B")}:has(input[value="prefilled"])`,},{content:"Check that field A is visible",trigger:`:iframe .s_website_form:has(${triggerFieldByLabel("field A")}:visible)`,},...clickOnEditAndWaitEditMode(),{content:"Edit the form",trigger:":iframe .s_website_form_field input",run:"click",},...addCustomField("char","text","field C",false),...selectFieldByLabel("field B"),...changeOptionInPopover("Field","Visibility","Visible only if"),{content:"Verify that the default comparator should be set",trigger:".o_customize_tab #hidden_condition_opt:not(:empty)",},...selectButtonByData("Your Name","[data-action-value='field C']"),...selectButtonByText("Is equal to","Is set"),...selectFieldByLabel("field C"),...clickOnSave(),{content:"Verify that the value has not been deleted",trigger:":iframe .s_website_form_field input[value='John Smith']",run:"click",},{content:"Check that fields A and B are not visible and that field B's prefill text is still set",trigger:":iframe .s_website_form"+`:has(${triggerFieldByLabel("field A")}:not(:visible))`+`:has(${triggerFieldByLabel("field B")}`+`:has(input[value="prefilled"]):not(:visible))`,},{content:"Type something in field C",trigger:`:iframe ${triggerFieldByLabel("field C")} input`,run:"edit Sesame",},{content:"Check that fields A and B are visible",trigger:`:iframe .s_website_form:has(${triggerFieldByLabel("field B")}:visible)`+`:has(${triggerFieldByLabel("field A")}:visible)`,},...clickOnEditAndWaitEditMode(),...selectFieldByLabel("field A"),{content:"Verify that the form editor appeared",trigger:".o_customize_tab div[data-container-title='Form'] .we-bg-options-container",},...selectButtonByText("Is set","Contains"),{content:"Tie the visibility of field A to field B containing 'peek-a-boo'",trigger:"[data-name='hidden_condition_additional_text'] input",run:"edit peek-a-boo",},...clickOnSave(),{content:"Write anything in C",trigger:`:iframe ${triggerFieldByLabel("field C")} input`,run:"edit Mellon && press Tab",},{content:"Check that field B is visible, but field A is not",trigger:`:iframe .s_website_form:has(${triggerFieldByLabel("field B")}:visible)`+`:has(${triggerFieldByLabel("field A")}:not(:visible))`,},{content:"Insert 'peek-a-boo' in field B",trigger:`:iframe ${triggerFieldByLabel("field B")} input`,run:"edit peek-a-boo",},{content:"Check that field A is visible",trigger:`:iframe .s_website_form:has(${triggerFieldByLabel("field A")}:visible)`,},...clickOnEditAndWaitEditMode(),...addCustomField("char","text","Philippe of Belgium",false),{content:"Select the 'Subject' field",trigger:':iframe .s_website_form_field.s_website_form_model_required:has(label:contains("Subject"))',run:"click",},...changeOptionInPopover("Field","Visibility","Visible only if"),...selectButtonByData("Your Name","[data-action-value='Philippe of Belgium']"),...selectButtonByText("Is equal to","Is set"),{content:"Set a default value to the 'Subject' field",trigger:"[data-label='Default Value'] input",run:"edit Default Subject",},{content:"Select the 'Your Message' field",trigger:':iframe .s_website_form_field.s_website_form_required:has(label:contains("Your Message"))',run:"click",},...changeOptionInPopover("Field","Visibility","Visible only if"),...selectButtonByData("Your Name","[data-action-value='Philippe of Belgium']"),...selectButtonByText("Is equal to","Is set"),...clickOnSave(),{content:"Check that the 'Subject' field is not disabled",trigger:`:iframe .s_website_form:has(.s_website_form_model_required `+`.s_website_form_input[value="Default Subject"]:not([disabled]):not(:visible))`,},{content:"Check that the 'Your Message' field is disabled",trigger:`:iframe .s_website_form:has(.s_website_form_required `+`.s_website_form_input[name="body_html"][required][disabled]:not(:visible))`,},...clickOnEditAndWaitEditMode(),{content:"Select the 'Subject' field",trigger:':iframe .s_website_form_field.s_website_form_model_required:has(label:contains("Subject"))',run:"click",},...changeOptionInPopover("Field","Visibility","Always Visible"),{content:"Empty the default value of the 'Subject' field",trigger:"[data-label='Default Value'] input",run:"clear",},{content:"Select the 'Your Message' field",trigger:':iframe .s_website_form_field.s_website_form_required:has(label:contains("Your Message"))',run:"click",},...changeOptionInPopover("Field","Visibility","Always Visible"),{content:"Click on the select field",trigger:":iframe .s_website_form_field select",run:"click",},{content:"Click on the submit button",trigger:":iframe .s_website_form_send",run:"click",},{content:"Change the Recipient Email",trigger:'[data-label="Recipient Email"] input',run:"edit test@test.test",},...addCustomField("char","text","field D",false,{visibility:CONDITIONALVISIBILITY}),...addCustomField("date","text","field E",false),...selectFieldByLabel("field D"),...selectButtonByData("Your Name","[data-action-value='field E']"),{content:"Open the comparator select",trigger:"#hidden_condition_time_comparators_opt",run:"click",},{content:"Select the 'Is after' comparator",trigger:".o_popover div[role='menuitem']:contains('Is after')",run:"click",},{content:"Enter a date in the date input",trigger:"[data-name='hidden_condition_additional_text'] input",run:"edit 03/28/2017",},...clickOnSave(),{content:"Enter an invalid date in field E",trigger:`:iframe ${triggerFieldByLabel("field E")} input`,run(){this.anchor.value="25071981";this.anchor.dispatchEvent(new InputEvent("input",{bubbles:true}));setTimeout(()=>{this.anchor.classList.add("invalidDate");},500);},},{content:"Enter an valid date in field E",trigger:`:iframe ${triggerFieldByLabel("field E")} input.invalidDate`,run(){this.anchor.classList.remove("invalidDate");this.anchor.value="07/25/1981";this.anchor.dispatchEvent(new InputEvent("input",{bubbles:true}));setTimeout(()=>{this.anchor.classList.add("validDate");},500);},},{content:"Click to open the date picker popover from field E",trigger:`:iframe ${triggerFieldByLabel("field E")} input.validDate`,run(actions){this.anchor.classList.remove("validDate");actions.click();},},{content:"Select today's date from the date picker",trigger:":iframe .o_datetime_picker .o_date_item_cell.o_today",run:"click",},{content:"Check that field D is visible",trigger:`:iframe .s_website_form:has(${triggerFieldByLabel("field D")}:visible)`,},...clickOnEditAndWaitEditMode(),...addCustomField("char","text","''",false),...addCustomField("char","text",'""',false),...addCustomField("char","text","``",false),...addCustomField("char","text","\\",false),...addCustomField("char","text","Check description option",false),changeOption("Field","[data-action-id='toggleDescription'] input"),{content:"Ensure that the description has correctly been added on the field",trigger:":iframe .s_website_form_field:contains('Check description option') .s_website_form_field_description",},...clickOnSave(),{content:"Verify that the recipient email has been saved",trigger:':iframe form:has(input[name="email_to"][value="test@test.test"])',},]);function editContactUs(steps){return[{trigger:".o-website-builder_sidebar .o_snippet_thumbnail",},{content:"Select the contact us form by clicking on an input field",trigger:":iframe .s_website_form input",run:"click",},...steps,...clickOnSave(),];}
registerWebsitePreviewTour("website_form_contactus_edition_with_email",{url:"/contactus",edition:true,},()=>editContactUs([{content:"Change the Recipient Email",trigger:"div[data-label='Recipient Email'] input",run:"edit test@test.test",},]));registerWebsitePreviewTour("website_form_contactus_edition_no_email",{url:"/contactus",edition:true,},()=>editContactUs([{content:"Change a random option",trigger:"[data-action-id='setMark'] input",run:"edit **",},{content:"Check that the recipient email is correct",trigger:"div[data-label='Recipient Email'] input:value('website_form_contactus_edition_no_email@mail.com')",},]));registerWebsitePreviewTour("website_form_conditional_required_checkboxes",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_title_form",name:"Title - Form",groupName:"Contact & Forms",}),{trigger:":iframe .s_website_form_field",},{content:"Select the form by clicking on an input field",trigger:":iframe section.s_website_form input",async run(actions){await actions.click();const requiredFields=this.anchor.closest("[data-snippet]").querySelectorAll(".s_website_form_required");if(requiredFields.length!==NB_NON_ESSENTIAL_REQUIRED_FIELDS_IN_DEFAULT_FORM){console.error("The amount of required fields seems to have changed");}},},...(function(){const steps=[];for(let i=0;i<NB_NON_ESSENTIAL_REQUIRED_FIELDS_IN_DEFAULT_FORM;i++){steps.push({content:"Select required field to remove",trigger:":iframe .s_website_form_required .s_website_form_input",run:"click",});steps.push({content:"Remove required field",trigger:".o_overlay_options .oe_snippet_remove",run:"click",});}
return steps;})(),...addCustomField("boolean","checkbox","Checkbox 1",false),...addCustomField("boolean","checkbox","Checkbox 2",true,{visibility:CONDITIONALVISIBILITY,}),{content:"Open condition item select",trigger:"[data-container-title='Field'] #hidden_condition_opt",run:"click",},{content:"Choose first checkbox as condition item",trigger:".o_popover div[role='menuitem'][data-action-value='Checkbox 1']",run:"click",},{content:"Open condition comparator select",trigger:"[data-container-title='Field'] #hidden_condition_no_text_opt",run:"click",},{content:"Choose 'not equal to' comparator",trigger:".o_popover div[role='menuitem']:contains('not equal to')",run:"click",},...clickOnSave(),{content:"Wait for page reload",trigger:'body:not(.editor_enable) :iframe [data-snippet="s_website_form"]',run:function(actions){const essentialFields=this.anchor.querySelectorAll(".s_website_form_model_required");if(essentialFields.length!==ESSENTIAL_FIELDS_VALID_DATA_FOR_DEFAULT_FORM.length){console.error("The amount of model-required fields seems to have changed");}},},{content:"Wait the form is loaded before fill it",trigger:":iframe form:contains(checkbox 2)",},...essentialFieldsForDefaultFormFillInSteps,{content:"Try sending empty form",trigger:":iframe .s_website_form_send",run:"click",},{content:"Check the form could not be sent",trigger:":iframe #s_website_form_result.text-danger",},{content:"Check the first checkbox",trigger:":iframe input[type='checkbox'][name='Checkbox 1']",run:"click",},{content:"Check the second checkbox is now hidden",trigger:":iframe .s_website_form:has(input[type='checkbox'][name='Checkbox 2']:not(:visible))",},{content:"Try sending the form",trigger:":iframe .s_website_form_send",run:"click",},{content:"Check the form was sent (success page without form)",trigger:':iframe body:not(:has([data-snippet="s_website_form"])) .fa-paper-plane',},{content:"Go back to the form",trigger:":iframe a.navbar-brand.logo",run:"click",},{content:"Wait the form is loaded before fill it",trigger:":iframe form:contains(checkbox 2)",},...essentialFieldsForDefaultFormFillInSteps,{content:"Check the second checkbox",trigger:':iframe input[type="checkbox"][name="Checkbox 2"]',run:"click",},{content:"Try sending the form again",trigger:":iframe .s_website_form_send",run:"click",},{content:"Check the form was again sent (success page without form)",trigger:':iframe body:not(:has([data-snippet="s_website_form"])) .fa-paper-plane',},]);registerWebsitePreviewTour("website_form_contactus_change_random_option",{url:"/contactus",edition:true,},()=>editContactUs([{content:"Change a random option",trigger:"[data-action-id='setMark'] input",run:"edit **",},]));registerWebsitePreviewTour("website_form_nested_forms",{url:"/my/account",edition:true,},()=>[{trigger:".o-website-builder_sidebar .o_snippets_container .o_snippet",noPrepend:true,},{trigger:".o_block_tab:not(.o_we_ongoing_insertion) .o_snippet[name='Form'].o_draggable .o_snippet_thumbnail",content:"Try to drag the form into another form",run:"drag_and_drop :iframe .o_customer_address_fill a",},{content:"Check the form was not dropped into another form",trigger:":iframe form[action='/my/address/submit']:not(:has([data-snippet='s_website_form']))",run:()=>null,},]);registerWebsitePreviewTour("website_form_editable_content",{url:"/",edition:true,},()=>[{trigger:".o-snippets-menu div.o_snippet",},{trigger:`.o-snippets-menu .o_block_tab:not(.o_we_ongoing_insertion) .o_snippet[name="Form"].o_draggable .o_snippet_thumbnail`,run:"drag_and_drop :iframe #wrap",},{trigger:":iframe .s_website_form_field",},{content:"Check that a form field is not editable",trigger:":iframe section.s_website_form input",run:function(){if(this.anchor.isContentEditable){console.error("A form field should not be editable.");}},},goBackToBlocks(),...insertSnippet({id:"s_three_columns",name:"Columns",groupName:"Columns"}),{content:"Select the first column",trigger:":iframe .s_three_columns .row > :nth-child(1)",run:"click",},{content:"Drag and drop the selected column inside the form",trigger:".o_overlay_options .o_move_handle",run:"drag_and_drop :iframe section.s_website_form",},{trigger:":iframe section.s_website_form .col-lg-4[contenteditable=true]",},{content:"Click on the text inside the dropped form column",trigger:":iframe section.s_website_form h2.card-title",run:"dblclick",},{content:"Update the text inside the form column",trigger:":iframe section.s_website_form h2.card-title",run:"editor ABC",},{content:"Check that the new text value was correctly set",trigger:":iframe section.s_website_form h2:text(ABC)",run(){this.anchor.scrollIntoView();},},{content:"Remove the dropped column",trigger:".o_overlay_options .oe_snippet_remove",run:"click",},...clickOnSave(),]);registerWebsitePreviewTour("website_form_special_characters",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_title_form",name:"Title - Form",groupName:"Contact & Forms",}),{content:"Select form by clicking on an input field",trigger:":iframe section.s_website_form input",run:"click",},...addCustomField("char","text",`Test1"'`,false),...clickOnSave(),stepUtils.waitIframeIsReady(),...essentialFieldsForDefaultFormFillInSteps,{content:"Complete 'Your Question' field",trigger:":iframe textarea[name='description']",run:"edit test",},{content:"Complete the first added field",trigger:`:iframe input[name="${CSS.escape("Test1&quot;'")}"]`,run:"edit test1",},{content:"Click on 'Submit'",trigger:":iframe a.s_website_form_send",run:"click",},{content:"Check the form was again sent (success page without form)",trigger:":iframe body:not(:has([data-snippet='s_website_form'])) .fa-paper-plane",},]);registerWebsitePreviewTour("website_form_duplicate_field_ids",{url:"/",edition:true,},()=>[{content:"Drop a form snippet",trigger:".o_block_tab:not(.o_we_ongoing_insertion) .o_snippet[name='Form'].o_draggable .o_snippet_thumbnail",run:"drag_and_drop :iframe #wrap",},{content:"Check if form snippet is dropped",trigger:":iframe .s_website_form_field",},...insertSnippet({id:"s_title_form",name:"Title - Form",groupName:"Contact & Forms",}),compareIds({content:"Check that the first field of both the form snippets have different IDs",firstElSelector:".s_website_form input[name='name']",secondElSelector:".s_title_form .s_website_form input[name='name']",errorMessage:"The first fields of two different form snippet have the same ID",}),{content:"Click on the form snippet",trigger:":iframe .s_website_form",run:"click",},{content:"Delete the form snippet",trigger:"[data-container-title='Form'] .options-container-header .oe_snippet_remove",run:"click",},{content:"Click on 'Title - Form' snippet",trigger:":iframe .s_title_form",run:"click",},{content:"Clone the 'Title - Form' snippet",trigger:"[data-container-title='Title - Form'] .options-container-header .oe_snippet_clone",run:"click",},{content:"Check if the form is cloned",trigger:":iframe .s_title_form:nth-of-type(2)",},compareIds({content:"Check if the first field of forms in original and cloned snippets have different IDs",firstElSelector:".s_title_form .s_website_form input[name='name']",secondElSelector:".s_title_form:nth-of-type(2) .s_website_form input[name='name']",errorMessage:"The first fields of original and cloned form snippet have the same ID",}),{content:"Click on the form in 'Title - Form' snippet",trigger:":iframe .s_title_form .s_website_form",run:"click",},{content:"Clone the form",trigger:"[data-container-title='Form'] .options-container-header .oe_snippet_clone",run:"click",},{content:"Check if the form is cloned",trigger:":iframe .s_title_form .s_website_form:nth-of-type(2)",},compareIds({content:"Check if the first field of original and cloned form snippets have different IDs",firstElSelector:".s_title_form .s_website_form input[name='name']",secondElSelector:".s_title_form .s_website_form:nth-of-type(2) input[name='name']",errorMessage:"The first fields of original and cloned form snippet have the same ID",}),{content:"Click on the name field",trigger:":iframe .s_title_form .s_website_form input[name='name']",run:"click",},{content:"Clone the name field",trigger:"[data-container-title='Field'] .options-container-header .oe_snippet_clone",run:"click",},compareIds({content:"Check if both, original and cloned name fields have unique IDs",firstElSelector:".s_title_form .s_website_form input[name='name']",secondElSelector:".s_title_form [data-name='Field']:nth-of-type(3) input[name='name']",errorMessage:"Original and cloned fields have the same ID",}),]);return __exports;});;

/* /website/static/tests/tours/website_form_editor_frontend.js */
odoo.define('@website/../tests/tours/website_form_editor_frontend',['@web/core/network/rpc','@web/core/registry'],function(require){'use strict';let __exports={};const{rpc}=require("@web/core/network/rpc");const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("website_form_editor_tour_submit",{steps:()=>[{trigger:"form[data-model_name='mail.mail']"+"[data-success-page='/contactus-thank-you']"+":has(.s_website_form_field:has(label:contains('Your Name')):has(input[type='text'][name='name'][required]))"+":has(.s_website_form_field:has(label:contains('Your Email')):has(input[type='email'][name='email_from'][required]))"+":has(.s_website_form_field:has(label:contains('Your Question')):has(textarea[name='description'][required]))"+":has(.s_website_form_field:has(label:contains('Subject')):has(input[type='text'][name='subject'][required]))"+":has(.s_website_form_field:has(label:contains('Test Date')):has(input[type='text'][name='date'][required]))"+":has(.s_website_form_field:has(label:contains('Your Message')):has(textarea[name='body_html'][required]))"+":has(.s_website_form_field:has(label:contains('Products')):has(input[type='checkbox'][name='Products'][value='Iphone'][required]))"+":has(.s_website_form_field:has(label:contains('Products')):has(input[type='checkbox'][name='Products'][value='Galaxy S'][required]))"+":has(.s_website_form_field:has(label:contains('Products')):has(input[type='checkbox'][name='Products'][value='Xperia'][required]))"+":has(.s_website_form_field:has(label:contains('Products')):has(input[type='checkbox'][name='Products'][value='Wiko Stairway'][required]))"+":has(.s_website_form_field:has(label:contains('Service')):has(input[type='radio'][name='Service'][value='After-sales Service']:not([required])))"+":has(.s_website_form_field:has(label:contains('Service')):has(input[type='radio'][name='Service'][value='Invoicing Service']:not([required])))"+":has(.s_website_form_field:has(label:contains('Service')):has(input[type='radio'][name='Service'][value='Development Service']:not([required])))"+":has(.s_website_form_field:has(label:contains('Service')):has(input[type='radio'][name='Service'][value='Management Service']:not([required])))"+":has(.s_website_form_field:has(label:contains('State')):has(select[name='State'][required]:has(option[value='Belgium'])))"+":has(.s_website_form_field.s_website_form_required:has(label:contains('State')):has(select[name='State'][required]:has(option[value='France'])))"+":has(.s_website_form_field:has(label:contains('State')):has(select[name='State'][required]:has(option[value='Canada'])))"+":has(.s_website_form_field:has(label:contains('Invoice Scan')))"+":has(.s_website_form_field:has(input[name='email_to'][value='test@test.test']))"+":has(.s_website_form_field:has(input[name='website_form_signature']))",},{content:"Try to send the form with some required fields not filled in",trigger:".s_website_form_send",run:"click",},{trigger:"form:has(#s_website_form_result.text-danger)"+":has(.s_website_form_field:has(label:contains('Your Name')):not(.o_has_error))"+":has(.s_website_form_field:has(label:contains('Email')).o_has_error)"+":has(.s_website_form_field:has(label:contains('Your Question')).o_has_error)"+":has(.s_website_form_field:has(label:contains('Subject')).o_has_error)"+":has(.s_website_form_field:has(label:contains('Test Date')).o_has_error)"+":has(.s_website_form_field:has(label:contains('Your Message')).o_has_error)"+":has(.s_website_form_field:has(label:contains('Products')).o_has_error)"+":has(.s_website_form_field:has(label:contains('Service')):not(.o_has_error))"+":has(.s_website_form_field:has(label:contains('State')).o_has_error)"+":has(.s_website_form_field:has(label:contains('Invoice Scan')):not(.o_has_error))",},{content:"Check if required fields were detected and complete the Subject field",trigger:"input[name=subject]",run:"edit Jane Smith",},{content:"Update required field status by trying to Send again",trigger:".s_website_form_send",run:"click",},{trigger:"form:has(#s_website_form_result.text-danger)"+":has(.s_website_form_field:has(label:contains('Your Name')):not(.o_has_error))"+":has(.s_website_form_field:has(label:contains('Email')).o_has_error)"+":has(.s_website_form_field:has(label:contains('Your Question')).o_has_error)"+":has(.s_website_form_field:has(label:contains('Subject')):not(.o_has_error))"+":has(.s_website_form_field:has(label:contains('Test Date')).o_has_error)"+":has(.s_website_form_field:has(label:contains('Your Message')).o_has_error)"+":has(.s_website_form_field:has(label:contains('Products')).o_has_error)"+":has(.s_website_form_field:has(label:contains('Service')):not(.o_has_error))"+":has(.s_website_form_field:has(label:contains('State')).o_has_error)"+":has(.s_website_form_field:has(label:contains('Invoice Scan')):not(.o_has_error))",},{content:"Check if required fields were detected and complete the Message field",trigger:"textarea[name=body_html]",run:"edit A useless message",},{content:"Update required field status by trying to Send again",trigger:".s_website_form_send",run:"click",},{trigger:"form:has(#s_website_form_result.text-danger)"+":has(.s_website_form_field:has(label:contains('Your Name')):not(.o_has_error))"+":has(.s_website_form_field:has(label:contains('Email')).o_has_error)"+":has(.s_website_form_field:has(label:contains('Your Question')).o_has_error)"+":has(.s_website_form_field:has(label:contains('Subject')):not(.o_has_error))"+":has(.s_website_form_field:has(label:contains('Test Date')).o_has_error)"+":has(.s_website_form_field:has(label:contains('Your Message')):not(.o_has_error))"+":has(.s_website_form_field:has(label:contains('Products')).o_has_error)"+":has(.s_website_form_field:has(label:contains('Service')):not(.o_has_error))"+":has(.s_website_form_field:has(label:contains('State')).o_has_error)"+":has(.s_website_form_field:has(label:contains('Invoice Scan')):not(.o_has_error))",},{content:"Check if required fields was detected and check a product. If this fails, you probably broke the cleanForSave.",trigger:"input[name=Products][value='Wiko Stairway']",run:"click",},{content:"Open datetime picker",trigger:".s_website_form_datetime input",run:"click",},{content:"Complete Date field",trigger:".o_date_picker .o_today",run:"click",},{content:"Check another product",trigger:"input[name='Products'][value='Xperia']",run:"click",},{content:"Check a service",trigger:"input[name='Service'][value='Development Service']",run:"click",},{content:"Select a State",trigger:"select[name='State']",run:"select Canada",},{content:"Complete Your Name field",trigger:"input[name='name']",run:"edit chhagan",},{content:"Complete Email field",trigger:"input[name=email_from]",run:"edit test@mail.com",},{content:"Complete Subject field",trigger:'input[name="subject"]',run:"edit subject",},{content:"Complete Your Question field",trigger:"textarea[name='description']",run:"edit magan",},{content:"Check if conditional field is visible, it shouldn't.",trigger:"body",run:function(){const style=window.getComputedStyle(this.anchor.getElementsByClassName("s_website_form_field_hidden_if")[0]);if(style.display!=="none"){console.error("error This field should be invisible when the name is not odoo");}},},{content:"Change name input",trigger:"input[name='name']",run:"edit odoo",},{content:"Check if conditional field is visible, it should.",trigger:"input[name='email_cc']",run:"click",},{content:"Select state option",trigger:"select[name='State']",run:"select 44 - UK",},{content:"Send the form",trigger:".s_website_form_send",run:"click",expectUnloadPage:true,},{content:"Check form is submitted without errors",trigger:"#wrap:has(h1:contains('Thank You!'))",},],});registry.category("web_tour.tours").add("website_form_editor_tour_results",{steps:()=>[{content:"Check mail.mail records have been created",trigger:"body",run:function(){var mailDef=rpc(`/web/dataset/call_kw/mail.mail/search_count`,{model:"mail.mail",method:"search_count",args:[[["email_to","=","test@test.test"],["body_html","like","A useless message"],["body_html","like","Service : Development Service"],["body_html","like","State : 44 - UK"],["body_html","like","Products : Xperia,Wiko Stairway"],],],kwargs:{},});var success=function(model,count){if(count>0){const div=document.createElement("div");div.id=`website_form_editor_success_test_tour_${model}`;document.body.append(div);}};mailDef.then(success.bind(this,"mail_mail"));},},{content:"Check mail.mail records have been created",trigger:"#website_form_editor_success_test_tour_mail_mail:not(:visible)",},],});registry.category("web_tour.tours").add("website_form_contactus_submit",{url:"/contactus",steps:()=>[{isActive:["body:has(.o-livechat-root)"],trigger:":shadow span:contains(select an option above)",},{content:"Fill in the subject",trigger:'input[name="subject"]',run:"edit Test",},{content:"Fill in the message",trigger:'textarea[name="description"]',run:"edit Test",},{content:"Send the form",trigger:".s_website_form_send",run:"click",expectUnloadPage:true,},{content:"Check form is submitted without errors",trigger:'#wrap:has(h1:contains("Thank You!"))',},],});registry.category("web_tour.tours").add("website_form_contactus_check_changed_email",{url:"/contactus",steps:()=>[{content:"Check that the recipient email is updated",trigger:'form:has(input[name="email_to"][value="after.change@mail.com"])',},],});return __exports;});;

/* /website/static/tests/tours/website_navbar_menu.js */
odoo.define('@website/../tests/tours/website_navbar_menu',['@web/core/registry','@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{registerWebsitePreviewTour}=require("@website/js/tours/tour_utils");registry.category("web_tour.tours").add("website_navbar_menu",{url:"/",steps:()=>[{content:"Ensure menus are in DOM",trigger:".top_menu .nav-item a:contains(Test Tour Menu)",},{content:"Ensure menus loading is done (so they are actually visible)",trigger:"body:not(:has(.o_menu_loading))",},{trigger:`.o_main_nav a[role="menuitem"]:contains(test tour menu)`,run:"click",expectUnloadPage:true,},{trigger:`main:contains(We couldn't find the page you're looking for!)`,},],});registerWebsitePreviewTour("website_systray_items_disappear",{url:"/"},()=>[{content:"Ensure frontend systray items have been added to the navbar",trigger:".o_main_navbar .o_menu_systray:has(.o_edit_website_container)",},{content:"Open configuration dropdown",trigger:".o_main_navbar button:contains(Configuration)",run:"click",},{content:"Go to settings",trigger:`.o_popover .o-dropdown-item:contains(Settings)`,run:"click",},{content:"Ensure frontend systray items have disappeared",trigger:`.o_main_navbar .o_menu_systray:not(:has(.o_edit_website_container, .o_new_content_container))`,},]);return __exports;});;

/* /website/static/tests/tours/website_no_dirty_page.js */
odoo.define('@website/../tests/tours/website_no_dirty_page',['@web/core/browser/browser','@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{browser}=require("@web/core/browser/browser");const{clickOnEditAndWaitEditMode,clickOnSave,insertSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");const makeSteps=(steps=[])=>[...insertSnippet({id:"s_text_image",name:"Text - Image",groupName:"Content",}),{content:"Click on Discard",trigger:".o-snippets-top-actions [data-action='cancel']",run:"click",},{content:"Check that discarding actually warns when there are dirty changes, and cancel",trigger:".modal-footer .btn-secondary",run:"click",},...clickOnSave(),...clickOnEditAndWaitEditMode(),{content:"Confirm we are in edit mode",trigger:":iframe #wrapwrap.odoo-editor-editable",},...steps,{content:"Click elsewhere and wait for a few ms",trigger:":iframe body",async run(actions){actions.click();await new Promise((resolve)=>{browser.setTimeout(()=>{document.body.classList.add("o_test_delay");resolve();},999);});},},{trigger:"body.o_test_delay",},{content:"Click on Discard",trigger:".o-snippets-top-actions [data-action='cancel']",run:"click",},{content:"Confirm we are not in edit mode anymore",trigger:":iframe #wrapwrap:not(.odoo-editor-editable)",},];registerWebsitePreviewTour("website_no_action_no_dirty_page",{url:"/",edition:true,},()=>makeSteps());registerWebsitePreviewTour("website_no_dirty_page",{url:"/",edition:true,},()=>makeSteps([{content:"Click on default image",trigger:":iframe .s_text_image img",run:"click",},{content:"Click on default paragraph",trigger:":iframe .s_text_image h2 + p",run:"click",},{content:"Click on button",trigger:":iframe .s_text_image .btn",async run(actions){await actions.click();const el=this.anchor;const sel=el.ownerDocument.getSelection();sel.collapse(el,0);el.focus();},},{content:"Add useless space at the end of the snippet class attribute, then click on it",trigger:":iframe .s_text_image",async run(actions){this.anchor.setAttribute("class",this.anchor.getAttribute("class")+" ");return actions.click();},},]));registerWebsitePreviewTour("website_no_dirty_lazy_image",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_text_image",name:"Text - Image",groupName:"Content",}),{trigger:':iframe img.o_lang_flag[loading="lazy"]',},{content:"Replace first paragraph, to insert a new link",trigger:":iframe #wrap .s_text_image p",run:"editor SomeTestText",},{trigger:':iframe #wrap .s_text_image p:contains("SomeTestText")',},{content:"Click elsewhere to be sure the editor fully process the new content",trigger:":iframe #wrap .s_text_image img",run:"click",},{trigger:"[data-action-id='replaceMedia']",},{content:"Check that there is no more than one dirty flag",trigger:":iframe body",run:function(){const dirtyCount=this.anchor.querySelectorAll(".o_dirty").length;if(dirtyCount!==1){console.error(dirtyCount+" dirty flag(s) found");}else{this.anchor.querySelector("#wrap").classList.add("o_dirty_as_expected");}},},{content:"Check previous step went through correctly about dirty flags",trigger:":iframe #wrap.o_dirty_as_expected",},]);return __exports;});;

/* /website/static/tests/tours/website_optimize_seo_menu.js */
odoo.define('@website/../tests/tours/website_optimize_seo_menu',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{registerWebsitePreviewTour}=require("@website/js/tours/tour_utils");const openSeoModalSteps=[{content:"click on the site menu",trigger:"button[data-menu-xmlid='website.menu_site']",run:"click",},{content:"click on the 'Optimize SEO' menu item",trigger:"a[data-menu-xmlid='website.menu_optimize_seo']",run:"click",},];registerWebsitePreviewTour("website.test_website_seo_with_duplicate_images_across_html_fields",{url:"/optimize_seo_test_page"},()=>[...openSeoModalSteps,{content:"check if the Optimize SEO modal is successfully triggered",trigger:".oe_seo_configuration",},{content:"check that the image from s_banner has been loaded in the modal",trigger:".oe_seo_configuration .o_seo_images_check img[src='/web/image/website.s_banner_default_image']",},{content:"Add an alt to one of the images",trigger:".oe_seo_configuration .o_seo_images_check input.form-control.is-invalid",run:"edit A very good description",},{content:"Save the changes",trigger:".modal-footer button:contains('Save')",run:"click",},{content:"Wait for the iframe to load and check that the image's alt was properly edited",trigger:":iframe [is-ready=true] #wrapwrap:has(#zone_left img[alt='A very good description'])",},...openSeoModalSteps,{content:"Check the modifications are still present in the modal",trigger:".oe_seo_configuration .o_seo_images_check input.form-control.is-valid",run:()=>{const input=document.querySelector(".oe_seo_configuration .o_seo_images_check input.form-control.is-valid");if(input.value!=="A very good description"){throw new Error("The input should have the image's alt as a value");}},},]);return __exports;});;

/* /website/static/tests/tours/website_page_options.js */
odoo.define('@website/../tests/tours/website_page_options',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{changeOptionInPopover,clickOnEditAndWaitEditMode,clickOnSave,clickOnSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("website_page_options",{url:"/",edition:true,},()=>[...clickOnSnippet({id:"o_header_standard",name:"Header"}),...changeOptionInPopover("Header","Header Position","Over the content"),...clickOnSave(),{content:"Check that the header is transparent",trigger:":iframe #wrapwrap.o_header_overlay",},...clickOnEditAndWaitEditMode(),...clickOnSnippet({id:"o_header_standard",name:"Header"}),{content:"Open the color picker to change the background color of the header",trigger:"div[data-container-title='Header'] .hb-row[data-label='Header Position'] + .hb-row-sublevel-1[data-label='Background'] button",run:"click",},{content:"Select the color black-600",trigger:".popover button[data-color='600']",run:"click",},...clickOnSave(),{content:"Check that the header is in black-600",trigger:":iframe header#top.bg-600",},...clickOnEditAndWaitEditMode(),...clickOnSnippet({id:"o_header_standard",name:"Header"}),{content:"Open the color picker to change the text color of the header",trigger:"div[data-container-title='Header'] .hb-row-sublevel-1[data-label='Text Color'] button",run:"click",},{content:"Select the color red",trigger:".popover button[data-color='#FF0000']",run:"click",},...clickOnSave(),{content:"Check that text color of the header is in red",trigger:':iframe header#top[style=" color: #ff0000;"]',},{content:"Enable the mobile view",trigger:".o_mobile_preview > a",run:"click",},{content:"Check that text color of the navbar toggler icon is in red",trigger:':iframe header#top [data-bs-toggle="offcanvas"] .navbar-toggler-icon',run:function(){if(getComputedStyle(this.anchor).color!=="rgb(255, 0, 0)"){console.error("The navbar toggler icon is not in red");}},},{content:"Disable the mobile view",trigger:".o_mobile_preview > a",run:"click",},...clickOnEditAndWaitEditMode(),...clickOnSnippet({id:"o_header_standard",name:"Header"}),...changeOptionInPopover("Header","Header Position","Hidden"),...clickOnSave(),{content:"Check that the header is hidden",trigger:":iframe #wrapwrap:has(header#top.d-none.o_snippet_invisible)",},...clickOnEditAndWaitEditMode(),{content:"Click on 'header' in the invisible elements list",trigger:".o_we_invisible_el_panel .o_we_invisible_entry",run:"click",},...clickOnSnippet({id:"o_footer",name:"Footer"}),{content:"Click on the visibility toggle to change the visibility of the footer",trigger:"div[data-container-title='Footer'] div[data-label='Page Visibility'] div[data-action-id='setWebsiteFooterVisible'] input",run:"click",},...clickOnSave(),{content:"Check that the header is visible",trigger:":iframe #wrapwrap header#top:not(.d-none)",},{content:"Check that the footer is hidden",trigger:":iframe #wrapwrap:has(.o_footer.d-none.o_snippet_invisible)",},]);return __exports;});;

/* /website/static/tests/tours/website_seo_notification.js */
odoo.define('@website/../tests/tours/website_seo_notification',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{clickOnEditAndWaitEditMode,clickOnSave,insertSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("website_seo_notification",{url:"/",},()=>[{content:"Open new page menu",trigger:".o_menu_systray .o_new_content_container > button",run:"click",},{content:"Click on new page",trigger:"button.o_new_content_element",run:"click",},{content:"Click on Use this template",trigger:".o_page_template .o_button_area:not(:visible)",run:"click",},{content:"Insert page name",trigger:".modal:not(.o_inactive_modal):contains(new page) .modal-body input[type=text]",run:"edit Test Page",},{trigger:"input[type='text']:value(Test Page)",},{content:"Create page",trigger:".modal:not(.o_inactive_modal):contains(new page) button.btn-primary:contains(create)",run:"click",},...insertSnippet({id:"s_text_image",name:"Text - Image",groupName:"Content",}),...clickOnSave(),{content:"Publish your website",trigger:".o_menu_systray_item.o_website_publish_container a",run:"click",},{content:"Check the SEO notification is displayed",trigger:".o_notification_manager .o_notification:contains('Page title not set.')",},{trigger:"body:not(:has(.o_notification_manager .o_notification))",},{content:"Open the dropdown menu",trigger:":iframe #o_main_nav .navbar-nav .dropdown.o_no_autohide_item > a.dropdown-toggle",run:"click",},{content:"Click on My Account",trigger:":iframe #o_main_nav .js_usermenu a.dropdown-item.ps-3:contains('My Account')",run:"click",},{content:"Let the page get loaded",trigger:":iframe .o_portal",},...clickOnEditAndWaitEditMode(),...insertSnippet({id:"s_text_image",name:"Text - Image",groupName:"Content",}),...clickOnSave(),{content:"Check the SEO notification should not be displayed",trigger:"body:not(:has(.o_notification_manager .o_notification))",},]);return __exports;});;

/* /website/static/tests/tours/website_snippets_menu_tabs.js */
odoo.define('@website/../tests/tours/website_snippets_menu_tabs',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{goToTheme,registerWebsitePreviewTour}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("website_snippets_menu_tabs",{url:"/",edition:true,},()=>[...goToTheme(),{trigger:"div[data-container-title='Colors'] div.we-bg-options-container",},{content:"Click on the empty 'DRAG BUILDING BLOCKS HERE' area.",trigger:":iframe main > .oe_structure.oe_empty",run:"click",},...goToTheme(),{content:"Verify that the customize panel is not empty.",trigger:".o_theme_tab .options-container",},{content:"Click on the style tab.",trigger:"button[data-name='customize']",run:"click",},...goToTheme(),{content:"Verify that the customize panel is not empty.",trigger:".o_theme_tab .options-container",},]);return __exports;});;

/* /website/static/tests/tours/website_style_edition.js */
odoo.define('@website/../tests/tours/website_style_edition',['@html_builder/utils/utils_css','@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{areCssValuesEqual}=require("@html_builder/utils/utils_css");const{clickOnEditAndWaitEditMode,clickOnSave,goToTheme,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");const TARGET_FONT_SIZE=20;const TARGET_BODY_BG_COLOR="#00FF00";const TARGET_BODY_BG_COLOR_V2="rgb(0, 255, 0)";const TARGET_BODY_COLOR="#FF00FF";const TARGET_BODY_COLOR_V2="rgb(255, 0, 255)";const checkFontSize=function(){const style=document.defaultView.getComputedStyle(this.anchor);if(!areCssValuesEqual(style.fontSize,`${TARGET_FONT_SIZE}px`,"font-size",style)){console.error(`Expected the font-size to be equal to ${TARGET_FONT_SIZE}px but found ${style.fontSize} instead`);}};const checkBodyBgColor=function(){const style=document.defaultView.getComputedStyle(this.anchor);if(!areCssValuesEqual(style.backgroundColor,`${TARGET_BODY_BG_COLOR}`,"background-color",style)){console.error(`Expected the background color to be equal to ${TARGET_BODY_BG_COLOR} but found ${style.backgroundColor} instead`);}};const checkBodyColor=function(){const style=document.defaultView.getComputedStyle(this.anchor);if(!areCssValuesEqual(style.color,`${TARGET_BODY_COLOR}`,"color",style)){console.error(`Expected the color to be equal to ${TARGET_BODY_COLOR} but found ${style.color} instead`);}};registerWebsitePreviewTour("website_style_edition",{url:"/",edition:true,},()=>[...goToTheme(),{content:"Change font size",trigger:"[data-action-param='font-size-base'] input",run:`edit ${TARGET_FONT_SIZE} && click body`,},{trigger:':iframe html:not(:has(link[href$="web.assets_frontend.min.css"]))',},{content:"Check the font size was properly adapted",trigger:":iframe #wrapwrap",run:checkFontSize,},{content:"Open the color combinations area",trigger:"div[data-label='Color Presets'] button",run:"click",},{content:"Open a color combination",trigger:"div[id^='builder_collapse_content'] button.o_hb_collapse_toggler",run:"click",},{content:"Edit the background color of that color combination",trigger:"div[id^='builder_collapse_content'] div .o_we_color_preview",run:"click",},{content:"Choose a color",trigger:`.o_font_color_selector .o_color_button[data-color="${TARGET_BODY_BG_COLOR}"]`,run:"click",},{trigger:`
        div[id^='builder_collapse_content'] div .o_we_color_preview[style*="${TARGET_BODY_BG_COLOR}"],
        div[id^='builder_collapse_content'] div .o_we_color_preview[style*="${TARGET_BODY_BG_COLOR_V2}"]
    `,},{content:"Check the body background color was properly adapted",trigger:":iframe body",run:checkBodyBgColor,},{content:"Edit the text color of that color combination",trigger:"div[id^='builder_collapse_content'] div[data-label='Text'] .o_we_color_preview",run:"click",},{content:"Choose a color",trigger:`.o_font_color_selector .o_color_button[data-color="${TARGET_BODY_COLOR}"]`,run:"click",},{trigger:`
        div[id^='builder_collapse_content'] div .o_we_color_preview[style*="${TARGET_BODY_COLOR}"],
        div[id^='builder_collapse_content'] div .o_we_color_preview[style*="${TARGET_BODY_COLOR_V2}"]
    `,},{content:"Check the body color was properly adapted",trigger:":iframe body",run:checkBodyColor,},...clickOnSave(),{content:"Check the font size is still ok outside of edit mode",trigger:":iframe body #wrapwrap",run:checkFontSize,},{content:"Check the body background color is still ok outside of edit mode",trigger:":iframe body",run:checkBodyBgColor,},{content:"Check the body color is still ok outside of edit mode",trigger:":iframe body",run:checkBodyColor,},...clickOnEditAndWaitEditMode(),...goToTheme(),{trigger:"div[data-label='Background'] button[data-action-value='NONE'].active",},{content:"Click on the Background Image selection",trigger:"div[data-label='Background'] button[data-action-value='image']:not(.active)",run:"click",},{content:"The media dialog should open",trigger:".o_select_media_dialog",},]);return __exports;});;

/* /website/static/tests/tours/website_text_edition.js */
odoo.define('@website/../tests/tours/website_text_edition',['@website/js/tours/tour_utils','@web/core/utils/colors'],function(require){'use strict';let __exports={};const{insertSnippet,goBackToBlocks,goToTheme,registerWebsitePreviewTour,clickToolbarButton,}=require("@website/js/tours/tour_utils");const{rgbToHex}=require("@web/core/utils/colors");const WEBSITE_MAIN_COLOR="#ABCDEF";registerWebsitePreviewTour("website_text_edition",{url:"/",edition:true,},()=>[...goToTheme(),{content:"Open colorpicker to change website main color",trigger:".we-bg-options-container .o_we_color_preview",run:"click",},{content:"Open colorpicker to change website main color",trigger:".o_font_color_selector button:contains('Custom')",run:"click",},{content:"Input the value for the new website main color (also make sure it is independent from the backend)",trigger:".o_hex_input",run:`edit ${WEBSITE_MAIN_COLOR} && click body`,},goBackToBlocks(),...insertSnippet({id:"s_text_block",name:"Text",groupName:"Text"}),...clickToolbarButton("text block first paragraph",".s_text_block p","Apply Font Color",true),{content:"Open solid section in color picker",trigger:".o_font_color_selector button:contains('Custom')",run:"click",},{content:"Select main color",trigger:".o_colorpicker_widget .o_color_picker_inputs .o_hex_input",run:`edit ${WEBSITE_MAIN_COLOR} && click body`,},{content:"Check that paragraph now uses the main color *class*",trigger:":iframe .s_text_block p",run:function(actions){const fontEl=this.anchor.querySelector("font");if(!fontEl){console.error("A background color should have been applied");return;}
if(fontEl.style.backgroundColor){console.error("The paragraph should not have an inline style background color");return;}
const rgbColor=fontEl.style.getPropertyValue("color");const hexColor=rgbToHex(rgbColor);if(hexColor.toUpperCase()!==WEBSITE_MAIN_COLOR){console.error("The paragraph should have the right background color class");return;}},},]);return __exports;});;

/* /website/static/tests/tours/website_text_font_size.js */
odoo.define('@website/../tests/tours/website_text_font_size',['@website/js/tours/tour_utils','@html_editor/utils/formatting'],function(require){'use strict';let __exports={};const{insertSnippet,goToTheme,registerWebsitePreviewTour,clickToolbarButton,}=require("@website/js/tours/tour_utils");const{FONT_SIZE_CLASSES}=require("@html_editor/utils/formatting");const classNameInfo=new Map();classNameInfo.set("display-1-fs",{scssVariableName:"display-1-font-size",start:80,end:90,scssVariableMainName:"h1-font-size",});classNameInfo.set("display-2-fs",{scssVariableName:"display-2-font-size",start:72,end:80,scssVariableMainName:"h1-font-size",});classNameInfo.set("display-3-fs",{scssVariableName:"display-3-font-size",start:64,end:70,scssVariableMainName:"h1-font-size",});classNameInfo.set("display-4-fs",{scssVariableName:"display-4-font-size",start:56,end:60,scssVariableMainName:"h1-font-size",});classNameInfo.set("h1-fs",{scssVariableName:"h1-font-size",start:48,end:50,scssVariableMainName:"h1-font-size",});classNameInfo.set("h2-fs",{scssVariableName:"h2-font-size",start:40,end:42,scssVariableMainName:"h1-font-size",});classNameInfo.set("h3-fs",{scssVariableName:"h3-font-size",start:32,end:38,scssVariableMainName:"h1-font-size",});classNameInfo.set("h4-fs",{scssVariableName:"h4-font-size",start:24,end:34,scssVariableMainName:"h1-font-size",});classNameInfo.set("h5-fs",{scssVariableName:"h5-font-size",start:20,end:30,scssVariableMainName:"h1-font-size",});classNameInfo.set("h6-fs",{scssVariableName:"h6-font-size",start:16,end:26,scssVariableMainName:"h1-font-size",});classNameInfo.set("base-fs",{scssVariableName:"font-size-base",start:16,end:26,scssVariableMainName:"font-size-base",});classNameInfo.set("o_small-fs",{scssVariableName:"small-font-size",start:14,end:24,scssVariableMainName:"font-size-base",});function checkComputedFontSize(fontSizeClass,stage){return{content:`Check that the computed font size for ${fontSizeClass} is correct`,trigger:`:iframe #wrap .s_text_block .${fontSizeClass}`,run:function(){const computedFontSize=parseInt(getComputedStyle(this.anchor).fontSize);const expectedFontSize=classNameInfo.get(fontSizeClass)[stage];const gapBetweenSizes=Math.abs(computedFontSize-expectedFontSize);const gapTolerance=7;if(gapBetweenSizes>gapTolerance){console.error(`When applied class ${fontSizeClass}, the font size is `+`${computedFontSize} instead of ~${expectedFontSize}`);}},};}
function getFontSizeTestSteps(fontSizeClass){return[...insertSnippet({id:"s_text_block",name:"Text",groupName:"Text"}),...clickToolbarButton(`text block first paragraph [${fontSizeClass}]`,".s_text_block p","Select font size"),{content:`Select ${fontSizeClass} in the dropdown`,trigger:`.o_font_size_selector_menu span:contains(${
                classNameInfo.get(fontSizeClass).start
            })`,run:"click",},checkComputedFontSize(fontSizeClass,"start"),...goToTheme(),{content:`Open the collapse to see the font size of ${fontSizeClass}`,trigger:`.we-bg-options-container:has([data-action-param="${
                classNameInfo.get(fontSizeClass).scssVariableMainName
            }"]) [data-label="Font Size"] .o_hb_collapse_toggler`,run:"click",},{content:`Check that the setting for ${fontSizeClass} is correct`,trigger:`[data-action-param="${classNameInfo.get(fontSizeClass).scssVariableName}"]`+` input:value("${classNameInfo.get(fontSizeClass).start}")`,},{content:`Change the setting value of ${fontSizeClass}`,trigger:`[data-action-param="${
                classNameInfo.get(fontSizeClass).scssVariableName
            }"] input`,run:`edit ${classNameInfo.get(fontSizeClass).end} && click body`,},{content:`[${fontSizeClass}] Go to blocks tab`,trigger:"[data-name='blocks']",run:"click",},{content:`[${fontSizeClass}] Wait to be in blocks tab`,trigger:"[data-name='blocks'].active",run:"click",},...goToTheme(),{content:`Open the collapse to see the font size of ${fontSizeClass}`,trigger:`.we-bg-options-container:has([data-action-param="${
                classNameInfo.get(fontSizeClass).scssVariableMainName
            }"]) [data-label="Font Size"] .o_hb_collapse_toggler`,run:"click",},{content:`Check that the setting of ${fontSizeClass} has been updated`,trigger:`[data-action-param="${classNameInfo.get(fontSizeClass).scssVariableName}"]`+` input:value("${classNameInfo.get(fontSizeClass).end}")`,},{trigger:`body:not(:has(.o_we_ui_loading))`,},{content:`Close the collapse to hide the font size of ${fontSizeClass}`,trigger:`.we-bg-options-container:has([data-action-param="${
                classNameInfo.get(fontSizeClass).scssVariableMainName
            }"]) [data-label="Font Size"] .o_hb_collapse_toggler`,run:"click",},checkComputedFontSize(fontSizeClass,"end"),{content:`Click again on the text with class ${fontSizeClass}`,trigger:`:iframe #wrap .s_text_block .${fontSizeClass}`,run:"click",},{content:`Remove the text snippet containing the text with class ${fontSizeClass}`,trigger:`.oe_snippet_remove`,async run(helpers){await helpers.click();await new Promise((r)=>setTimeout(r,300));},},];}
function getAllFontSizesTestSteps(){const steps=[];const fontSizeClassesToSkip=["base-fs","small","o_small_twelve-fs","o_small_ten-fs","o_small_eight-fs",];for(const fontSizeClass of FONT_SIZE_CLASSES){if(fontSizeClassesToSkip.includes(fontSizeClass)){continue;}
steps.push(...getFontSizeTestSteps(fontSizeClass));}
return steps;}
registerWebsitePreviewTour("website_text_font_size",{url:"/",edition:true,},()=>[...getAllFontSizesTestSteps(),{content:"Verify that the text block has been deleted",trigger:":iframe #wrap:not(:has(.s_text_block))",},]);return __exports;});;

/* /website/static/tests/tours/website_update_column_count.js */
odoo.define('@website/../tests/tours/website_update_column_count',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{clickOnSnippet,insertSnippet,registerWebsitePreviewTour,toggleMobilePreview,changeOptionInPopover,}=require("@website/js/tours/tour_utils");const columnCountOptSelector="div[data-label='Layout'] .dropdown-toggle";const columnsSnippetRow=":iframe .s_three_columns .row";const textImageSnippetRow=":iframe .s_text_image .row";const changeFirstAndSecondColumnsMobileOrder=(snippetRowSelector,snippetName)=>[{content:`Scroll into view`,trigger:`${snippetRowSelector} > div:nth-child(1)`,run(){this.anchor.scrollIntoView();},},{content:`Click on the first column of the '${snippetName}' snippet`,trigger:`${snippetRowSelector} > div:nth-child(1)`,run:"click",},{content:"Change the orders of the 1st and 2nd columns",trigger:"body .o_overlay_options button[title='Move down']",run:"click",},];const addMobileOrderToTextImageSnippet=[...changeFirstAndSecondColumnsMobileOrder(textImageSnippetRow,"Text-Image"),{content:"Check that the mobile order classes and styles are correct",trigger:`${textImageSnippetRow}:has(.order-lg-0[style*='order: 1;']:nth-child(1))`+":has(.order-lg-0[style*='order: 0;']:nth-child(2))",},];const checkIfNoMobileOrder=(snippetRowSelector)=>({content:"Check that the mobile order classes and styles were removed",trigger:`${snippetRowSelector}:not(:has(.order-lg-0[style*='order: ']))`,});registerWebsitePreviewTour("website_update_column_count",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_three_columns",name:"Columns",groupName:"Columns",}),...clickOnSnippet({id:"s_three_columns",name:"Columns",}),...changeOptionInPopover("Columns","Layout","[data-action-value='5']"),{content:"Check that there are now 5 items on 5 columns, and that it didn't change the mobile layout",trigger:`${columnsSnippetRow}:has(.col-lg-2:nth-child(5):not(.col-2)):not(:has(:nth-child(6)))`,},{content:"Check that there is an offset on the 1st item to center the row on desktop, but not on mobile",trigger:`${columnsSnippetRow} > .offset-lg-1:not(.offset-1):first-child`,},...changeOptionInPopover("Columns","Layout","[data-action-value='2']"),{content:"Check that there are still 5 items in the row and click on the last one",trigger:`${columnsSnippetRow} > :nth-child(5)`,run:"click",},{content:"Delete the item",trigger:"div[data-container-title='Card'] .oe_snippet_remove",run:"click",},{content:"Toggle mobile view",trigger:".o-snippets-top-actions button[data-action='mobile']",run:"click",},{content:"Check that there is 1 column on mobile and click on the selector",trigger:`${columnCountOptSelector}:contains('1')`,run:"click",},{content:"Set 3 columns on mobile",trigger:".o_popover div[data-action-id='changeColumnCount'][data-action-value='3']",run:"click",},{content:"Check that there are still 4 items but on rows of 3 columns",trigger:`${columnsSnippetRow}:has(.col-lg-6.col-4:nth-child(4))`,},{content:"Click on the 2nd item",trigger:`${columnsSnippetRow} > :nth-child(2)`,run:"click",},{content:"Add a fake resized class on mobile to the 2nd item",trigger:`${columnsSnippetRow} > :nth-child(2)`,async run(){const overlayEl=document.querySelector(".oe_overlay.oe_active .o_side_x.e");const triggerPointerEvent=(type,x,y)=>{const event=new PointerEvent(type,{bubbles:true,pageX:x,pageY:y,clientX:x,clientY:y,pointerType:"mouse",});(type==="pointermove"?window:overlayEl).dispatchEvent(event);};triggerPointerEvent("pointerdown",100,100);await new Promise((resolve)=>setTimeout(resolve,0));triggerPointerEvent("pointermove",150,100);triggerPointerEvent("pointerup",150,100);},},{content:"Check that the counter shows 'Custom'",trigger:`${columnCountOptSelector}:contains('Custom')`,},{content:"Click on the 2nd item",trigger:`${columnsSnippetRow} > :nth-child(2)`,run:"click",},{content:"Change the orders of the 2nd and 3rd items",trigger:".o_overlay_options [aria-label='Move right']",run:"click",},{trigger:`${columnsSnippetRow}:has([style*='order: 2;'].order-lg-0:nth-child(2) + [style*='order: 1;'].order-lg-0:nth-child(3))`,},{content:"Check that the 1st item now has order: 0 and a class .order-lg-0 "+"and that order: 1, .order-lg-0 is set on the 3rd item, and order: 2, .order-lg-0 on the 2nd",trigger:`${columnsSnippetRow}:has([style*='order: 0;'].order-lg-0:first-child)`,},{content:"Toggle desktop view",trigger:".o-snippets-top-actions button[data-action='mobile']",run:"click",},...changeOptionInPopover("Columns","Layout","[data-action-value='6']"),{content:"Check that each item has a different mobile order from 0 to 5",trigger:`${columnsSnippetRow}${[0, 1, 2, 3, 4, 5]
                .map((n) => `:has([style*='order: ${n};'].order-lg-0)`)
                .join("")}`,},{content:"Click on the 6th item",trigger:`${columnsSnippetRow} > :nth-child(6)`,run:"click",},{content:"Change the orders of the 5th and 6th items to override the mobile orders",trigger:".o_overlay_options [aria-label='Move left']",run:"click",},{content:"Check that there are no orders anymore",trigger:`${columnsSnippetRow}:not(:has([style*='order: 0;'])):not(:has(.order-lg-0))`,},]);registerWebsitePreviewTour("website_mobile_order_with_drag_and_drop",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_three_columns",name:"Columns",groupName:"Columns"}),...insertSnippet({id:"s_text_image",name:"Text - Image",groupName:"Content"}),...toggleMobilePreview(true),...changeFirstAndSecondColumnsMobileOrder(columnsSnippetRow,"Columns"),{content:"Check that the mobile order classes and styles are correct",trigger:`${columnsSnippetRow}:has(.order-lg-0[style*='order: 1;']:nth-child(1))`+":has(.order-lg-0[style*='order: 0;']:nth-child(2))"+":has(.order-lg-0[style*='order: 2;']:nth-child(3))",},...addMobileOrderToTextImageSnippet,...toggleMobilePreview(false),{content:"Drag a 'Text-Image' column and drop it in the same snippet",trigger:"body .o_overlay_options .o_move_handle",run(helpers){return helpers.drag_and_drop(textImageSnippetRow,{position:"bottom",relative:true,});},},checkIfNoMobileOrder(textImageSnippetRow),...toggleMobilePreview(true),...addMobileOrderToTextImageSnippet,...toggleMobilePreview(false),{content:"Click on the second column of the 'Columns' snippet",trigger:`${columnsSnippetRow} > div:nth-child(2)`,run:"click",},{content:"Drag the second column of 'Columns' and drop it in 'Text-Image'",trigger:"body .o_overlay_options .o_move_handle, body .o_overlay_options .o_move_handle:not(:visible)",run:`drag_and_drop ${textImageSnippetRow}`,},checkIfNoMobileOrder(textImageSnippetRow),{content:"Check that the order gap left in 'Columns' was filled",trigger:`${columnsSnippetRow}:has(.order-lg-0[style*='order: 0;']:nth-child(1))`+":has(.order-lg-0[style*='order: 1;']:nth-child(2))",},]);return __exports;});;

/* /website/static/src/client_actions/website_preview/website_builder_action_test_mode.js */
odoo.define('@website/client_actions/website_preview/website_builder_action_test_mode',['@web/core/utils/patch','@website/client_actions/website_preview/website_builder_action'],function(require){'use strict';let __exports={};const{patch}=require("@web/core/utils/patch");const{WebsiteBuilderClientAction}=require("@website/client_actions/website_preview/website_builder_action");patch(WebsiteBuilderClientAction.prototype,{get testMode(){return true;},});return __exports;});;

/* /html_builder/static/src/utils/utils_css.js */
odoo.define('@html_builder/utils/utils_css',['@html_editor/utils/color','@html_editor/utils/dom_traversal','@html_editor/utils/image','@web/core/utils/colors','@html_editor/utils/formatting'],function(require){'use strict';let __exports={};const{EDITOR_COLOR_CSS_VARIABLES,isColorCombinationName}=require("@html_editor/utils/color");const{selectElements}=require("@html_editor/utils/dom_traversal");const{backgroundImageCssToParts,getBgImageURLFromURL}=require("@html_editor/utils/image");const{normalizeCSSColor,isCSSColor,isColorGradient}=require("@web/core/utils/colors");const{convertNumericToUnit,getCSSVariableValue}=require("@html_editor/utils/formatting");const CSS_SHORTHANDS=__exports.CSS_SHORTHANDS={"border-width":["border-top-width","border-right-width","border-bottom-width","border-left-width",],"border-radius":["border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius",],"--box-border-width":["--box-border-top-width","--box-border-right-width","--box-border-bottom-width","--box-border-left-width",],"--box-border-radius":["--box-border-top-left-radius","--box-border-top-right-radius","--box-border-bottom-right-radius","--box-border-bottom-left-radius",],"border-color":["border-top-color","border-right-color","border-bottom-color","border-left-color",],"border-style":["border-top-style","border-right-style","border-bottom-style","border-left-style",],padding:["padding-top","padding-right","padding-bottom","padding-left"],};const BACKGROUND_IMAGE_ATTRIBUTES=new Set(["originalId","originalSrc","mimetype","resizeWidth","glFilter","quality","filterOptions","mimetypeBeforeConversion",]);__exports.convertValueToUnit=convertValueToUnit;function convertValueToUnit(value,unitTo,htmlStyle){const m=getNumericAndUnit(value);if(!m){return NaN;}
const numValue=parseFloat(m[0]);const valueUnit=m[1];return convertNumericToUnit(numValue,valueUnit,unitTo,htmlStyle);}
__exports.getNumericAndUnit=getNumericAndUnit;function getNumericAndUnit(value){const m=value.trim().match(/^(-?[0-9.]+(?:e[+|-]?[0-9]+)?)\s*([^\s]*)$/);if(!m){return null;}
return[m[1].trim(),m[2].trim()];}
__exports.areCssValuesEqual=areCssValuesEqual;function areCssValuesEqual(value1,value2,cssProp,htmlStyle){if(value1===value2){return true;}
if(cssProp&&cssProp.endsWith("-size")&&!cssProp.startsWith("--")){const pseudoPartProp=cssProp+"-part";const re=/-?[0-9.]+(?:e[+|-]?[0-9]+)?\s*[A-Za-z%-]+|auto/g;const parts1=value1.match(re);const parts2=value2.match(re);for(const index of[0,1]){const part1=parts1&&parts1.length>index?parts1[index]:"auto";const part2=parts2&&parts2.length>index?parts2[index]:"auto";if(!areCssValuesEqual(part1,part2,pseudoPartProp,htmlStyle)){return false;}}
return true;}
if(isCSSVariable(value1)){value1=getCSSVariableValue(value1.substring(6,value1.length-1),htmlStyle);}
if(isCSSVariable(value2)){value2=getCSSVariableValue(value2.substring(6,value2.length-1),htmlStyle);}
if(value1===value2){return true;}
const color1=normalizeCSSColor(value1);const color2=normalizeCSSColor(value2);if(color1===color2){return true;}
const value1IsGradient=isColorGradient(value1);const value2IsGradient=isColorGradient(value2);if(value1IsGradient!==value2IsGradient){return false;}
if(value1IsGradient){const temp1El=document.createElement("div");temp1El.style.backgroundImage=value1;document.body.appendChild(temp1El);value1=getComputedStyle(temp1El).backgroundImage;document.body.removeChild(temp1El);const temp2El=document.createElement("div");temp2El.style.backgroundImage=value2;document.body.appendChild(temp2El);value2=getComputedStyle(temp2El).backgroundImage;document.body.removeChild(temp2El);return value1===value2;}
if(cssProp==="box-shadow"){const temp1El=document.createElement("div");temp1El.style.boxShadow=value1;document.body.appendChild(temp1El);value1=getComputedStyle(temp1El).boxShadow;document.body.removeChild(temp1El);const temp2El=document.createElement("div");temp2El.style.boxShadow=value2;document.body.appendChild(temp2El);value2=getComputedStyle(temp2El).boxShadow;document.body.removeChild(temp2El);return value1===value2;}
const data=getNumericAndUnit(value1);if(!data){return false;}
const numValue1=data[0];const numValue2=parseFloat(numValue1)===0?getNumericAndUnit(value2)[0]:convertValueToUnit(value2,data[1],htmlStyle);return Math.abs(numValue1-numValue2)<Number.EPSILON;}
__exports.isCSSVariable=isCSSVariable;function isCSSVariable(value){value=value.replace(/^'|'$/g,"");return/^var\(--.+?\)$/.test(value);}
__exports.computeColorClasses=computeColorClasses;function computeColorClasses(colorNames,prefix="bg-"){let hasCCClasses=false;const isBgPrefix=prefix==="bg-";const classes=colorNames.map((c)=>{if(isBgPrefix&&isColorCombinationName(c)){hasCCClasses=true;return`o_cc${c}`;}
return prefix+c;});if(hasCCClasses){classes.push("o_cc");}
return classes;}
__exports.normalizeColor=normalizeColor;function normalizeColor(color,htmlStyle){if(isCSSColor(color)){return color;}
return getCSSVariableValue(color,htmlStyle);}
__exports.getBgImageURLFromEl=getBgImageURLFromEl;function getBgImageURLFromEl(el){const style=el.ownerDocument.defaultView.getComputedStyle(el);const parts=backgroundImageCssToParts(style.backgroundImage);const string=parts.url||"";return getBgImageURLFromURL(string);}
__exports.generateHTMLId=generateHTMLId;function generateHTMLId(){return`o${Math.random().toString(36).substring(2, 15)}`;}
__exports.getColorClass=getColorClass;function getColorClass(el,colorNames,prefix){const prefixedColorNames=computeColorClasses(colorNames,prefix);return el.classList.value.split(" ").filter((cl)=>prefixedColorNames.includes(cl)).join(" ");}
__exports.addBackgroundImageAttributes=addBackgroundImageAttributes;function addBackgroundImageAttributes(...newAttributes){BACKGROUND_IMAGE_ATTRIBUTES.add(...newAttributes);}
__exports.isBackgroundImageAttribute=isBackgroundImageAttribute;function isBackgroundImageAttribute(attribute){return BACKGROUND_IMAGE_ATTRIBUTES.has(attribute);}
__exports.shouldEditableMediaBeEditable=shouldEditableMediaBeEditable;function shouldEditableMediaBeEditable(mediaEl){return mediaEl.parentElement&&mediaEl.parentElement.closest(".o_editable");}
__exports.getLinkLabel=getLinkLabel;function getLinkLabel(linkEl){return linkEl.textContent.replaceAll("\u200B","").replaceAll("\uFEFF","");}
__exports.forwardToThumbnail=forwardToThumbnail;function forwardToThumbnail(imgEl){const carouselEl=imgEl.closest(".carousel");if(carouselEl){const carouselInnerEl=imgEl.closest(".carousel-inner");const carouselItemEl=imgEl.closest(".carousel-item");if(carouselInnerEl&&carouselItemEl){const imageIndex=[...carouselInnerEl.children].indexOf(carouselItemEl);const miniatureEl=carouselEl.querySelector(`.carousel-indicators [data-bs-slide-to="${imageIndex}"]`);if(miniatureEl&&miniatureEl.style.backgroundImage){miniatureEl.style.backgroundImage=`url(${imgEl.getAttribute("src")})`;}}}}
__exports.isImageCorsProtected=isImageCorsProtected;async function isImageCorsProtected(img){const src=img.getAttribute("src");if(!src){return false;}
let isCorsProtected=false;if(!src.startsWith("/")||/\/web\/image\/\d+-redirect\//.test(src)){isCorsProtected=await fetch(src,{method:"HEAD"}).then(()=>false).catch(()=>true);}
return isCorsProtected;}
__exports.applyNeededCss=applyNeededCss;function applyNeededCss(el,cssProp,cssValue,computedStyle=el.ownerDocument.defaultView.getComputedStyle(el),{force=false,allowImportant=true}={}){if(force){el.style.setProperty(cssProp,cssValue,allowImportant?"important":"");return true;}
el.style.removeProperty(cssProp);if(!areCssValuesEqual(computedStyle.getPropertyValue(cssProp),cssValue,cssProp,computedStyle)){el.style.setProperty(cssProp,cssValue);if(allowImportant&&!areCssValuesEqual(computedStyle.getPropertyValue(cssProp),cssValue,cssProp,computedStyle)){el.style.setProperty(cssProp,cssValue,"important");}
return true;}
return false;}
const builderStylesheet=new CSSStyleSheet();__exports.setBuilderCSSVariables=setBuilderCSSVariables;function setBuilderCSSVariables(htmlStyle){const styles=[];for(const style of EDITOR_COLOR_CSS_VARIABLES){let value=getCSSVariableValue(style,htmlStyle);if(value.startsWith("'")&&value.endsWith("'")){value=value.substring(1,value.length-1);}
styles.push(`--hb-cp-${style}: ${value};`);}
builderStylesheet.replaceSync(`html { ${styles.join(" ")} }`);if(!window.top.document.adoptedStyleSheets.find((style)=>style===builderStylesheet)){window.top.document.adoptedStyleSheets.push(builderStylesheet);}}
__exports.parseBoxShadow=parseBoxShadow;function parseBoxShadow(value){const regex=/(?<color>(rgb(a)?\([^)]*\))|(var\([^)]+\)))\s+(?<offsetX>-?\d+\.?\d*px)\s+(?<offsetY>-?\d+\.?\d*px)\s+(?<blur>-?\d+\.?\d*px)\s+(?<spread>-?\d+\.?\d*px)(?:\s+(?<mode>\w+))?/;return value.match(regex)?.groups??{};}
__exports.getAllUsedColors=getAllUsedColors;function getAllUsedColors(el){const usedCustomColors=new Set();const collectColor=(colorValue)=>{if(isCSSColor(colorValue)){usedCustomColors.add(normalizeCSSColor(colorValue));}};for(const coloredEl of selectElements(el,'[style*="color"]')){for(const colorProperty of["color","background-color","border-color"]){collectColor(coloredEl.style[colorProperty]);}}
for(const shadowEl of selectElements(el,'[style*="box-shadow"]')){const shadowValue=shadowEl.style["box-shadow"];if(shadowValue){collectColor(parseBoxShadow(shadowValue).color);}}
for(const dataColoredEl of selectElements(el,"*")){for(const attributeName of Object.keys(dataColoredEl.dataset)){if(attributeName.endsWith("olor")){collectColor(dataColoredEl.dataset[attributeName]);}}}
const collectUrlColors=(urlString)=>{const url=new URL(urlString,window.location);for(const colorKey of[...url.searchParams.keys()].filter((key)=>/c\d/.test(key))){collectColor(url.searchParams.get(colorKey));}};for(const imgEl of selectElements(el,'img[src^="/html_editor/shape/"], img[src^="/web_editor/shape/"]')){collectUrlColors(imgEl.src);}
for(const bgEl of selectElements(el,`[style*="background-image: url(\\"/html_editor/shape/"], [style*="background-image: url(\\"/web_editor/shape/"]`)){collectUrlColors(getBgImageURLFromEl(bgEl));}
return usedCustomColors;}
return __exports;});;

/* /web_enterprise/static/tests/tours/web_enterprise_tours.js */
odoo.define('@web_enterprise/../tests/tours/web_enterprise_tours',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("web_enterprise.test_studio_list_upsell",{steps:()=>[{trigger:".o_list_view",},{trigger:".o_optional_columns_dropdown > button",run:"click",},{trigger:" .o-dropdown--menu .dropdown-item-studio",},],});registry.category("web_tour.tours").add("web_enterprise.test_studio_no_list_upsell_if_blacklisted",{steps:()=>[{trigger:".o_list_view",},{trigger:".o_optional_columns_dropdown > button",run:"click",},{trigger:".o-dropdown--menu:not(:has(.dropdown-item-studio))",},],});return __exports;});;

/* /mail_enterprise/static/tests/tours/discuss_channel_expand_test_tour.js */
odoo.define('@mail_enterprise/../tests/tours/discuss_channel_expand_test_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("mail_enterprise/static/tests/tours/discuss_channel_expand_test_tour.js",{url:"/odoo",steps:()=>[{trigger:".o-mail-DiscussSystray-class .fa-comments",run:"click",},{trigger:".o-mail-NotificationItem:contains('test-mail-channel-expand-tour')",run:"click",},{trigger:'.o-mail-ChatWindow:contains("test-mail-channel-expand-tour") [title="Open Actions Menu"]',run:"click",},{trigger:'.o-dropdown-item:contains("Open in Discuss")',run:"click",},{content:"Check that first message of #test-mail-channel-expand-tour is shown in Discuss app",trigger:'.o-mail-DiscussContent .o-mail-Message-body:contains("test-message-mail-channel-expand-tour")',},],});return __exports;});;

/* /account_accountant/static/tests/tours/test_tour_bank_rec_save_analytic_distribution.js */
odoo.define('@account_accountant/../tests/tours/test_tour_bank_rec_save_analytic_distribution',['@web/core/registry','@web_tour/tour_utils','@account/js/tours/account'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");const{accountTourSteps}=require("@account/js/tours/account");registry.category("web_tour.tours").add('account_accountant_bank_rec_widget_save_analytic_distribution',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),...accountTourSteps.goToAccountMenu("Open the accounting module"),{trigger:".o_breadcrumb",},{content:"Open the bank reconciliation widget",trigger:"button.btn-secondary[name='action_open_reconcile']",run:"click",},{trigger:"div[name='line_ids']",},{content:"The 'line1' should be selected by default",trigger:"div[name='line_ids'] td[field='name']:contains('line1')",},{content:"Click on first line",trigger:"div[name='line_ids'] td[field='debit']:first",run:"click",},{content:"The 'manual_operations_tab' should be active now and the auto_balance line mounted in edit",trigger:"a.active[name='manual_operations_tab']",},{content:"Enter an analytic distribution",trigger:"div[name='analytic_distribution'] .o_input_dropdown",run:"click",},{content:"Select analytic distribution",trigger:"tr[name='line_0'] input",run:"edit analytic_account",},{trigger:".ui-autocomplete",},{content:"Select analytic distribution",trigger:".ui-autocomplete:visible li:contains('analytic_account')",run:"click",},{content:"Close the analytic distribution",trigger:".o_button",run:"click",},...stepUtils.toggleHomeMenu(),...accountTourSteps.goToAccountMenu("Reset back to accounting module"),{content:"check that we're back on the dashboard",trigger:'a:contains("Sales")',},]});return __exports;});;

/* /account_accountant/static/tests/tours/test_tour_bank_rec_set_partner_branch_company.js */
odoo.define('@account_accountant/../tests/tours/test_tour_bank_rec_set_partner_branch_company',['@web/core/registry','@web_tour/tour_utils','@account/js/tours/account'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");const{accountTourSteps}=require("@account/js/tours/account");registry.category("web_tour.tours").add("account_accountant_bank_rec_set_partner_branch_company",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),...accountTourSteps.goToAccountMenu("Open the accounting module"),{content:"Open the branch bank reconciliation widget",trigger:"a.oe_kanban_action span:contains('Branch Bank')",run:"click",},{trigger:"div.o_bank_reconciliation_kanban_renderer",},{content:"Unfold the statement line",trigger:"div[name='bank_statement_line']",run:"click",},{content:"Line is unfolded",trigger:"div.o_button_line",},{content:"Open the Set Partner dialog",trigger:"button.set-partner-btn",run:"click",},{content:"Search dialog is open",trigger:"div.modal-dialog",},{content:"Parent company contact is visible in the results",trigger:"tbody > tr > td[name='display_name']:contains('AAAA Parent Partner')",},{content:"Select the parent company contact",trigger:"tbody > tr > td[name='display_name']:contains('AAAA Parent Partner')",run:"click",},{content:"Partner is set on the statement line",trigger:"span[name='statement_line_partner_name']:contains('AAAA Parent Partner')",},],});return __exports;});;

/* /account_accountant/static/tests/tours/test_tour_bank_rec_widget.js */
odoo.define('@account_accountant/../tests/tours/test_tour_bank_rec_widget',['@web/core/registry','@web_tour/tour_utils','@account/js/tours/account'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");const{accountTourSteps}=require("@account/js/tours/account");registry.category("web_tour.tours").add("account_accountant_bank_rec_widget",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),...accountTourSteps.goToAccountMenu("Open the accounting module"),{content:"Open the bank reconciliation widget",trigger:"a.oe_kanban_action span:contains('Bank')",run:"click",},{trigger:"div.o_bank_reconciliation_kanban_renderer",},{content:"Create New statement",trigger:"button.o-kanban-button-new",run:"click",},{trigger:"div.o_bank_reconciliation_quick_create",},{content:"Write Label",trigger:"div[name='payment_ref'] input",run:"edit test",},{content:"Add a amount",trigger:"div[name='amount'] input",run:"edit 100",},{content:"Save & close",trigger:"div.button_group button.o_kanban_edit",run:"click",},{content:"Statement is created",trigger:"div[name='bank_statement_line']",},{content:"Unfold statement line",trigger:"div[name='bank_statement_line']",run:"click",},{content:"line is unfolded",trigger:"div.o_button_line",},{content:"Set Partner",trigger:"button.set-partner-btn",run:"click",},{content:"Search view is opened",trigger:"div.modal-dialog",},{content:"Select first partner",trigger:"tbody > tr > td[name='display_name']",run:"click",},{content:"Partner is set",trigger:"span[name='statement_line_partner_name']",},{content:"Fold statement line",trigger:"div[name='bank_statement_line']",run:"click",},{content:"Statement line is reconciled because move with same partner and amount",trigger:"div[name='reconciled_line_name']",},{content:"Create New statement",trigger:"button.o-kanban-button-new",run:"click",},{trigger:"div.o_bank_reconciliation_quick_create",},{content:"Write Label",trigger:"div[name='payment_ref'] input",run:"edit test",},{content:"Add a amount",trigger:"div[name='amount'] input",run:"edit 150",},{content:"Save & close",trigger:"div.button_group button.o_kanban_edit",run:"click",},{content:"Open Ellipsis button",trigger:"button.btn-secondary i.oi-ellipsis-v",run:"click",},{content:"Reconcile button",trigger:"span.btn-link:contains('Reconcile')",run:"click",},{content:"Search view is opened",trigger:"div.modal-dialog",},{content:"Select first move line",trigger:"tbody > tr > td[name='partner_id']",run:"click",},{content:"Statement line is reconciled",trigger:"div[name='reconciled_line_name']",},{content:"Switch to list view",trigger:"button.o_switch_view.o_list",run:"click",},{content:"Select the statement lines",trigger:"div.o-checkbox",run:"click",},{content:"Open the Many2One to set statement",trigger:"td.o_bank_rec_list_many2one_multi_id_cell",run:"click",},{content:"Search for the created statement",trigger:"input.o-autocomplete--input",run:"click",},{content:"Select the created statement",trigger:"a.dropdown-item:contains('test')",run:"click",},{content:"Update setting statement on both lines",trigger:"button.btn-primary:contains('Update')",run:"click",},],});registry.category("web_tour.tours").add("account_accountant_set_partner_with_child_contact",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),...accountTourSteps.goToAccountMenu("Open the accounting module"),{content:"Open the bank reconciliation widget",trigger:"a.oe_kanban_action span:contains('Bank')",run:"click",},{trigger:"div.o_bank_reconciliation_kanban_renderer",},{content:"Create New statement",trigger:"button.o-kanban-button-new",run:"click",},{trigger:"div.o_bank_reconciliation_quick_create",},{content:"Write Label",trigger:"div[name='payment_ref'] input",run:"edit test",},{content:"Add a amount",trigger:"div[name='amount'] input",run:"edit 100",},{content:"Save & close",trigger:"div.button_group button.o_kanban_edit",run:"click",},{content:"Statement is created",trigger:"div[name='bank_statement_line']",},{content:"Set Partner",trigger:"button.set-partner-btn",run:"click",},{content:"Search view is opened",trigger:"div.modal-dialog",},{content:"Select partner",trigger:"body:not(:has(tbody > tr > td[name='display_name']:contains('test child contact')))",},]});registry.category("web_tour.tours").add("account_accountant_bank_reconciliation_ui_context_keys",{steps:()=>[{trigger:"div.o_bank_reconciliation_kanban_renderer",},{content:"Create New statement",trigger:"button.o-kanban-button-new",run:"click",},{trigger:"div.o_bank_reconciliation_quick_create",},{content:"Write Label",trigger:"div[name='payment_ref'] input",run:"edit test",},{content:"Add a amount",trigger:"div[name='amount'] input",run:"edit 100",},{content:"Save & close",trigger:"div.button_group button.o_kanban_edit",run:"click",},{content:"Statement is created",trigger:"div[name='bank_statement_line']",},{content:"Statement line is reconciled",trigger:"div[name='reconciled_line_name']",},{content:"Upload button is not shown for a synchronized journal (Kanban View)",trigger:"div.o_control_panel_main_buttons:not(:has(.o_button_upload_bill))",},{content:"Switch to List View",trigger:"button.o_switch_view.o_list",run:"click",},{content:"Upload button is not shown for a synchronized journal (List View)",trigger:"div.o_control_panel_main_buttons:not(:has(.o_button_upload_bill))",},]});return __exports;});;

/* /account_accountant/static/tests/tours/test_tour_bank_reconciliation_widget_reload_activities_when_add_a_new_one.js */
odoo.define('@account_accountant/../tests/tours/test_tour_bank_reconciliation_widget_reload_activities_when_add_a_new_one',['@web/core/registry','@web_tour/tour_utils','@account/js/tours/account'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");const{accountTourSteps}=require("@account/js/tours/account");registry.category("web_tour.tours").add("account_accountant_bank_reconciliation_widget_reload_activies_when_add_a_new_one",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),...accountTourSteps.goToAccountMenu("Open the accounting module"),{content:"Open the bank reconciliation widget",trigger:"a.oe_kanban_action span:contains('Bank')",run:"click",},{trigger:"div.o_bank_reconciliation_kanban_renderer",},{content:"Select statement line",trigger:"div[name='bank_statement_line']",run:"click",},{content:"Open chatter",trigger:"i.fa.fa-lg.fa-comments-o:not(:visible)",run:"click",},{content:"Chatter is opened",trigger:"div.o_bank_rec_widget_chatter_container",},{content:"Create an activity",trigger:"button.o-mail-Chatter-activity",run:"click",},{content:"Dialog activity is opened",trigger:"h4.modal-title:contains('Schedule Activity')",},{content:"Validate default activity",trigger:"button[name='action_schedule_activities']",run:"click",},{content:"Activity is reloaded in the widget",trigger:"div.activity-container > i.fa.fa-lg.fa-clock-o",},],});return __exports;});;

/* /account_accountant/static/tests/tours/test_tour_journal_items_export.js */
odoo.define('@account_accountant/../tests/tours/test_tour_journal_items_export',['@web/core/registry','@web_tour/tour_utils','@account/js/tours/account'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");const{accountTourSteps}=require("@account/js/tours/account");registry.category("web_tour.tours").add("account_accountant_journal_items_export",{url:"/web",steps:()=>[stepUtils.showAppsMenuItem(),...accountTourSteps.goToAccountMenu("Open the accounting module"),{content:"Open journal items list view",trigger:'button[data-menu-xmlid="account.menu_finance_entries"]',run:"click",},{content:"Open journal items list view",trigger:'a[data-menu-xmlid="account.menu_action_account_moves_all"]',run:"click",},{content:"Select all items",trigger:'thead tr th.o_list_record_selector',run:"click",},{content:"Open export dialog",trigger:'i.fa-cog',run:"click",},{content:"Open export dialog",trigger:'i.fa-upload',run:"click",},{content:"Click on the cancel button",trigger:'button.o_form_button_cancel',run:"click",},...stepUtils.toggleHomeMenu(),...accountTourSteps.goToAccountMenu("Reset back to accounting module"),{content:"check that we're back on the dashboard",trigger:'a:contains("Sales")',},],});return __exports;});;

/* /account_reports/static/tests/tours/account_reports.js */
odoo.define('@account_reports/../tests/tours/account_reports',['@account_reports/../tests/tours/asserts','@web/core/registry'],function(require){'use strict';let __exports={};const{Asserts}=require("@account_reports/../tests/tours/asserts");const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("account_reports",{url:"/odoo/action-account_reports.action_account_report_bs",steps:()=>[{content:"Initial foldable",trigger:"table",run:async()=>{Asserts.DOMContainsNumber("tbody > tr:not(.d-none):not(.empty)",25);Asserts.isEqual(document.querySelector("tr:nth-child(4) td:nth-child(2)").textContent,"75.00");},},{content:"Click to unfold line",trigger:"tr:nth-child(4) td:first()",run:"click",},{content:"Line is unfolded",trigger:"tr:nth-child(5) .name:contains('101401')",run:()=>{Asserts.DOMContainsNumber("tbody > tr:not(.d-none):not(.empty)",27);Asserts.isEqual(document.querySelector("tr:nth-child(4) td:nth-child(2)").textContent,"");},},{content:"Click to fold line",trigger:"tr:nth-child(4) td:first()",run:"click",},{content:"Line is folded",trigger:"tr:nth-child(4) td:nth-child(2):text(75.00)",run:()=>{Asserts.DOMContainsNumber("tbody > tr:not(.d-none):not(.empty)",25);},},{content:"Unfold first line",trigger:"tr:nth-child(4) td:first()",run:"click",},{content:"Unfold second line",trigger:"tr:nth-child(7) td:first()",run:"click",},{content:"Unfold third line",trigger:"tr:nth-child(10) td:first()",run:"click",},{content:"Extra Trigger step",trigger:"tr:nth-child(12):not(.d-none) .name:contains('101404')",},{content:"Initial sortable",trigger:"tr:nth-child(11) td:nth-child(2):text(100.00)",run:()=>{Asserts.isEqual(document.querySelector("tr:nth-child(5) td:nth-child(2)").textContent,"75.00");Asserts.isEqual(document.querySelector("tr:nth-child(6) td:nth-child(2)").textContent,"75.00");Asserts.isEqual(document.querySelector("tr:nth-child(8) td:nth-child(2)").textContent,"25.00");Asserts.isEqual(document.querySelector("tr:nth-child(9) td:nth-child(2)").textContent,"25.00");Asserts.isEqual(document.querySelector("tr:nth-child(11) td:nth-child(2)").textContent,"100.00");Asserts.isEqual(document.querySelector("tr:nth-child(12) td:nth-child(2)").textContent,"50.00");Asserts.isEqual(document.querySelector("tr:nth-child(13) td:nth-child(2)").textContent,"150.00");},},{content:"Click sort",trigger:"th .btn_sortable",run:"click",},{trigger:"tr:nth-child(11) td:nth-child(2):contains('50.00')",},{content:"Unfold not previously unfolded line",trigger:"tr:nth-child(22):contains('Current Liabilities') td:first()",run:"click",},{content:"Line is unfolded",trigger:"tr:nth-child(23) .name:contains('251000')",run:"click",},{content:"Sortable (asc)",trigger:"tr:nth-child(11) td:nth-child(2):contains('50.00')",run:()=>{Asserts.isEqual(document.querySelector("tr:nth-child(5) td:nth-child(2)").textContent,"75.00");Asserts.isEqual(document.querySelector("tr:nth-child(6) td:nth-child(2)").textContent,"75.00");Asserts.isEqual(document.querySelector("tr:nth-child(8) td:nth-child(2)").textContent,"25.00");Asserts.isEqual(document.querySelector("tr:nth-child(9) td:nth-child(2)").textContent,"25.00");Asserts.isEqual(document.querySelector("tr:nth-child(11) td:nth-child(2)").textContent,"50.00");Asserts.isEqual(document.querySelector("tr:nth-child(12) td:nth-child(2)").textContent,"100.00");Asserts.isEqual(document.querySelector("tr:nth-child(13) td:nth-child(2)").textContent,"150.00");},},{content:"Click sort",trigger:"th .btn_sortable",run:"click",},{content:"Sortable (desc)",trigger:"tr:nth-child(11) td:nth-child(2):contains('100.00')",run:()=>{Asserts.isEqual(document.querySelector("tr:nth-child(5) td:nth-child(2)").textContent,"75.00");Asserts.isEqual(document.querySelector("tr:nth-child(6) td:nth-child(2)").textContent,"75.00");Asserts.isEqual(document.querySelector("tr:nth-child(8) td:nth-child(2)").textContent,"25.00");Asserts.isEqual(document.querySelector("tr:nth-child(9) td:nth-child(2)").textContent,"25.00");Asserts.isEqual(document.querySelector("tr:nth-child(11) td:nth-child(2)").textContent,"100.00");Asserts.isEqual(document.querySelector("tr:nth-child(12) td:nth-child(2)").textContent,"50.00");Asserts.isEqual(document.querySelector("tr:nth-child(13) td:nth-child(2)").textContent,"150.00");},},{content:"Click sort",trigger:"th .btn_sortable",run:"click",},{content:"Sortable (reset)",trigger:"tr:nth-child(5) td:nth-child(2):contains('75.00')",run:()=>{Asserts.isEqual(document.querySelector("tr:nth-child(5) td:nth-child(2)").textContent,"75.00");Asserts.isEqual(document.querySelector("tr:nth-child(6) td:nth-child(2)").textContent,"75.00");Asserts.isEqual(document.querySelector("tr:nth-child(8) td:nth-child(2)").textContent,"25.00");Asserts.isEqual(document.querySelector("tr:nth-child(9) td:nth-child(2)").textContent,"25.00");Asserts.isEqual(document.querySelector("tr:nth-child(11) td:nth-child(2)").textContent,"100.00");Asserts.isEqual(document.querySelector("tr:nth-child(12) td:nth-child(2)").textContent,"50.00");Asserts.isEqual(document.querySelector("tr:nth-child(13) td:nth-child(2)").textContent,"150.00");},},],});return __exports;});;

/* /account_reports/static/tests/tours/account_reports_amount_rounding.js */
odoo.define('@account_reports/../tests/tours/account_reports_amount_rounding',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add('account_reports_rounding_unit',{url:'/odoo/action-account_reports.action_account_report_bs',steps:()=>[{content:'Test the value of `Receivables` line in decimals',trigger:'.line_name:contains("Receivables") + .line_cell:contains("1,150,000.00")',run:"click",},{content:"Open amounts rounding dropdown",trigger:"#filter_rounding_unit button",run:'click',},{content:"Select the units filter",trigger:".dropdown-item:contains('In $')",run:'click',},{trigger:'.line_name:contains("Receivables") + .line_cell:not(:contains("1,150,000.00"))',},{content:'test the value of `Receivables` line in units',trigger:'.line_name:contains("Receivables") + .line_cell:contains("1,150,000")',run:"click",},{content:"Open amounts rounding dropdown",trigger:"#filter_rounding_unit button",run:'click',},{content:"Select the thousands filter",trigger:".dropdown-item:contains('In K$')",run:'click',},{trigger:'.line_name:contains("Receivables") + .line_cell:not(:contains("1,150,000"))',},{content:'test the value of `Receivables` line in thousands',trigger:'.line_name:contains("Receivables") + .line_cell:contains("1,150")',run:"click",},{content:"Open amounts rounding dropdown",trigger:"#filter_rounding_unit button",run:'click',},{content:"Select the millions filter",trigger:".dropdown-item:contains('In M$')",run:'click',},{trigger:'.line_name:contains("Receivables") + .line_cell:not(:contains("1,150"))',},{content:'test the value of `Receivables` line in millions',trigger:'.line_name:contains("Receivables") + .line_cell:contains("1")',run:"click",},{content:"Open amounts rounding dropdown",trigger:"#filter_rounding_unit button",run:'click',},{content:"Select the decimals filter",trigger:".dropdown-item:contains('In .$')",run:'click',},{content:'test the value of `Receivables` line in millions',trigger:'.line_name:contains("Receivables") + .line_cell:contains("1,150,000.00")',run:()=>null,},]});return __exports;});;

/* /account_reports/static/tests/tours/account_reports_analytic_filters.js */
odoo.define('@account_reports/../tests/tours/account_reports_analytic_filters',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("account_reports_analytic_filters",{url:"/odoo/action-account_reports.action_account_report_general_ledger",steps:()=>[{content:"click analytic filters",trigger:".filter_analytic button",run:"click",},{content:"insert text in the searchbar",trigger:".o_multi_record_selector input",run:"edit Time",},{content:"click on the item",trigger:'.o-autocomplete--dropdown-item:contains("Time Off")',run:"click",},{content:"Check the label of the badge",trigger:'.dropdown-menu .o_tag_badge_text:contains("Time Off")',},],});return __exports;});;

/* /account_reports/static/tests/tours/account_reports_annotations.js */
odoo.define('@account_reports/../tests/tours/account_reports_annotations',['@account_reports/../tests/tours/asserts','@web/core/registry'],function(require){'use strict';let __exports={};const{Asserts}=require("@account_reports/../tests/tours/asserts");const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("account_reports_annotations",{url:"/odoo/action-account_reports.action_account_report_bs",steps:()=>[{content:"Initial annotations",trigger:".o_content",run:()=>{Asserts.DOMContainsNone(".annotations");},},{content:"Unfold first line",trigger:"tr:nth-child(4) td:first()",run:"click",},{content:"Unfold second line",trigger:"tr:nth-child(7) td:first()",run:"click",},{content:"Unfold third line",trigger:"tr:nth-child(10) td:first()",run:"click",},{content:"Extra Trigger step",trigger:"tr:nth-child(5) .o_account_report_chatter_annoted",},{content:"Extra Trigger step",trigger:"tr:nth-child(12) .o_account_report_chatter_annoted",},{content:"Check there are two lines annotated initially",trigger:".o_content",run:()=>{const annotations=document.querySelectorAll(".btn_annotation.o_account_report_chatter_annoted");Asserts.isEqual(annotations.length,2);},},{content:"Click to show caret option",trigger:"tr:nth-child(8) .btn_annotation:not(:visible)",run:"click",},{content:"Add a log note",trigger:".o-mail-Chatter-logNote",run:"click",},{content:"Add text to annotate",trigger:".o-mail-Composer-inputContainer textarea",run:"edit Annotation 121000",},{content:"Submit by logging the note",trigger:".o-mail-Composer-send",run:"click",},{content:"Close Chatter",trigger:".o_control_panel .btn-secondary[data-tooltip='Chatter']",run:"click",},{content:"Wait for annotation created",trigger:"tr:nth-child(8) .o_account_report_chatter_annoted",},{content:"Check there are now three lines annotated",trigger:".o_content",run:()=>{const annotations=document.querySelectorAll(".btn_annotation.o_account_report_chatter_annoted");Asserts.isEqual(annotations.length,3);},},{content:"Open second annotated line annotation popover",trigger:"tr:nth-child(8) .btn_annotation",run:"click",},{content:"Select the edit button",trigger:".o-mail-Message:last-child .btn[name='edit']:not(:visible)",run:"click",},{content:"Annotate contains previous text value",trigger:".o-mail-Message:last-child .o-mail-Composer-inputContainer textarea",run:()=>{Asserts.isEqual(document.querySelector("textarea").value,"Annotation 121000");},},{content:"Add text to annotate",trigger:".o-mail-Message:last-child .o-mail-Composer-inputContainer textarea",run:"edit Annotation 121000 edited",},{content:"Annotation is edited",trigger:".o-mail-Message:last-child .o-mail-Composer-inputContainer textarea",run:()=>{Asserts.isEqual(document.querySelector(".o-mail-Message:last-child .o-mail-Composer-inputContainer textarea").value,"Annotation 121000 edited");},},{content:"Save the annotation",trigger:".o-mail-Message:last-child .btn[data-type='save']",run:"click",},{content:"Close Chatter",trigger:".o_control_panel .btn-secondary[data-tooltip='Chatter']",run:"click",},{content:"Open Third annotated line annotation popover",trigger:"tr:nth-child(12) .btn_annotation",run:"click",},{content:"Wait for the messages to load",trigger:".o-mail-Message",},{content:"Expand the options of the message",trigger:".o-mail-Message:last-child button:has(i.oi-ellipsis-v):not(:visible)",run:"click",},{content:"Click on trash can",trigger:".o_popover .o-dropdown-item:has(i.fa-trash)",run:"click",},{content:"Wait for the modal to appear",trigger:".modal",},{content:"Confirm deletion of the annotation",trigger:".modal-footer .btn-primary",run:"click",},{content:"Close Chatter",trigger:".o_control_panel .btn-secondary[data-tooltip='Chatter']",run:"click",},{content:"Check there are now only two lines annotated",trigger:"tr:nth-child(12):not(:has(.fa-commenting))",run:()=>{const annotations=document.querySelectorAll(".btn_annotation.o_account_report_chatter_annoted");Asserts.isEqual(annotations.length,2);},},],});return __exports;});;

/* /account_reports/static/tests/tours/account_reports_audit.js */
odoo.define('@account_reports/../tests/tours/account_reports_audit',['@account_reports/../tests/tours/asserts','@web/core/registry'],function(require){'use strict';let __exports={};const{Asserts}=require("@account_reports/../tests/tours/asserts");const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("account_reports_audit",{url:"/odoo/action-account_reports.action_view_account_audit",steps:()=>[{trigger:"button.o-kanban-button-new",content:"Create a new Audit",run:"click",},{isActive:["auto"],trigger:".modal",content:"Wait for the modal to open",},{trigger:"div[name='return_type_id'] .o_selection_badge:contains('Audit')",content:"Select the Return Type",run:"click",},{trigger:".modal-footer button.btn-primary",content:"Generate the Audit",run:"click",},{trigger:"a[data-tooltip='Back to \"Audit\"']",content:"Back to the Audit Kanban",run:"click",},{trigger:".o_account_return_audit_kanban_view .o_kanban_record:nth-child(1)",content:"Open the working file",run:"click",},{trigger:".o_embedded_actions button:contains('Balances')",content:"Switch to the 'Balances' tab",run:"click",},{trigger:".o_data_row .o_data_cell",content:"Open the chatter for the first row",run:"click",},{content:"Add a log note",trigger:".o-mail-Chatter-logNote",run:"click",},{content:"Add text to annotate",trigger:".o-mail-Composer-inputContainer textarea",run:"edit Annotation from the audit",},{content:"Submit by logging the note",trigger:".o-mail-Composer-send",run:"click",},{content:"Annotation is posted",trigger:".o-mail-Message:last-child .o-mail-Message-textContent",run:async()=>{const message=document.querySelector(".o-mail-Message:last-child .o-mail-Message-textContent").innerText;Asserts.isEqual(message,"Annotation from the audit");const annotation=document.querySelector(".o_account_reports_annotation");Asserts.isEqual(annotation.innerText.split("Annotated for").length,2);},},{content:"Close Chatter",trigger:".o_control_panel .btn-secondary[data-tooltip='Chatter']",run:"click",},{content:"Check that the chatter is closed",trigger:".o_account_report_chatter:not(:visible)",},],});return __exports;});;

/* /account_reports/static/tests/tours/account_reports_hide_0_lines.js */
odoo.define('@account_reports/../tests/tours/account_reports_hide_0_lines',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add('account_reports_hide_0_lines',{url:'/odoo/action-account_reports.action_account_report_bs',steps:()=>[{content:'test if the Bank and Cash line is present (but the value is 0)',trigger:'.line_name:contains("Bank and Cash Accounts")',run:"click",},{content:'test if the Current Year Unallocated Earnings line is present (but the value is 0)',trigger:'.line_name:contains("Current Year Unallocated Earnings")',run:"click",},{content:'test if the Earnings line is present (but value is different from 0 and so should be there after the hide_0_lines',trigger:'.line_name:contains("Earnings")',run:"click",},{content:"Open options selector",trigger:"#filter_extra_options button",run:'click',},{content:"Select the hide line at 0 option",trigger:".dropdown-item:contains('Hide lines at 0')",run:'click',},{content:'test if the Earnings line is still present',trigger:'.line_name:contains("Earnings")',run:"click",},{content:'test if the Bank and Cash line is not present',trigger:'.line_name:not(:contains("Bank and Cash Accounts"))',run:"click",},{content:'test if the Current Year Unallocated Earnings line is not present',trigger:'.line_name:not(:contains("Current Year Unallocated Earnings"))',run:"click",},{content:"Click again to open the options selector",trigger:"#filter_extra_options button",run:'click',},{content:"Select the hide lines at 0 option again",trigger:".dropdown-item:contains('Hide lines at 0')",run:'click',},{content:'test again if the Bank and Cash line is present (but the value is 0)',trigger:'.line_name:contains("Bank and Cash Accounts")',run:()=>null,},]});registry.category("web_tour.tours").add('account_reports_hide_0_lines_with_string_columns',{url:'/odoo/action-account_reports.action_account_report_general_ledger',steps:()=>[{content:"Check if the 211000 Account Payable line is present (but the value is 0)",trigger:".name:contains('211000 Account Payable')",run:"click",},{content:"Check if the MISC item line is present with string values set up, but all amounts are at 0",trigger:".name:contains('Coucou les biloutes')",},{content:"Open options selector",trigger:"#filter_extra_options button",run:'click',},{content:"Select the hide line at 0 option",trigger:".dropdown-item:contains('Hide lines at 0')",run:'click',},{content:"Check if the MISC item line is hidden",trigger:"body:not(:has(.name:contains('Coucou les biloutes')))",},{content:"Click again to open the options selector",trigger:"#filter_extra_options button",run:'click',},{content:"Select the hide lines at 0 option again",trigger:".dropdown-item:contains('Hide lines at 0')",run:'click',},{content:"Check again if the MISC item line is present (but the value is 0)",trigger:".name:contains('Coucou les biloutes')",},]});registry.category("web_tour.tours").add('account_reports_hide_0_lines_load_more',{url:'/odoo/action-account_reports.action_account_report_general_ledger',steps:()=>[{content:"Check if the 211000 Account Payable line is present (but the value is 0)",trigger:".name:contains('211000 Account Payable')",run:"click",},{content:"Check if the MISC item line is present with string values set up, but all amounts are at 0",trigger:".name:contains('Coucou les biloutes 0')",},{content:"Check if the Load more line is present",trigger:".clickable:contains('Load more')",},{content:"Open options selector",trigger:"#filter_extra_options button",run:'click',},{content:"Select the hide line at 0 option",trigger:".dropdown-item:contains('Hide lines at 0')",run:'click',},{content:"Check if the Load more line is still present",trigger:".clickable:contains('Load more')",},{content:"Click again to open the options selector",trigger:"#filter_extra_options button",run:'click',},{content:"Select the hide lines at 0 option again",trigger:".dropdown-item:contains('Hide lines at 0')",run:'click',},{content:"Check if the first MISC item line is present with string values set up, but all amounts are at 0",trigger:".name:contains('Coucou les biloutes 0')",},{content:"Check if the Load more line is present",trigger:".clickable:contains('Load more')",run:'click',},{content:"Check if the second MISC item line is present with string values set up, but all amounts are at 0",trigger:".name:contains('Coucou les biloutes 1')",},]});return __exports;});;

/* /account_reports/static/tests/tours/account_reports_search.js */
odoo.define('@account_reports/../tests/tours/account_reports_search',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add('account_reports_search',{url:'/odoo/action-account_reports.action_account_report_general_ledger',steps:()=>[{content:"click search",trigger:'.o_searchview_input',run:'click',},{content:'insert text in the searchbar',trigger:'.o_searchview_input',run:"edit 40",},{content:'test if the product sale line is present',trigger:'.line_name:contains("400000 Product Sales")',run:"click",},{content:"click search",trigger:'.o_searchview_input',run:'click',},{content:'insert text in the search bar',trigger:'.o_searchview_input',run:"edit Account",},{content:'test if the receivable line is present',trigger:'.line_name:contains("121000 Account Receivable")',run:'click',},{content:'check that the product sale line is not present',trigger:'.line_name:not(:contains("400000 Product Sales"))',},]});return __exports;});;

/* /account_reports/static/tests/tours/account_reports_sections.js */
odoo.define('@account_reports/../tests/tours/account_reports_sections',['@account_reports/../tests/tours/asserts','@web/core/registry'],function(require){'use strict';let __exports={};const{Asserts}=require("@account_reports/../tests/tours/asserts");const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add('account_reports_sections',{url:"/odoo/action-account_reports.action_account_report_gt",steps:()=>[{content:"Open variant selector",trigger:"#filter_variant button",run:'click',},{content:"Select the test variant using sections",trigger:".dropdown-item:contains('Test Sections')",run:'click',},{content:"Check the lines of section 1 are displayed",trigger:".line_name:contains('Section 1 line')",},{content:"Check the columns of section 1 are displayed",trigger:"#table_header th:contains('Column 1')",},{content:"Check the export buttons belong to the composite report",trigger:".btn:contains('composite_report_custom_button')",},{content:"Check the filters displayed belong to section 1 (journals filter is not enabled on section 2, nor the composite report)",trigger:"#filter_journal",},{content:"Open date switcher",trigger:"#filter_date button",run:'click',},{content:"Select 'month' date filter",trigger:".dropdown-menu .dropdown-item[data-period-type='month']",run:'click',},{content:"Click on the current period to edit it manually",trigger:".dropdown-menu .dropdown-item[data-period-type='month'] .input_current_date",run:'click',},{content:"Make sure December 2025 is opened, whatever the return type linked to the report",trigger:".dropdown-menu .dropdown-item[data-period-type='month'] .input_current_date",run:'edit 12/2025',},{content:"Click outside of the input to validate the choice",trigger:".dropdown-menu .dropdown-item[data-period-type='month']",run:'click',},{content:"Wait for the date to be refreshed",trigger:`#filter_date button:contains('Dec 2025')`,},{content:"Switch to section 2",trigger:"#section_selector .btn:contains('Section 2')",run:'click',},{content:"Check the lines of section 2 are displayed",trigger:".line_name:contains('Section 2 line')",},{content:"Check the columns of section 2 are displayed",trigger:"#table_header th:contains('Column 2')",},{content:"Check the export buttons belong to the composite report",trigger:".btn:contains('composite_report_custom_button')",},{content:"Check the filters displayed belong to section 2 (comparison filter is not enabled on section 1, nor the composite report)",trigger:"#filter_comparison",},{content:"Open date switcher",trigger:"#filter_date button",run:'click',},{content:"Select another date in the future",trigger:".dropdown-menu .dropdown-item[data-period-type='year'] .btn_next_date",run:'click'},{content:"Apply filter by closing the dropdown for the future date",trigger:"#filter_date .btn:first()",run:"click",},{content:"Check that the date has changed",trigger:`#filter_date button:not(:contains('2025'))`,run:(actionHelper)=>{Asserts.isTrue(actionHelper.anchor.innerText.includes('2027'));},},{content:"Open date switcher",trigger:"#filter_date button",run:'click',},{content:"Select another date first time",trigger:".dropdown-menu .dropdown-item[data-period-type='year'] .btn_previous_date",run:'click'},{trigger:`.dropdown-menu .dropdown-item[data-period-type='year'] input[data-value*='2026']`,},{content:"Select another date second time",trigger:".dropdown-menu .dropdown-item[data-period-type='year'] .btn_previous_date",run:'click'},{trigger:`.dropdown-menu .dropdown-item[data-period-type='year'] input[data-value*='2025']`,},{content:"Apply filter by closing the dropdown",trigger:"#filter_date .btn:first()",run:"click",},{content:"Check that the date has changed",trigger:`#filter_date button:contains('2025')`,},{content:"Switch back to section 1",trigger:"#section_selector .btn:contains('Section 1')",run:'click',},]});return __exports;});;

/* /account_reports/static/tests/tours/account_reports_widgets.js */
odoo.define('@account_reports/../tests/tours/account_reports_widgets',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("account_reports_widgets",{url:"/odoo/action-account_reports.action_account_report_pl",steps:()=>[{content:"change date filter",trigger:"#filter_date button",run:"click",},{content:"Select another date in the future",trigger:".dropdown-menu .dropdown-item:nth-child(3) .btn_next_date",run:'click'},{content:"Apply filter by closing the dropdown",trigger:"#filter_date .btn:first()",run:"click",},{content:"wait refresh",trigger:`#filter_date button:not(:contains(${ new Date().getFullYear() }))`,},{content:"change date filter for the second time",trigger:"#filter_date button",run:"click",},{content:"Select another date in the past first time",trigger:".dropdown-menu .dropdown-item:nth-child(3) .btn_previous_date",run:'click'},{trigger:`.dropdown-menu .dropdown-item:nth-child(3) input[data-value*='${new Date().getFullYear()}']`,},{content:"Select another date in the past second time",trigger:".dropdown-menu .dropdown-item:nth-child(3) .btn_previous_date",run:'click'},{trigger:`.dropdown-menu .dropdown-item:nth-child(3) input[data-value*='${
                new Date().getFullYear() - 1
            }']`,},{content:"Apply filter by closing the dropdown",trigger:"#filter_date .btn:first()",run:"click",},{content:"wait refresh",trigger:`#filter_date button:contains(${ new Date().getFullYear() - 1 })`,},{content:"change comparison filter",trigger:"#filter_comparison .btn:first()",run:"click",},{content:"change comparison filter",trigger:".dropdown-item.period:first()",run:"click",},{content:"Apply filter by closing the dropdown",trigger:"#filter_comparison .btn:first()",run:"click",},{content:"wait refresh, report should have 4 columns",trigger:"th + th + th + th",},{content:"export xlsx",trigger:"button:contains('XLSX')",run:"click",},],});return __exports;});;

/* /account_reports/static/tests/tours/asserts.js */
odoo.define('@account_reports/../tests/tours/asserts',[],function(require){'use strict';let __exports={};const Asserts=__exports.Asserts=class Asserts{static getCount(target,selector){return document.querySelector(target).querySelectorAll(selector).length;}
static getDOMCount(selector){return document.querySelectorAll(selector).length;}
static check(condition,success,error){condition?Asserts.success(success):Asserts.error(error);}
static success(message){return console.info(`SUCCESS: ${message}`);}
static error(message){throw new Error(`FAIL: ${message}`);}
static isTrue(actual){Asserts.check(actual,`${actual} is true`,`${actual} is not true`);}
static isFalse(actual){Asserts.check(!actual,`${actual} is false`,`${actual} is not false`);}
static isEqual(actual,expected){Asserts.check((actual==expected),`${actual} is equal to expected ${expected}`,`${actual} is not equal to expected ${expected}`);}
static isStrictEqual(actual,expected){Asserts.check((actual===expected),`${actual} is strictly equal to expected ${expected}`,`${actual} is not strictly equal to expected ${expected}`);}
static contains(target,selector){const count=Asserts.getCount(target,selector);Asserts.check((count>0),`There is at least one ${selector} in ${target}`,`There should be at least one ${selector} in ${target} but there is ${count}`);}
static containsNone(target,selector){const count=Asserts.getCount(target,selector);Asserts.check((count===0),`There is no ${selector} in ${target}`,`There should be no ${selector} in ${target} but there is ${count}`);}
static containsNumber(target,selector,number){const count=Asserts.getCount(target,selector);Asserts.check((count===number),`There is the correct number (${number}) of ${selector} in ${target}`,`There should be at ${number} ${selector} in ${target} but there is ${count}`);}
static DOMContains(selector){const count=Asserts.getDOMCount(selector);Asserts.check((count>0),`There is at least one ${selector} in the DOM`,`There should be at least one ${selector} in the DOM but there is ${count}`);}
static DOMContainsNone(selector){const count=Asserts.getDOMCount(selector);Asserts.check((count===0),`There is no ${selector} in the DOM`,`There should be 0 ${selector} in the DOM but there is ${count}`);}
static DOMContainsNumber(selector,number){const count=Asserts.getDOMCount(selector);Asserts.check((Asserts.getDOMCount(selector)===number),`There is the correct number (${number}) of ${selector} in the DOM`,`There should be ${number} ${selector} in the DOM but there is ${count}`);}
static hasClass(selector,classname){Asserts.check(document.querySelector(selector).classList.contains(classname),`${selector} has class ${classname}`,`${selector} should have class ${classname} but hasn't`);}}
return __exports;});;

/* /account_reports/static/tests/tours/test_tour_bank_rec_ui.js */
odoo.define('@account_reports/../tests/tours/test_tour_bank_rec_ui',['@web/core/utils/patch','@account/js/tours/account'],function(require){'use strict';let __exports={};const{patch}=require("@web/core/utils/patch");const{accountTourSteps}=require("@account/js/tours/account");patch(accountTourSteps,{bankRecUiReportSteps(){return[{trigger:".o_bank_rec_selected_st_line:contains('line1')",},{content:"balance is 2100",trigger:".btn-link:contains('$ 2,100.00')",run:"click",},{trigger:"span:contains('General Ledger')",},{content:"Breadcrumb back to Bank Reconciliation from the report",trigger:".breadcrumb-item a:contains('Bank Reconciliation')",run:"click",},];},});return __exports;});;

/* /accountant/static/tests/tours/account_merge_wizard_tour.js */
odoo.define('@accountant/../tests/tours/account_merge_wizard_tour',['@account/js/tours/account','@web/core/registry'],function(require){'use strict';let __exports={};const{accountTourSteps}=require("@account/js/tours/account");const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("account_merge_wizard_tour",{url:"/odoo",steps:()=>[...accountTourSteps.goToAccountMenu("Go to Accounting"),{content:"Go to Configuration",trigger:'span:contains("Configuration")',run:"click",},{content:"Go to Chart of Accounts",trigger:'a:contains("Chart of Accounts")',run:"click",},{trigger:'.o_breadcrumb .text-truncate:contains("Chart of Accounts")',},{content:"Select accounts",trigger:"thead .o_list_record_selector",run:"click",},{content:"Check that exactly 4 accounts are present and selected",trigger:".o_selection_box:contains(4):contains(selected)",},{content:"Open Actions menu",trigger:".o_cp_action_menus .dropdown-toggle",run:"click",},{content:"Open Merge accounts wizard",trigger:'span:contains("Merge accounts")',run:"click",},{content:"Group by name",trigger:'div[name="is_group_by_name"] input',run:"click",},{content:"Wait for content to be updated",trigger:'td:contains("Current Assets (Current Assets)")',},{content:"Merge accounts",trigger:'button:not([disabled]) span:contains("Merge")',run:"click",},{content:"Check that there are now exactly 2 accounts",trigger:".o_pager_limit:contains(2)",},],});return __exports;});;

/* /accountant/static/tests/tours/account_tours.js */
odoo.define('@accountant/../tests/tours/account_tours',['@web/core/utils/patch','@account/js/tours/account','@web_tour/tour_utils','@web/core/l10n/translation'],function(require){'use strict';let __exports={};const{patch}=require("@web/core/utils/patch");const{accountTourSteps}=require("@account/js/tours/account");const{stepUtils}=require("@web_tour/tour_utils");const{appTranslateFn}=require("@web/core/l10n/translation");const _t=(str,...args)=>appTranslateFn(str,"accountant",...args);patch(accountTourSteps,{goToAccountMenu(description="Open Accounting Menu"){return stepUtils.goToAppSteps('accountant.menu_accounting',description);},onboarding(){return[{trigger:".o_widget_account_onboarding .fa-circle",},{trigger:"a[data-method=action_open_step_fiscal_year]",content:_t("Set Periods"),run:"click",},{trigger:"input[data-field=opening_date]",run:"edit 2025-01-01",},{trigger:"button[name=action_save_onboarding_fiscal_year]",content:_t("Save Fiscal Year end"),run:"click",},];},newInvoice(){return[{trigger:".o_widget_account_onboarding .fa-check-circle",},{trigger:"button[name=action_create_new]",content:_t("Now, we'll create your first invoice (accountant)"),run:"click",},];},});return __exports;});;

/* /project/static/tests/tours/personal_stage_tour.js */
odoo.define('@project/../tests/tours/personal_stage_tour',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add('personal_stage_tour',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="project.menu_main_pm"]',run:"click",},{content:"Open Pig Project",trigger:'.o_kanban_record:contains("Pig")',run:"click",},{content:"Check that there is no create column",trigger:"body:not(.o_column_quick_create)",},{content:"Check that there is no create column",trigger:"body:not(.o_group_edit)",},{content:"Check that there is no create column",trigger:"body:not(.o_group_delete)",},{content:"Go to tasks",trigger:'button[data-menu-xmlid="project.menu_project_management"]',run:"click",},{content:"Go to my tasks",trigger:'a[data-menu-xmlid="project.menu_project_management_my_tasks"]',run:"click",},{content:"Check that we can create a new stage",trigger:'.o_column_quick_create.o_quick_create_folded div',run:"click",},{content:"Create a new personal stage",trigger:'input.form-control',run:"edit Never",},{content:"Confirm create",trigger:'.o_kanban_add',run:"click",},{content:"Check that column exists && Open column edit dropdown",trigger:".o_kanban_header:contains(Never)",run:"hover && click .o_kanban_header:contains(Never) .dropdown-toggle",},{content:"Try editing inbox",trigger:".dropdown-item.o_group_edit",run:"click",},{content:"Change title",trigger:'div.o_field_char[name="name"] input',run:"edit ((Todo))",},{content:"Save changes",trigger:'.btn-primary:contains("Save")',run:"click",},{content:"Check that column was updated",trigger:'.o_kanban_header:contains("Todo")',run:"click",},{content:"Create a personal task from the quick create form",trigger:'.o-kanban-button-new',run:"click",},{content:"Create a new personal task",trigger:'input.o_input:not(.o_searchview_input)',run:"edit New Test Task",},{content:"Confirm create",trigger:'.o_kanban_add',run:"click",},{content:"Check that task exists",trigger:'.o_kanban_record:contains("New Test Task")',}]});return __exports;});;

/* /project/static/tests/tours/project_burndown_chart_tour.js */
odoo.define('@project/../tests/tours/project_burndown_chart_tour',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add('burndown_chart_tour',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="project.menu_main_pm"]',run:"click",},{content:'Open "Burndown Chart Test" project menu',trigger:".o_kanban_record:contains(Burndown Chart Test)",run:`hover && click .o_kanban_record:contains(Burndown Chart Test) .o_dropdown_kanban .dropdown-toggle`,},{content:`Open "Burndown Chart Test" project's "Burndown Chart" view`,trigger:'.o_kanban_manage_reporting div[role="menuitem"] a:contains("Burndown Chart")',run:"click",},{trigger:".o_graph_renderer",},{content:'The sort buttons are not rendered',trigger:'.o_graph_renderer:not(:has(.btn-group[role=toolbar][aria-label="Sort graph"]))',run:"click",},{content:'Remove the project search "Burndown Chart Test"',trigger:".o_searchview_facet:contains(Burndown Chart Test)",run:"hover && click .o_facet_remove",},{content:'Search Burndown Chart',trigger:'input.o_searchview_input',run:`edit Burndown`,},{content:'Validate search',trigger:'.o_searchview_autocomplete .o-dropdown-item:contains("Project")',run:"click",},{content:'Remove the group by "Date: Month > Stage"',trigger:'.o_searchview_facet:contains("Stage") .o_facet_remove',run:"click",},{content:'A "The Burndown Chart must be grouped by Date and Stage" notification is shown when trying to remove the group by "Date: Month > Stage"',trigger:'.o_notification_manager .o_notification:contains("The report should be grouped either by ") button.o_notification_close',run:"click",},{content:'Open the search panel menu',trigger:'.o_control_panel .o_searchview_dropdown_toggler',run:"click",},{content:'The Stage group menu item is visible',trigger:'.o_group_by_menu .o_menu_item:contains("Stage")',run:"click",},{content:'Open the Date group by sub menu',trigger:'.o_group_by_menu button.o_menu_item:contains("Date")',run:"click",},{content:'Click on the selected Date sub menu',trigger:'.o_group_by_menu button.o_menu_item:contains("Date") + * .dropdown-item.selected',run:"click",},{content:'A "The Burndown Chart must be grouped by Date" notification is shown when trying to remove the group by "Date: Month > Stage"',trigger:'.o_notification_manager .o_notification:contains("The Burndown Chart must be grouped by Date") button.o_notification_close',run:"click",},{content:'Open the search panel menu',trigger:'.o_control_panel .o_searchview_dropdown_toggler',run:"click",},{content:'Open the Date filter sub menu',trigger:'.o_filter_menu button.o_menu_item:contains("Date")',run:"click",},{content:'Click on the first Date filter sub menu',trigger:'.o_filter_menu .o_menu_item:contains("Date") + * .dropdown-item:first-child',run:"click",},{content:'Close the Date filter menu',trigger:'.o_graph_renderer',run:"click",},{content:'Open the search panel menu',trigger:'.o_control_panel .o_searchview_dropdown_toggler',run:"click",}]});return __exports;});;

/* /project/static/tests/tours/project_sharing_tour.js */
odoo.define('@project/../tests/tours/project_sharing_tour',['@web/core/utils/concurrency','@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{delay}=require("@web/core/utils/concurrency");const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");const projectSharingSteps=[...stepUtils.goToAppSteps("project.menu_main_pm",'Go to the Project App.'),{trigger:".o_kanban_record:contains(Project Sharing)",content:'Open the project dropdown.',run:"hover && click .o_kanban_record:contains(Project Sharing) .o_dropdown_kanban .dropdown-toggle",},{trigger:'.dropdown-menu a:contains("Share")',content:'Start editing the project.',run:"click",},{trigger:'.modal div[name="collaborator_ids"] .o_field_x2many_list_row_add > a',content:'Add a collaborator to the project.',run:"click",},{trigger:'.modal div[name="collaborator_ids"] div[name="partner_id"] input',content:'Select the user portal as collaborator to the "Project Sharing" project.',run:"edit Georges",},{trigger:'.ui-autocomplete a.dropdown-item:contains("Georges")',run:"click",},{trigger:'.modal div[name="collaborator_ids"] div[name="access_mode"] input',content:'Open Access mode selection dropdown.',run:'click',},{trigger:'.o_select_menu_item:contains(Edit)',run:'click',},{trigger:'.modal footer > button[name="action_share_record"]',content:'Confirm the project sharing with this portal user.',run:"click",},{trigger:"body:not(:has(.modal))",},{trigger:'.o_web_client',content:'Go to project portal view to select the "Project Sharing" project',run:function(){window.location.href=window.location.origin+'/my/projects';},expectUnloadPage:true,},{id:'project_sharing_feature',trigger:'table > tbody > tr a:has(span:contains(Project Sharing))',content:'Select "Project Sharing" project to go to project sharing feature for this project.',run:"click",expectUnloadPage:true,},{trigger:'.o_project_sharing .o_kanban_renderer',content:'Wait the project sharing feature be loaded',},{trigger:'button.o-kanban-button-new',content:'Click "Create" button',run:'click',},{trigger:'.o_kanban_quick_create .o_field_widget[name=name] input',content:'Create Task',run:"edit Test Create Task",},{content:"Check that task stages cannot be drag and dropped",trigger:'.o_kanban_group:not(.o_group_draggable)',},{trigger:'.o_kanban_quick_create .o_kanban_edit',content:'Go to the form view of this new task',run:"click",},{trigger:'div[name="stage_id"] div.o_statusbar_status button[aria-checked="false"]:contains(Done)',content:'Change the stage of the task.',run:"click",},{trigger:'.o-mail-Composer-input',content:'Write a message in the chatter of the task',run:"edit I create a new task for testing purpose.",},{trigger:'.o-mail-Composer-send:enabled',content:'Send the message',run:"click",},{trigger:'ol.breadcrumb > li.o_back_button > a:contains(Project Sharing)',content:'Go back to the kanban view',run:"click",},{trigger:'.o_searchview_dropdown_toggler',content:'open the search panel menu',run:"click",},{trigger:'.o_filter_menu .dropdown-item:first-child',content:'click on the first item in the filter menu',run:"click",},{trigger:'.o_group_by_menu .dropdown-item:first-child',content:'click on the first item in the group by menu',run:"click",},{trigger:'.o_favorite_menu .o_add_favorite',content:'open accordion "save current search" in favorite menu',run:"click",},{trigger:'.o_favorite_menu .o_accordion_values .o_save_favorite',content:'click to "save" button in favorite menu',run:"click",},{trigger:'.o_filter_menu .dropdown-item:first-child',content:'click on the first item in the filter menu',run:"click",},{trigger:'.o_group_by_menu .dropdown-item:first-child',content:'click on the first item in the group by menu',run:"click",},{trigger:'.o_favorite_menu .o_accordion_values .o_save_favorite',content:'click to "save" button in favorite menu',run:"click",},{trigger:'button.o_switch_view.o_list',content:'Go to the list view',run:"click",},{trigger:'.o_list_view',},{trigger:'.o_optional_columns_dropdown_toggle',run:"click",},{trigger:'.dropdown-item:contains("Milestone")',},{trigger:'.o_list_view',content:'Check the list view',}];registry.category("web_tour.tours").add('project_sharing_tour',{url:'/odoo',steps:()=>{return projectSharingSteps;}});registry.category("web_tour.tours").add("portal_project_sharing_tour",{url:"/my/projects",steps:()=>{const projectSharingStepIndex=projectSharingSteps.findIndex(s=>s?.id==='project_sharing_feature');return projectSharingSteps.slice(projectSharingStepIndex,projectSharingSteps.length);}});registry.category("web_tour.tours").add("project_sharing_with_blocked_task_tour",{url:"/my/projects",steps:()=>[{trigger:'table > tbody > tr a:has(span:contains("Project Sharing"))',content:'Click on the portal project.',run:"click",expectUnloadPage:true,},{trigger:'article.o_kanban_record',content:'Click on the task',run:"click",},{trigger:'a:contains("Blocked By")',content:'Go to the Block by task tab',run:"click",},{trigger:'i:contains("This task is currently blocked by")',content:'Check that the blocked task is not visible',},]});registry.category("web_tour.tours").add("portal_project_sharing_tour_with_disallowed_milestones",{url:"/my/projects",steps:()=>[{id:"project_sharing_feature",trigger:"table > tbody > tr a:has(span:contains(Project Sharing))",content:'Select "Project Sharing" project to go to project sharing feature for this project.',run:"click",expectUnloadPage:true,},{trigger:".o_project_sharing",content:"Wait the project sharing feature be loaded",},{trigger:"button.o_switch_view.o_list",content:"Go to the list view",run:"click",},{trigger:".o_list_view",},{trigger:".o_optional_columns_dropdown_toggle",run:"click",},{trigger:".dropdown-item",},{trigger:".dropdown-menu",run:function(){const optionalFields=Array.from(this.anchor.ownerDocument.querySelectorAll(".dropdown-item")).map((e)=>e.textContent);if(optionalFields.includes("Milestone")){throw new Error("the Milestone field should be absent as allow_milestones is set to False");}},},],});registry.category("web_tour.tours").add("test_04_project_sharing_chatter_message_reactions",{url:"/my/projects",steps:()=>[{trigger:"table > tbody > tr a:has(span:contains(Project Sharing))",run:"click",expectUnloadPage:true,},{trigger:".o_project_sharing"},{trigger:".o_kanban_record:contains('Test Task with messages')",run:"click"},{trigger:".o-mail-Message"},{trigger:".o-mail-Message .o-mail-MessageReaction:contains('👀')"},],});registry.category("web_tour.tours").add("portal_project_sharing_chatter_mention_users",{url:"/my/projects",steps:()=>[{trigger:"table > tbody > tr a:has(span:contains(Project Sharing))",run:"click",expectUnloadPage:true,},{trigger:".o_project_sharing"},{trigger:".o_kanban_record:contains('Test Task')",run:"click"},{trigger:".o-mail-Composer-input",run:"edit @xxx"},{trigger:"body:not(:has(.o-mail-Composer-suggestion))",run:async()=>{const delay_fetch=odoo.loader.modules.get("@mail/core/common/suggestion_hook").DELAY_FETCH;await delay(delay_fetch);},},{trigger:".o-mail-Composer-input",run:"edit @Georges"},{trigger:".o-mail-Composer-suggestion:contains('Georges')"},],});return __exports;});;

/* /project/static/tests/tours/project_tags_filter_tour_tests.js */
odoo.define('@project/../tests/tours/project_tags_filter_tour_tests',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");function changeFilter(filterName){return[{trigger:".o_control_panel_actions .o_searchview_dropdown_toggler",content:"open searchview menu",run:"click",},{trigger:`.o_favorite_menu .dropdown-item span:contains("${filterName}")`,run:"click",},{trigger:".o_control_panel_actions .o_searchview_dropdown_toggler",content:"close searchview menu",run:"click",},];}
registry.category("web_tour.tours").add("project_tags_filter_tour",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="project.menu_main_pm"]',run:"click",},...changeFilter("Corkscrew tail tag filter"),{trigger:'.o_kanban_group:has(.o_kanban_header:has(span:contains("goat"))):not(:has(.o_kanban_record))',content:"check that the corkscrew tail filter has taken effect",},{trigger:'.o_kanban_group:has(.o_kanban_header:has(span:contains("pig"))) .o_kanban_record:has(span:contains("Pigs"))',content:"check that the corkscrew tail filter has taken effect",},...changeFilter("horned tag filter"),{trigger:'.o_kanban_group:has(.o_kanban_header:has(span:contains("pig"))):not(:has(.o_kanban_record))',content:"check that the horned filter has taken effect",},{trigger:'.o_kanban_group:has(.o_kanban_header:has(span:contains("goat"))) .o_kanban_record:has(span:contains("Goats"))',content:"check that the horned filter has taken effect",},...changeFilter("4 Legged tag filter"),{trigger:'.o_kanban_group:has(.o_kanban_header:has(span:contains("pig"))) .o_kanban_record:has(span:contains("Pigs"))',content:"check that the 4 legged filter has taken effect",},{trigger:'.o_kanban_group:has(.o_kanban_header:has(span:contains("goat"))) .o_kanban_record:has(span:contains("Goats"))',content:"check that the 4 legged filter has taken effect",},],});return __exports;});;

/* /project/static/tests/tours/project_task_history.js */
odoo.define('@project/../tests/tours/project_task_history',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");const baseDescriptionContent="Test project task history version";function changeDescriptionContentAndSave(newContent){const newText=`${baseDescriptionContent} ${newContent}`;return[{trigger:"div.note-editable.odoo-editor-editable",run:"click",},{trigger:`div.note-editable[spellcheck='true'].odoo-editor-editable`,run:`editor ${newText}`,},...stepUtils.saveForm(),];}
function insertEditorContent(newContent){return[{trigger:"div.note-editable.odoo-editor-editable",run:"click",},{trigger:`div.note-editable[spellcheck='true'].odoo-editor-editable`,run:async function(){const div=document.createElement("div");div.appendChild(document.createTextNode(newContent));this.anchor.removeChild(this.anchor.firstChild);this.anchor.appendChild(div);this.anchor.dispatchEvent(new Event("input",{bubbles:true}));},},];}
registry.category("web_tour.tours").add("project_task_history_tour",{url:"/odoo?debug=1,tests",steps:()=>[stepUtils.showAppsMenuItem(),{content:"Open the project app",trigger:".o_app[data-menu-xmlid='project.menu_main_pm']",run:"click",},{content:"Open Test History Project",trigger:".o_kanban_view .o_kanban_record:contains(Test History Project)",run:"click",},{content:"Open Test History Task",trigger:".o_kanban_view .o_kanban_record:contains(Test History Task)",run:"click",},...changeDescriptionContentAndSave("0"),...changeDescriptionContentAndSave("1"),...changeDescriptionContentAndSave("2"),...changeDescriptionContentAndSave("3"),{content:"Go back to kanban view of tasks. this step is added because it takes some time to save the changes, so it's a sort of timeout to wait a bit for the save",trigger:".o_back_button a",run:"click",},{content:"Open Test History Task",trigger:".o_kanban_view .o_kanban_record:contains(Test History Task)",run:"click",},{content:"Open History Dialog",trigger:".o_form_view .o_cp_action_menus i.fa-cog",run:"click",},{trigger:".dropdown-menu",},{content:"Open History Dialog",trigger:".o_menu_item i.fa-history",run:"click",},{trigger:".modal .html-history-dialog.html-history-loaded",},{content:"Verify that 5 revisions are displayed (default empty description after the creation of the task + 3 edits + current version)",trigger:".modal .html-history-dialog .revision-list .btn",run:function(){const items=document.querySelectorAll(".revision-list .btn");if(items.length!==5){console.error("Expect 5 Revisions in the history dialog, got "+items.length);}},},{content:"Verify that the active revision (revision 4) is related to the current version",trigger:`.modal .history-container .history-content-view .history-view-inner:contains(${baseDescriptionContent} 3)`,},{content:"Go to the third revision related to the second edit",trigger:".modal .html-history-dialog .revision-list .btn:nth-child(3)",run:"click",},{trigger:".modal .html-history-dialog.html-history-loaded",},{content:"Verify that the active revision is the one clicked in the previous step",trigger:`.modal .history-container .history-content-view .history-view-inner:contains(${baseDescriptionContent} 1)`,},{trigger:'.history-container .history-view-top-bar a:contains(Comparison)',run:"click",},{content:"Verify comparison text",trigger:".modal .history-container .history-comparison-view",run:function(){const comparaisonHtml=this.anchor.innerHTML;const correctHtml=`<added>${baseDescriptionContent} 3</added><removed>${baseDescriptionContent} 1</removed>`;if(!comparaisonHtml.includes(correctHtml)){console.error(`Expect comparison to be ${correctHtml}, got ${comparaisonHtml}`);}},},{trigger:".modal .html-history-dialog.html-history-loaded",},{content:"Click on Restore History btn to get back to the selected revision in the previous step",trigger:".modal button.btn-primary:enabled",run:"click",},{content:"Verify the confirmation dialog is opened",trigger:".modal button.btn-primary:text(Restore)",run:"click",},{content:"Verify that the description contains the right text after the restore",trigger:`div.note-editable.odoo-editor-editable`,run:function(){const p=this.anchor?.innerText;const expected=`${baseDescriptionContent} 1`;if(p!==expected){console.error(`Expect description to be ${expected}, got ${p}`);}}},{content:"Go back to projects view.",trigger:'a[data-menu-xmlid="project.menu_projects"]',run:"click",},{trigger:".o_kanban_view",},{content:"Open Test History Project Without Tasks",trigger:".o_kanban_view .o_kanban_record:contains(Without tasks project)",run:"click",},{trigger:".o_kanban_project_tasks",},{content:"Switch to list view",trigger:".o_switch_view.o_list",run:"click",},{content:"Create a new task.",trigger:'.o_list_button_add',run:"click",},{trigger:".o_form_view",},{trigger:'div[name="name"] .o_input',content:'Set task name',run:'edit New task',},...stepUtils.saveForm(),...changeDescriptionContentAndSave("0"),...changeDescriptionContentAndSave("1"),...changeDescriptionContentAndSave("2"),...changeDescriptionContentAndSave("3"),{trigger:".o_form_view",},{content:"Open History Dialog",trigger:".o_cp_action_menus i.fa-cog",run:"click",},{trigger:".dropdown-menu",},{content:"Open History Dialog",trigger:".o_menu_item i.fa-history",run:"click",},{content:"Close History Dialog",trigger:".modal-header .btn-close",run:"click",},{content:"Go back to projects view. this step is added because Tour can't be finished with an open form view in edition mode.",trigger:'a[data-menu-xmlid="project.menu_projects"]',run:"click",},{content:"Verify that we are on kanban view",trigger:'button.o_switch_view.o_kanban.active',}]});registry.category("web_tour.tours").add("project_task_last_history_steps_tour",{url:"/odoo?debug=1,tests",steps:()=>[stepUtils.showAppsMenuItem(),{content:"Open the project app",trigger:".o_app[data-menu-xmlid='project.menu_main_pm']",run:"click",},{content:"Open Test History Project",trigger:".o_kanban_view .o_kanban_record:contains(Test History Project)",run:"click",},{content:"Open Test History Task",trigger:".o_kanban_view .o_kanban_record:contains(Test History Task)",run:"click",},...insertEditorContent("0"),...stepUtils.saveForm(),{content:"Open History Dialog",trigger:".o_cp_action_menus i.fa-cog",run:"click",},{trigger:".dropdown-menu",},{content:"Open History Dialog",trigger:".o_menu_item i.fa-history",run:"click",},{trigger:".modal .html-history-dialog.html-history-loaded",},{content:"Verify that 2 revisions are displayed",trigger:".modal .html-history-dialog .revision-list .btn",run:function(){const items=document.querySelectorAll(".revision-list .btn");if(items.length!==2){console.error("Expect 2 Revisions in the history dialog, got "+items.length);}},},{content:"Go to the second revision related to the initial blank document ",trigger:".modal .html-history-dialog .revision-list .btn:nth-child(2)",run:"click",},{trigger:".modal .html-history-dialog.html-history-loaded",},{trigger:'.modal button.btn-primary:enabled',run:"click",},{trigger:'.modal button.btn-primary:text(Restore)',run:"click",},...insertEditorContent("2"),...stepUtils.saveForm(),...insertEditorContent("4"),{trigger:".o_notebook_headers li:nth-of-type(2) a",run:"click",},{trigger:".o_notebook_headers li:nth-of-type(1) a",run:"click",},...insertEditorContent("5"),...stepUtils.saveForm(),],});return __exports;});;

/* /project/static/tests/tours/project_task_templates_tour.js */
odoo.define('@project/../tests/tours/project_task_templates_tour',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add("project_task_templates_tour",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="project.menu_main_pm"]',run:"click",},{trigger:'.o_kanban_record span:contains("Project with Task Template")',run:"click",content:"Navigate to the project with a task template",},{trigger:'div.o_last_breadcrumb_item span:contains("Project with Task Template")',content:"Wait for the kanban view to load",},{trigger:".o-kanban-button-new",run:"click",},{trigger:'.dropdown-menu button.dropdown-item:contains("Template")',run:"click",content:"Create a task with the template",},{trigger:'div[name="name"] .o_input',run:"edit Task",},{trigger:"button.o_form_button_save",run:"click",},{content:"Wait for save completion",trigger:".o_form_readonly, .o_form_saved",},{trigger:'div.note-editable.odoo-editor-editable:contains("Template description")',content:"Check that the created task has copied the description of the template",},],});return __exports;});;

/* /project/static/tests/tours/project_templates_tour.js */
odoo.define('@project/../tests/tours/project_templates_tour',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add("project_templates_tour",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="project.menu_main_pm"]',run:"click",},{content:"Click on New Button of Kanban view",trigger:".o-kanban-button-new",run:"click",},{trigger:'.dropdown-menu button.dropdown-item:contains("Project Template")',run:"click",content:"Create a project from the template",},{trigger:'.modal div[name="name"] .o_input',run:"edit New Project",},{trigger:'button[name="create_project_from_template"]',run:"click",},{content:"Go back to kanban view",trigger:".breadcrumb-item a:contains('Projects')",run:"click",},{content:"Check for created project",trigger:".o_kanban_record:contains('New Project')",},{content:"Go to list view",trigger:"button.o_switch_view.o_list",run:"click",},{content:"Click on New Button of List view",trigger:".o_list_button_add",run:"click",},{content:"Lets Create a second project from the template",trigger:'.dropdown-menu button.dropdown-item:contains("Project Template")',run:"click",},{trigger:'.modal div[name="name"] .o_input',run:"edit New Project 2",},{trigger:'button[name="create_project_from_template"]',run:"click",},{content:"Go back to list view",trigger:".breadcrumb-item a:contains('Projects')",run:"click",},{content:"Check for created project",trigger:".o_data_row td[name='name']:contains('New Project 2')",},],});return __exports;});;

/* /project/static/tests/tours/project_tour.js */
odoo.define('@project/../tests/tours/project_tour',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add('project_test_tour',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="project.menu_main_pm"]',run:"click",},{trigger:'.o_project_kanban',},{trigger:'.o-kanban-button-new',run:"click",},{isActive:['.o-kanban-button-new.dropdown'],trigger:'button.o-dropdown-item:contains("New Project")',run:"click",},{trigger:'.o_project_name input',run:'edit New Project',id:'project_creation',},{trigger:'.o_open_tasks',run:"click .modal:visible .btn.btn-primary",},{trigger:".o_kanban_project_tasks .o_column_quick_create .input-group input",run:"edit New",},{isActive:["auto"],trigger:".o_kanban_project_tasks .o_column_quick_create .o_kanban_add",run:"click",},{trigger:".o_kanban_group",},{trigger:".o_kanban_project_tasks .o_column_quick_create .input-group input",run:"edit Done",},{isActive:["auto"],trigger:".o_kanban_project_tasks .o_column_quick_create .o_kanban_add",run:"click",},{trigger:".o_kanban_group:eq(0)",},{trigger:'.o-kanban-button-new',run:"click",},{trigger:".o_kanban_project_tasks",},{trigger:'.o_kanban_quick_create div.o_field_char[name=display_name] input',run:"edit New task",},{trigger:'.o_kanban_quick_create .o_kanban_add',run:"click",},{trigger:'.o_kanban_record span:contains("New task")',run:"click",},{trigger:'a[name="sub_tasks_page"]',content:'Open sub-tasks notebook section',run:'click',},{trigger:'.o_field_subtasks_one2many .o_list_renderer a[role="button"]',content:'Add a subtask',run:'click',},{trigger:'.o_field_subtasks_one2many div[name="name"] input',content:'Set subtask name',run:"edit new subtask",},{trigger:".o_breadcrumb .o_back_button",content:'Go back to kanban view',tooltipPosition:"right",run:"click",},{trigger:".o_kanban_record .o_widget_subtask_counter .subtask_list_button",content:'open sub-tasks from kanban card',run:"click",},{trigger:".o_widget_subtask_kanban_list .subtask_list",},{trigger:".o_kanban_record .o_widget_subtask_kanban_list .subtask_create",content:'Create a new sub-task',run:"click",},{trigger:".subtask_create_input",},{trigger:".o_kanban_record .o_widget_subtask_kanban_list .subtask_create_input input",content:'Give the sub-task a name',run:"edit newer subtask && press Tab",},{content:"wait the new record is created",trigger:".o_kanban_record .o_widget_subtask_kanban_list a:contains(newer subtask)",},{trigger:".o_kanban_record .o_widget_subtask_kanban_list .subtask_list_row:first-child .o_field_project_task_state_selection button",content:'Change the subtask state',run:"click",},{trigger:".dropdown-menu",},{trigger:".dropdown-menu span.text-danger",content:'Mark the task as Canceled',run:"click",},{trigger:".o_kanban_record .o_widget_subtask_counter .subtask_list_button:contains('1/2')",content:'Close the sub-tasks list',id:"quick_create_tasks",run:"click",},{trigger:'.o_field_text[name="name"] textarea',content:'Set task name',run:"edit New task",},{trigger:'div[name="user_ids"].o_field_many2many_tags_avatar input',content:'Assign the task to you',run:'click',},{trigger:'ul.ui-autocomplete a .o_avatar_many2x_autocomplete',content:'Assign the task to you',run:"click",},{trigger:'a[name="sub_tasks_page"]',content:'Open sub-tasks notebook section',run:'click',},{trigger:'.o_field_subtasks_one2many .o_list_renderer a[role="button"]',content:'Add a subtask',run:'click',},{trigger:'.o_field_subtasks_one2many div[name="name"] input',content:'Set subtask name',run:"edit new subtask",},{trigger:'.o_field_many2many_tags_avatar .o_m2m_avatar',},{trigger:'button[special="save"]',content:'Save task',run:"click",},]});return __exports;});;

/* /project/static/tests/tours/project_update_tour_tests.js */
odoo.define('@project/../tests/tours/project_update_tour_tests',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add('project_update_tour',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="project.menu_main_pm"]',run:"click",},{trigger:".o_project_kanban",},{trigger:'.o-kanban-button-new',run:"click",},{isActive:['.o-kanban-button-new.dropdown'],trigger:'button.o-dropdown-item:contains("New Project")',run:"click",},{trigger:'.o_project_name input',run:"edit New Project",},{trigger:'.o_open_tasks',run:"click .modal:visible .btn.btn-primary",},{trigger:".o_kanban_project_tasks .o_column_quick_create .input-group input",run:"edit New",},{isActive:["auto"],trigger:".o_kanban_project_tasks .o_column_quick_create .o_kanban_add",run:"click",},{trigger:".o_kanban_group",},{trigger:".o_kanban_project_tasks .o_column_quick_create .input-group input",run:"edit Done",},{isActive:["auto"],trigger:".o_kanban_project_tasks .o_column_quick_create .o_kanban_add",run:"click",},{trigger:".o_kanban_group:eq(0)",},{trigger:'.o-kanban-button-new',run:"click",},{trigger:".o_kanban_project_tasks",},{trigger:'.o_kanban_quick_create div.o_field_char[name=display_name] input',run:"edit New task",},{trigger:".o_kanban_project_tasks",},{trigger:'.o_kanban_quick_create .o_kanban_add',run:"click",},{trigger:".o_kanban_group:eq(0)",},{trigger:'.o-kanban-button-new',run:"click",},{trigger:".o_kanban_project_tasks",},{trigger:'.o_kanban_quick_create div.o_field_char[name=display_name] input',run:"edit Second task",},{trigger:".o_kanban_project_tasks",},{trigger:'.o_kanban_quick_create .o_kanban_add',run:"click",},{trigger:".o_kanban_group:nth-child(2) .o_kanban_header",run:"hover && click .o_kanban_group:nth-child(2) .o_kanban_header .dropdown-toggle",},{trigger:".dropdown-item.o_group_edit",run:"click",},{trigger:".modal .o_field_widget[name=fold] input",run:"click",},{trigger:".modal .modal-footer button",run:"click",},{trigger:"body:not(:has(.modal))",},{trigger:'.o_kanban_project_tasks',},{trigger:".o_kanban_record",run:"drag_and_drop(.o_kanban_group:eq(1))",},{trigger:".breadcrumb-item.o_back_button",run:"click",},{trigger:".o_kanban_record:contains('New Project')",},{trigger:".o_switch_view.o_list",run:"click",},{trigger:"tr.o_data_row td[name='name']:contains('New Project')",run:"click",},{trigger:".nav-link:contains('Settings')",run:"click",},{trigger:"div[name='allow_milestones'] input",run:"click",},{trigger:".o_form_button_save",run:"click",},{trigger:"button[name='action_view_tasks']",run:"click",},{trigger:".o_control_panel_navigation button i.fa-sliders",content:'Open embedded actions',run:"click",},{trigger:"span.o-dropdown-item:contains('Top Menu')",run:"click",},{trigger:".o-dropdown-item div span:contains('Dashboard')",content:"Put Dashboard in the embedded actions",run:"click",},{trigger:".o_embedded_actions button span:contains('Dashboard')",content:"Open Dashboard",run:"click",},{trigger:".o_add_milestone a",content:"Add a first milestone",run:"click",},{trigger:".o_list_button_add",content:"Create new milestone",run:"click",},{trigger:"div.o_field_widget[name=name] input",run:"edit New milestone",},{trigger:"input[data-field=deadline]",run:"edit 12/12/2099",},{trigger:".o_list_button_save",run:"click",},{trigger:".o_list_button_add",content:"Make sure the milestone is saved before continuing",},{trigger:"td[data-tooltip='New milestone'] + td",run:"click",},{trigger:"input[data-field=deadline]",run:"edit 12/12/2100 && click body"},{trigger:".o_list_button_add",content:"Create new milestone",run:"click",},{trigger:"div.o_field_widget[name=name] input",run:"edit Second milestone",},{trigger:"input[data-field=deadline]",run:"edit 12/12/2022 && click body",},{trigger:".breadcrumb-item.o_back_button",run:"click",},{trigger:".o-kanban-button-new",content:"Create a new update",run:"click",},{trigger:"div.o_field_widget[name=name] input",run:"edit New update",},{trigger:".o_form_button_save",run:"click",},{trigger:".o_field_widget[name='description'] h1:contains('Activities')",},{trigger:".o_field_widget[name='description'] h3:contains('Milestones')",},{trigger:".o_field_widget[name='description'] div[name='milestone'] ul li:contains('(12/12/2099 => 12/12/2100)')",},{trigger:".o_field_widget[name='description'] div[name='milestone'] ul li:contains('(due 12/12/2022)')",},{trigger:".o_field_widget[name='description'] div[name='milestone'] ul li:contains('(due 12/12/2100)')",},{trigger:'.o_back_button',content:'Go back to the kanban view the project',run:"click",},{trigger:'.o_switch_view.o_list',content:'Open List View of Dashboard',run:"click",},{trigger:'.o_list_view',},{trigger:'.o_back_button',content:'Go back to the kanban view the project',run:"click",},]});return __exports;});;

/* /project_enterprise/static/tests/tours/task_gantt_tour_test.js */
odoo.define('@project_enterprise/../tests/tours/task_gantt_tour_test',['@web/core/registry','@project/../tests/tours/project_tour','@web/core/utils/patch'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");require("@project/../tests/tours/project_tour");const{patch}=require("@web/core/utils/patch");patch(registry.category("web_tour.tours").get("project_test_tour"),{steps(){const originalSteps=super.steps();const taskCreationStepIndex=originalSteps.findIndex((step)=>step.id==="quick_create_tasks");originalSteps.splice(taskCreationStepIndex+1,0,{trigger:'.o_switch_view.o_gantt',content:'Open Gantt View',run:"click",},{id:'gantt_add_task',trigger:'.o_gantt_button_add',content:'Add a task in gantt',run:"click",});originalSteps.splice(originalSteps.length,0,{trigger:".o_gantt_scale_selector .dropdown-toggle",content:"Open range menu",run:"click",},{trigger:'.o_gantt_scale_selector_menu .dropdown-item:nth-child(3)',content:'Select "Month"',run:"click",},{trigger:".o_gantt_progress_bar.o_gantt_group_danger",content:"See user progress bar",})
return originalSteps;}});return __exports;});;

/* /hr/static/tests/tours/check_public_employee_link_redirect.js */
odoo.define('@hr/../tests/tours/check_public_employee_link_redirect',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("check_public_employee_link_redirect",{steps:()=>{const msgSelector='.o_dialog:not(.o_inactive_modal) .modal-content .modal-body div[role="alert"] p';const msg=`You are not allowed to access "Employee" (hr.employee) records.
We can redirect you to the public employee list.`;return[{trigger:msgSelector,content:"See if redirect warning popup appears for current user",timeout:3000,run:()=>{const errorTxt=document.querySelector(msgSelector).innerText;if(errorTxt!==msg){throw new Error("Could not find correct warning message when visiting private employee without required permissions")}}},]},});return __exports;});;

/* /hr/static/tests/tours/hr_employee_flow.js */
odoo.define('@hr/../tests/tours/hr_employee_flow',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add("hr_employee_tour",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),{content:"Open Employees app",trigger:".o_app[data-menu-xmlid='hr.menu_hr_root']",run:"click",},{content:"Open an Employee Profile",trigger:".o_kanban_record:contains('Johnny H.')",run:"click",},{content:"Open a chat with the employee",trigger:".o_employee_chat_btn",run:"click",},{trigger:".o-mail-ChatWindow .o-mail-ChatWindow-header:contains('Johnny H.')",},{content:"Open user account menu",trigger:".o_user_menu .dropdown-toggle",run:"click",},{content:"Open My Preferences",trigger:"[data-menu=preferences]",run:"click",},],});return __exports;});;

/* /hr/static/tests/tours/hr_employee_multiple_bank_accounts.js */
odoo.define('@hr/../tests/tours/hr_employee_multiple_bank_accounts',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add("hr_employee_multiple_bank_accounts_tour",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),{content:"Open Employees app",trigger:".o_app[data-menu-xmlid='hr.menu_hr_root']",run:"click",},{content:"Open an Employee Profile",trigger:".o_kanban_record:contains('Johnny H.')",run:"click",},{content:"Open personal tab",trigger:".nav-link:contains('Personal')",run:"click",},{content:"add bank 1",trigger:"input#bank_account_ids_2",run:"edit 1",},{content:"add bank 1",trigger:".dropdown-item:contains('Create and edit')",run:"click",},{content:"save bank 1",trigger:".o_form_button_save:contains('Save')",run:"click",},{content:"add bank 2",trigger:"input#bank_account_ids_2",run:"edit 2",},{content:"add bank 2",trigger:".dropdown-item:contains('Create and edit')",run:"click",},{content:"save",trigger:".o_form_button_save:contains('Save')",run:"click",},{content:"add bank 3",trigger:"input#bank_account_ids_1",run:"edit 3",},{content:"add bank 3",trigger:".dropdown-item:contains('Create and edit')",run:"click",},{content:"save bank 3",trigger:".o_form_button_save:contains('Save')",run:"click",},{content:"save employee form",trigger:".fa-cloud-upload",run:"click",},{content:"wait for save completion",trigger:".o_form_readonly, .o_form_saved",},],});return __exports;});;

/* /hr/static/tests/tours/version_timeline_auto_save_tour.js */
odoo.define('@hr/../tests/tours/version_timeline_auto_save_tour',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add("version_timeline_auto_save_tour",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),{content:"Open Employees app",trigger:".o_app[data-menu-xmlid='hr.menu_hr_root']",run:"click",},{content:"Open an Employee Profile",trigger:".o_kanban_record:contains('Bob M.')",run:"click",},{content:"Open Payroll Page",trigger:".o_notebook_headers a[name='payroll_information']",run:"click",},{content:"Version should have no contract",trigger:".o_arrow_button_wrapper[data-tooltip='No contract']",},{content:"Set a contract date start on the version",trigger:".o_field_widget[name='contract_date_start'] .o_input",run:"click",},{content:"Choose date X + 1",trigger:".o_date_item_cell:nth-child(11) > div",run:"click",},{trigger:"body:not(:has(.o_datetime_picker))",},...stepUtils.saveForm(),{content:"Tooltip should now reflect the new contract date start",trigger:".o_arrow_button_wrapper[data-tooltip^='Contract:']",},{content:"Open contract end date",trigger:".o_field_widget[name='contract_date_end'] .o_input",run:"click",},{content:"Choose date X + 2",trigger:".o_date_item_cell:nth-child(12) > div",run:"click",},{trigger:"body:not(:has(.o_datetime_picker))",},{content:"Open Create New Version",trigger:".o_field_widget[name='version_id'] > .o_arrow_button_wrapper > button",run:"click",},{content:"Choose date X + 3",trigger:".o_date_item_cell:nth-child(13) > div",run:"click",},{trigger:"body:not(:has(.o_datetime_picker))",},{content:"Wait until new version is created and form reloads",trigger:"body .o_form_saved",},],});return __exports;});;

/* /hr_org_chart/static/tests/tours/hr_employee_test.js */
odoo.define('@hr_org_chart/../tests/tours/hr_employee_test',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("indirect_subordinates_tour",{steps:()=>[{content:"Click the number next to employee georges",trigger:"div[name='child_ids'] .o_org_chart_entry button > .badge:contains('2')",run:"click",},{content:"Click Indirect Subordinates",trigger:".o_org_chart_popup a.o_employee_sub_redirect[data-type='indirect']",run:"click",},],});registry.category("web_tour.tours").add("employee_view_access_multicompany",{steps:()=>[{content:"Employee list view",trigger:".o_switch_view.o_list",run:"click",},{content:"Click on the employee C",trigger:'table.o_list_table tbody td:contains("Employee C")',run:"click",},{content:"Click the number next to employee C",trigger:"div[name='child_ids'] .o_org_chart_entry button > .badge:contains('1')",run:"click",},],});return __exports;});;

/* /timesheet_grid/static/tests/tours/task_gantt_tour_test.js */
odoo.define('@timesheet_grid/../tests/tours/task_gantt_tour_test',['@web/core/registry','@web/core/utils/patch','@project_enterprise/../tests/tours/task_gantt_tour_test'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{patch}=require("@web/core/utils/patch");require("@project_enterprise/../tests/tours/task_gantt_tour_test");patch(registry.category("web_tour.tours").get("project_test_tour"),{steps(){const originalSteps=super.steps();const ganttAddTaskStepIndex=originalSteps.findIndex((step)=>step.id==="gantt_add_task");originalSteps.splice(ganttAddTaskStepIndex+1,0,{trigger:'div[name="allocated_hours"] input',content:"Set allocated_hours",run:"edit 200",});return originalSteps;},});return __exports;});;

/* /timesheet_grid/static/tests/tours/timesheet_record_time.js */
odoo.define('@timesheet_grid/../tests/tours/timesheet_record_time',['@web/core/registry','@web/core/utils/concurrency'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{delay}=require("@web/core/utils/concurrency");registry.category("web_tour.tours").add("timesheet_record_time",{url:"/odoo",steps:()=>[{trigger:".o_app[data-menu-xmlid='hr_timesheet.timesheet_menu_root']",content:"Open Timesheet app.",run:"click",},{trigger:".btn_start_timer",content:"Launch the timer to start a new activity.",run:"click",},{trigger:"div[name=name] input",content:"Describe your activity.",run:"edit Description",},{trigger:'.timesheet-timer div[name="project_id"] input',content:"Select the project on which you are working.",run:"edit Test Project",},{isActive:["auto"],trigger:".ui-autocomplete > li > a:contains(Test Project)",run:"click",},{trigger:".o_stop_timer_button",content:"Stop the timer when you are done.",run:"click",},],});registry.category("web_tour.tours").add("timesheet_overtime_hour_encoding",{url:"/odoo",steps:()=>[{trigger:".o_app[data-menu-xmlid='hr_timesheet.timesheet_menu_root']",content:"Open Timesheet app.",run:"click",},{trigger:"button.btn.btn-secondary span[title='Previous']",run:"click",},{trigger:".o_grid_row",run:async()=>{await delay(300);},},{trigger:".o_grid_row",run:async function(){const expectedValues=["+2:00","+1:00","-1:00","-2:00","-3:00"];document.querySelectorAll(".o_grid_bar_chart_overtime[title='Daily overtime']").forEach((span,index)=>{if(span.textContent.trim()!==expectedValues[index]){throw new Error(`Tour stopped: Expected ${
                                    expectedValues[index]
                                }, but found ${span.textContent.trim()}`);}});},},{trigger:".o_grid_bar_chart_overtime[title='Total overtime']:contains('+5:00'):not(:visible)",run:"hover",},],});registry.category("web_tour.tours").add("timesheet_overtime_day_encoding",{url:"/odoo",steps:()=>[{trigger:".o_app[data-menu-xmlid='hr_timesheet.timesheet_menu_root']",content:"Open Timesheet app.",run:"click",},{trigger:"button.btn.btn-secondary span[title='Previous']",run:"click",},{trigger:".o_grid_row",run:async()=>{await delay(300);},},{trigger:".o_grid_row",run:async function(){const expectedValues=["+0.25","-0.13","-0.25","-0.38"];document.querySelectorAll(".o_grid_bar_chart_overtime[title='Daily overtime']").forEach((span,index)=>{if(span.textContent.trim()!==expectedValues[index]){throw new Error(`Tour stopped: Expected ${
                                    expectedValues[index]
                                }, but found ${span.textContent.trim()}`);}});},},{trigger:".o_grid_bar_chart_overtime[title='Total overtime']:contains('-0.50'):not(:visible)",run:"hover",},],});return __exports;});;

/* /knowledge/static/tests/tours/commands/knowledge_article_commands_readonly_tour.js */
odoo.define('@knowledge/../tests/tours/commands/knowledge_article_commands_readonly_tour',['@web/core/registry','@web_tour/tour_utils','@knowledge/../tests/tours/knowledge_tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");const{embeddedViewPatchFunctions,endKnowledgeTour}=require("@knowledge/../tests/tours/knowledge_tour_utils");const embeddedViewPatchUtil=embeddedViewPatchFunctions();registry.category("web_tour.tours").add("knowledge_article_commands_readonly_tour",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="knowledge.knowledge_menu_root"]',run:"click",},{trigger:"body",run(){embeddedViewPatchUtil.before();},},{content:"Check view list has no add button",trigger:`[data-embedded="view"]:has(.o_list_view):not(:has(.o_list_button_add))`,},{content:"Check kaban has no add button",trigger:`[data-embedded="view"]:has(.o_kanban_view):not(:has(.o_kanban_quick_add))`,},{trigger:"body",run(){embeddedViewPatchUtil.after();},},...endKnowledgeTour(),],});return __exports;});;

/* /knowledge/static/tests/tours/commands/knowledge_article_commands_tour.js */
odoo.define('@knowledge/../tests/tours/commands/knowledge_article_commands_tour',['@odoo/owl','@web/core/registry','@web/core/utils/patch','@web_tour/tour_utils','@knowledge/../tests/tours/knowledge_tour_utils','@html_editor/others/embedded_components/backend/video/video','@html_editor/main/media/media_dialog/video_selector','@html_editor/fields/html_field','@html_editor/editor'],function(require){'use strict';let __exports={};const{Component,markup,xml}=require("@odoo/owl");const{registry}=require("@web/core/registry");const{patch}=require("@web/core/utils/patch");const{stepUtils}=require("@web_tour/tour_utils");const{appendArticleLink,embeddedViewPatchFunctions,endKnowledgeTour,openPowerbox,}=require("@knowledge/../tests/tours/knowledge_tour_utils");const{EmbeddedVideoComponent}=require("@html_editor/others/embedded_components/backend/video/video");const{VideoSelector}=require("@html_editor/main/media/media_dialog/video_selector");const{HtmlField}=require("@html_editor/fields/html_field");const{Editor}=require("@html_editor/editor");const embeddedViewPatchUtil=embeddedViewPatchFunctions();const embedViewSelector=(embedViewName)=>{return`[data-embedded="view"]:has( .o_last_breadcrumb_item:contains("${embedViewName}"))`;};const commonKanbanSteps=(embedViewName)=>{return[{trigger:embedViewSelector(embedViewName),run:function(){this.anchor.scrollIntoView();},},{trigger:`${embedViewSelector(embedViewName)} .o_kanban_renderer`,},];};let articleId;let plugin;const unpatchHtmlField=patch(HtmlField.prototype,{setup(){super.setup();articleId=this.props.record.resId;},});const unpatchEditor=patch(Editor.prototype,{preparePlugins(){super.preparePlugins();plugin=this.plugins.find((p)=>p.insertEmbeddedView);},});const articleCommandSteps=[{trigger:`[name="body"] .odoo-editor-editable > p:last-child`,run:function(){openPowerbox(this.anchor);},},{trigger:'.o-we-powerbox .o-we-command-name:contains(Article)',run:'click',},{trigger:".o_article_search_input input",run:"edit LinkedArticle",},{trigger:`.o_article_search_item .o_article_search_name:contains(LinkedArticle)`,run:'click',},{trigger:`[name="body"] .odoo-editor-editable > p a:contains(LinkedArticle)`,},];const fileCommandSteps=[{trigger:'.odoo-editor-editable > p',run:function(){openPowerbox(this.anchor);},},{trigger:'.o-we-command-name:contains("Media")',run:'click',},{trigger:'.o_select_media_dialog .nav-tabs .nav-link:contains("Documents")',run:'click',},{trigger:'.o_existing_attachment_cell:contains(Onboarding) .o_button_area',run:'click'},{trigger:"[data-embedded='file'] span.o_file_image a",run:'click',},{trigger:'.o-FileViewer-view:iframe body:contains(Content)',},{trigger:'.o-FileViewer-headerButton[aria-label="Close"]',run:'click',},{trigger:".o_file_name_container:contains(Onboarding)",run:function(){this.anchor.dispatchEvent(new Event("focus"));}},{trigger:".o_file_name_container + input",run:function(){this.anchor.value="Renamed";this.anchor.dispatchEvent(new Event("blur"));},},{trigger:"span.o_file_name",run:function(){const currentName=this.anchor.textContent;if(currentName!=="Renamed"){throw new Error(`The new file name was expected to be: "Renamed", but the actual value is: "${currentName}"`);}}}];const indexCommandSteps=[{trigger:'.odoo-editor-editable > p',run:function(){openPowerbox(this.anchor);},},{trigger:'.o-we-command-name:contains("Index")',run:'click',},{trigger:'[data-embedded="articleIndex"]',},{trigger:'[data-embedded="articleIndex"] button[title="Update"]',run:'click',},{trigger:'[data-embedded="articleIndex"] button[title="Switch Mode"]',run:'click',}];const tocCommandSteps=[{trigger:'.odoo-editor-editable > p',run:function(){openPowerbox(this.anchor);},},{trigger:'.o-we-command-name:contains("Table Of Content")',run:'click',},{trigger:'[data-embedded="tableOfContent"]',},{trigger:'.odoo-editor-editable > p',run:function(){const toCreate=[["h1","Title 1"],["h2","Title 1.1"],["h3","Title 1.1.1"],["h2","Title 1.2"],];toCreate.forEach((el)=>{const elem=document.createElement(el[0]);elem.textContent=el[1];this.anchor.appendChild(elem);})
this.anchor.dispatchEvent(new Event("input",{bubbles:true}));},},{trigger:'[data-embedded="tableOfContent"] div:first',run:'click',},{trigger:'[data-embedded="tableOfContent"] .o_embedded_toc_content:not(:visible)',},{trigger:'[data-embedded="tableOfContent"] div:first',run:'click',},{trigger:'.o_embedded_toc_link_depth_0',run:'click',},{trigger:'.o_knowledge_header .dropdown-toggle',run:'click',},{trigger:'.o_knowledge_options_dropdown .dropdown-item:contains("Lock")',run:'click',},{trigger:'.o_field_html .o_readonly',},{trigger:'[data-embedded="tableOfContent"]',run:function(){if(this.anchor.querySelectorAll(".o_embedded_toc_content").length!==1){throw new Error('The table of content group of links should be present exactly once (not duplicated)');}},},{trigger:'.o_embedded_toc_link_depth_0',run:'click',},{trigger:'.o_knowledge_header .dropdown-toggle',run:'click',},{trigger:'.o_knowledge_options_dropdown .dropdown-item:contains("Unlock")',run:'click',},{trigger:'.o_field_html .odoo-editor-editable',}];const clipboardCommandSteps=[{trigger:'.o_article .o_article_name:contains("EditorCommandsArticle")',run:"click",},{trigger:'.o_hierarchy_article_name input:value("EditorCommandsArticle")',},{trigger:'.odoo-editor-editable > p',run:function(){openPowerbox(this.anchor);},},{trigger:'.o-we-command-name:contains("Clipboard")',run:'click',},{trigger:"[data-embedded='clipboard']",},{trigger:"[data-embedded-editable='clipboardContent'] > p",run:"editor Hello world",},{trigger:"[data-embedded-editable='clipboardContent'] > p:contains(Hello world)",}];const YoutubeVideoId="Rk1MYMPDx3s";let unpatchVideoEmbed;let unpatchVideoSelector;class MockedVideoIframe extends Component{static template=xml`
        <div class="o_video_iframe_src" t-out="props.src" />
    `;static props=["src"];}
const videoCommandSteps=[{trigger:"body",run:()=>{unpatchVideoEmbed=patch(EmbeddedVideoComponent,{template:xml`<div class="o_video_iframe_src" t-out="url" />`});unpatchVideoSelector=patch(VideoSelector.components,{...VideoSelector.components,VideoIframe:MockedVideoIframe});},},{trigger:".odoo-editor-editable > p",run:function(){openPowerbox(this.anchor);},},{trigger:'.o-we-command-name:contains("Media")',run:"click",},{trigger:'.modal-body .nav-link:contains("Videos")',run:"click",},{content:"Enter a video URL",trigger:".modal-body #o_video_text",run:`edit https://www.youtube.com/watch?v=${YoutubeVideoId}`,},{content:"Wait for preview to appear",trigger:`.o_video_iframe_src:contains("//www.youtube.com/embed/${YoutubeVideoId}?rel=0&autoplay=0")`,},{content:"Confirm selection",trigger:'.modal-footer button:contains("Add")',run:"click",},{trigger:`[data-embedded="video"] .o_video_iframe_src:contains("https://www.youtube.com/embed/${YoutubeVideoId}?rel=0&autoplay=0")`,},{trigger:'[data-embedded="video"]',run:function(){this.anchor.remove();},}];const unpatchSteps=[{trigger:"body",run:()=>{unpatchVideoEmbed();unpatchVideoSelector();embeddedViewPatchUtil.after();unpatchHtmlField();unpatchEditor();},}];const embeddedViewPatchSteps=[{trigger:'body',run:embeddedViewPatchUtil.before,}];let embeddedProps;const embedListName="List special chars *()!'<>~";const listCommandSteps=[{trigger:'.odoo-editor-editable > p',run:function(){openPowerbox(this.anchor);},},{trigger:'.o-we-command-name:contains("Item List")',run:'click',},{trigger:'.modal-dialog #label',run:`edit ${embedListName}`,},{trigger:'.modal-footer button.btn-primary',run:'click'},{trigger:embedViewSelector(embedListName),run:function(){this.anchor.scrollIntoView();},},{trigger:`${embedViewSelector(embedListName)} .o_list_renderer`,},{trigger:`${embedViewSelector(embedListName)} .o_control_panel .o_breadcrumb .active:contains("*()!'<>~")`,run:()=>{const embeddedViewElement=document.querySelector('[data-embedded="view"]');embeddedProps=JSON.parse(embeddedViewElement.dataset.embeddedProps);}},{trigger:'.o_control_panel_breadcrumbs_actions .dropdown-toggle',run:'click',},{trigger:'.dropdown-item:contains(Edit)',run:"click",},{trigger:'.modal-footer button.btn-primary',run:'click'},{trigger:`${embedViewSelector(embedListName)} .o_control_panel .o_breadcrumb .active:contains("*()!'<>~")`,run:()=>{const embeddedViewElement=document.querySelector('[data-embedded="view"]');const newEmbeddedProps=JSON.parse(embeddedViewElement.dataset.embeddedProps);if(newEmbeddedProps.display_name!==embeddedProps.display_name){throw new Error('The name displayed should not have changed');}
if(JSON.stringify(newEmbeddedProps)!==JSON.stringify(embeddedProps)){throw new Error('data-embedded-props should be semantically the same as before');}}},{trigger:'.o_control_panel_breadcrumbs_actions .dropdown-toggle',run:'click',},{trigger:'.dropdown-item:contains(Edit)',run:"click",},{trigger:'.modal-body input',run:"edit New Title",},{trigger:'.modal-footer button.btn-primary',run:'click',},{trigger:'[data-embedded="view"] .o_control_panel .o_breadcrumb .active:contains("New Title")',}];const embedKanbanName="My Tasks Kanban";const embedKanbanSteps=[{trigger:'.odoo-editor-editable > p',run:function(){openPowerbox(this.anchor);},},{trigger:'.o-we-command-name:contains("Item Kanban")',run:'click',},{trigger:'.modal-dialog #label',run:`edit ${embedKanbanName}`,},{trigger:`.modal-dialog:contains("Insert a Kanban View") .modal-footer button.btn-primary`,run:'click',},...commonKanbanSteps(embedKanbanName),{trigger:`${embedViewSelector(embedKanbanName)} .o_kanban_renderer .o_kanban_group .o_kanban_header_title:contains("Ongoing")`,},{trigger:`${embedViewSelector(embedKanbanName)} .o-kanban-button-new`,run:'click',},{trigger:`${embedViewSelector(embedKanbanName)} .o_kanban_renderer .o_kanban_quick_create .o_input`,run:"edit New Quick Create Item",},{trigger:`${embedViewSelector(embedKanbanName)} .o_kanban_renderer .o_kanban_quick_create a[title="Add a random icon"]`,run:'click',},{trigger:`${embedViewSelector(embedKanbanName)} .o_kanban_renderer .o_kanban_quick_create .o_article_emoji`,run:'click',},{trigger:'.o-Emoji[data-codepoints="🙃"]',run:'click',},{trigger:`${embedViewSelector(embedKanbanName)} .o_kanban_renderer .o_kanban_quick_create .o_kanban_add`,run:'click'},{trigger:`${embedViewSelector(embedKanbanName)} .o_kanban_renderer .o_article_emoji:contains("🙃")`,},{trigger:`${embedViewSelector(embedKanbanName)} .o_kanban_renderer span:contains("New Quick Create Item")`,},{trigger:`${embedViewSelector(embedKanbanName)} .o_kanban_renderer .o_article_emoji`,run:'click',},{trigger:'.o-Emoji[data-codepoints="🤩"]',run:'click',}];const embedCardsKanbanName="My Cards Kanban";const embedCardsKanbanSteps=[{trigger:'.odoo-editor-editable > p',run:function(){openPowerbox(this.anchor);},},{trigger:'.o-we-command-name:contains("Item Cards")',run:'click',},{trigger:'.modal-dialog #label',run:`edit ${embedCardsKanbanName}`,},{trigger:`.modal-dialog:contains("Insert a Kanban View") .modal-footer button.btn-primary`,run:'click',},...commonKanbanSteps(embedCardsKanbanName)];const embedKanbanActWindowName="Act Window Kanban";const articleItemsKanbanAction={domain:"[('parent_id', '=', active_id), ('is_article_item', '=', True)]",help:markup('<p class="o_nocontent_help">No data to display</p>'),name:embedKanbanActWindowName,res_model:'knowledge.article',type:'ir.actions.act_window',views:[[false,'kanban']],view_mode:'kanban',};const articleItemsKanbanActionContext=()=>{return{active_id:articleId,default_parent_id:articleId,default_is_article_item:true,};};const embedKanbanActWindowSteps=[{trigger:'.odoo-editor-editable > p',run:function(){const context=articleItemsKanbanActionContext();const selection=document.getSelection();selection.setBaseAndExtent(this.anchor,0,this.anchor,0);plugin.insertEmbeddedView(articleItemsKanbanAction,articleItemsKanbanAction.name,"kanban",{context});},},...commonKanbanSteps(embedKanbanActWindowName)];const embedViewFiltersSteps=[{trigger:'tbody tr.o_data_row:nth-child(2)',},{trigger:'.o_searchview_input_container input',run:"edit 1",},{trigger:'.o_searchview_autocomplete [role="menuitem"]:contains(Title)',run:"click",},{trigger:'tbody:not(tr.o_data_row:nth-child(2))',},{trigger:'tbody > tr > td[name="display_name"]',run:"click",},{trigger:'.o_hierarchy_article_name input:value("Child 1")',},{trigger:'.o_article .o_article_name:contains("EditorCommandsArticle")',run:"click",},{trigger:'.o_searchview_input_container',},{trigger:'tbody:not(tr.o_data_row:nth-child(2))',}];const embedKanbanEditArticleSteps=[{trigger:`${embedViewSelector(embedKanbanName)} .o_kanban_renderer .o_kanban_group .o_kanban_header_title:contains("Ongoing") .o_kanban_quick_add`,run:'click'},{trigger:`${embedViewSelector(embedKanbanName)} .o_kanban_renderer .o_kanban_group:has(.o_kanban_header_title:contains("Ongoing")) .o_kanban_quick_create .o_input`,run:"edit Quick Create Ongoing Item",},{trigger:`${embedViewSelector(embedKanbanName)} .o_kanban_renderer .o_kanban_quick_create .o_kanban_edit`,run:'click'},{trigger:'.o_knowledge_header .o_hierarchy_article_name input:value("Quick Create Ongoing Item")',},{trigger:'.o_article .o_article_name:contains("EditorCommandsArticle")',run:"click",},{trigger:'.odoo-editor-editable:contains("EditorCommandsArticle Content")',}];const composeBody=".modal-dialog:contains(Compose Email) [name='body']";const articleCommandComposerSteps=[{trigger:'.btn-chatter',run:"click",},{trigger:'.o-mail-Chatter-sendMessage:not([disabled=""])',run:"click",},{trigger:"button[title='Open Full Composer']",run:"click",},{trigger:`${composeBody} .odoo-editor-editable > div.o-paragraph`,},...appendArticleLink(`${composeBody}`,'EditorCommandsArticle'),{trigger:`${composeBody} .o_knowledge_article_link:contains("EditorCommandsArticle")`,},...appendArticleLink(`${composeBody}`,'LinkedArticle',`.o_knowledge_article_link:contains("EditorCommandsArticle")`),{trigger:`${composeBody} .odoo-editor-editable a:nth-child(2).o_knowledge_article_link:contains("LinkedArticle")[contenteditable="false"]`,},{trigger:`${composeBody} .odoo-editor-editable a:nth-child(1).o_knowledge_article_link:contains("EditorCommandsArticle")[contenteditable="false"]`,},{trigger:'.o_mail_send',run:"click",},{trigger:'.o_widget_knowledge_chatter_panel .o-mail-Thread .o-mail-Message-body a:nth-child(1).o_knowledge_article_link:contains("EditorCommandsArticle")',},{trigger:'.o_widget_knowledge_chatter_panel .o-mail-Thread .o-mail-Message-body a:nth-child(2).o_knowledge_article_link:contains("LinkedArticle")',},{trigger:'.btn-chatter',run:'click',}];const articleCommandUsageSteps=[{trigger:'.o_knowledge_article_link:contains("LinkedArticle")',run:'click',},{trigger:'.o_knowledge_header:has(.o_hierarchy_article_name input:value("LinkedArticle"))',run:"click",},{trigger:'.o_article .o_article_name:contains("EditorCommandsArticle")',run:"click",},{trigger:'.odoo-editor-editable:contains("EditorCommandsArticle Content")',}];const clipboardUsageSteps=[{trigger:'.btn-chatter',run:'click',},{trigger:'.o-mail-Thread',},{trigger:'.o-mail-Followers-button',run:'click',},{trigger:'.o-mail-Follower-details:contains(HelloWorldPartner)',run:'click',},{trigger:'.o_breadcrumb .o_last_breadcrumb_item.active:contains(HelloWorldPartner)',},{trigger:'.o_breadcrumb a:contains(EditorCommandsArticle)',run:'click',},{trigger:"[data-embedded='clipboard'] button:contains(Copy)",},{trigger:'.btn-chatter',run:'click',},{trigger:'.o-mail-Thread',},{trigger:'.o-mail-Followers-button',run:'click',},{trigger:'.o-mail-Follower-details:contains(HelloWorldPartner)',run:'click',},{trigger:'.o_breadcrumb .o_last_breadcrumb_item.active:contains(HelloWorldPartner)',},{trigger:'button[title="Search Knowledge Articles"]',run:'click',},{trigger:'.o_command_default:contains(EditorCommandsArticle)',run:'click',},{trigger:'.o_hierarchy_article_name input:value("EditorCommandsArticle")',},{trigger:"[data-embedded='clipboard'] button:contains(Use as)",run:'click',},{trigger:'.o_form_sheet .o_field_html .odoo-editor-editable p:contains("Hello world")',}];registry.category("web_tour.tours").add('knowledge_article_commands_tour',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="knowledge.knowledge_menu_root"]',run:"click",},...articleCommandSteps,...fileCommandSteps,...indexCommandSteps,...tocCommandSteps,...videoCommandSteps,...clipboardCommandSteps,...embeddedViewPatchSteps,...listCommandSteps,...embedKanbanSteps,...embedKanbanActWindowSteps,...embedCardsKanbanSteps,...embedViewFiltersSteps,...embedKanbanEditArticleSteps,...articleCommandUsageSteps,...articleCommandComposerSteps,...clipboardUsageSteps,...unpatchSteps,...endKnowledgeTour()]});return __exports;});;

/* /knowledge/static/tests/tours/commands/knowledge_calendar_command_tour.js */
odoo.define('@knowledge/../tests/tours/commands/knowledge_calendar_command_tour',['@web/core/registry','@knowledge/../tests/tours/knowledge_tour_utils','@web_tour/tour_utils','@web/core/utils/patch'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{embeddedViewPatchFunctions,endKnowledgeTour,openCommandBar,}=require("@knowledge/../tests/tours/knowledge_tour_utils");const{stepUtils}=require("@web_tour/tour_utils");const{patch}=require("@web/core/utils/patch");const embeddedViewPatchUtil=embeddedViewPatchFunctions();function mockDate(){const now="2025-02-15T08:00:00";class MockDate extends Date{static now(){return new Date(now);}}
return patch(window,{Date:MockDate});}
let unpatchDate;function clickDate(el){const rect=el.getBoundingClientRect();const eventParams={bubbles:true,clientX:rect.left+3,clientY:rect.top+3,};el.dispatchEvent(new MouseEvent('mousedown',eventParams));el.dispatchEvent(new MouseEvent('mouseup',eventParams));}
function dragDate(el,target){const elRect=el.getBoundingClientRect();el.dispatchEvent(new MouseEvent('mousedown',{bubbles:true,clientX:elRect.left+1,clientY:elRect.top+1,}));const targetRect=target.getBoundingClientRect();target.dispatchEvent(new MouseEvent('mousemove',{bubbles:true,clientX:targetRect.left+1,clientY:targetRect.top+1,}));target.dispatchEvent(new MouseEvent('mouseup',{bubbles:true,clientX:targetRect.left+1,clientY:targetRect.top+1,}));}
registry.category("web_tour.tours").add('knowledge_calendar_command_tour',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="knowledge.knowledge_menu_root"]',run:"click",},{trigger:"body",run:()=>{embeddedViewPatchUtil.before();unpatchDate=mockDate();},},{trigger:'.odoo-editor-editable > p',run:function(){openCommandBar(this.anchor);},},{trigger:'.o-we-command-name:contains("Calendar")',run:'click',},{trigger:'.modal-footer .btn-primary',run:"click",},{trigger:'[data-embedded="view"]',run:function(){this.anchor.scrollIntoView(true);}},{trigger:"[data-embedded='view']",},{trigger:'.fc-timegrid-slot.fc-timegrid-slot-lane[data-time="08:00:00"]',run:function(){clickDate(this.anchor);},},{trigger:".o_hierarchy_article_name input:empty",},{trigger:'.o_widget_knowledge_properties_panel .o_property_field:contains("Start Date")',run:function(){const input=this.anchor.querySelector("input");if(!input.value.includes("08:00")){throw new Error('Item was not created with the correct property value');}},},{trigger:'.o_knowledge_editor .odoo-editor-editable h1',run:"editor Item Article",},{trigger:'.o_knowledge_tree .o_article_name:contains("EditorCommandsArticle")',run:'click',},{trigger:'.fc-timegrid-event .o_event_title:contains("Item Article")',},{content:"Remove previous item calendar view",trigger:'.odoo-editor-editable',run:"editor ",},{trigger:".odoo-editor-editable:not(:has( [data-embedded='view']))",},{trigger:'.o_knowledge_helper .o_knowledge_add_item_calendar',run:'click',},{trigger:'.o_knowledge_item_calendar_dialog_date_start .o_select_menu_toggler',run:'click',},...stepUtils.editSelectMenuInput('.o_knowledge_item_calendar_dialog_date_start .o_select_menu_input','Start Property'),{trigger:'.o_select_menu_menu .o_select_menu_item.o_create_datetime',run:'click',},{trigger:'.o_knowledge_item_calendar_dialog_date_stop .o_select_menu_toggler',run:'click',},...stepUtils.editSelectMenuInput('.o_knowledge_item_calendar_dialog_date_stop .o_select_menu_input','Stop Property'),{trigger:'.o_select_menu_menu .o_select_menu_item.o_create_choice',run:'click',},{trigger:".o_knowledge_item_calendar_dialog_slot_min_time input",run:function(){this.anchor.value="08:00";this.anchor.dispatchEvent(new Event("change"));},},{trigger:".o_knowledge_item_calendar_dialog_slot_max_time input",run:function(){this.anchor.value="16:30";this.anchor.dispatchEvent(new Event("change"));},},{trigger:"input[type='checkbox']",run:"click"},{trigger:'.modal-footer .btn-primary',run:'click',},{trigger:"[data-embedded='view'] .o_knowledge_article_view_calendar_embedded_view",},{trigger:".fc-timegrid-slots:not(:has(.fc-timegrid-slot-lane[data-time='07:00:00']))",},{trigger:".fc-timegrid-slot.fc-timegrid-slot-lane[data-time='08:00:00']",},{trigger:".fc-timegrid-slots:not(:has(.fc-timegrid-slot-lane[data-time='16:30:00']))",},{trigger:".fc-timegrid-slot.fc-timegrid-slot-lane[data-time='16:00:00']",},{trigger:".o_calendar_widget:not(:has(.fc-day-sat, .fc-day-sun))",},{trigger:'.fc-timegrid-slot.fc-timegrid-slot-lane[data-time="08:00:00"]',run:function(){clickDate(this.anchor);},},{trigger:".o_hierarchy_article_name input:empty",},{trigger:'.o_widget_knowledge_properties_panel .o_property_field:contains("Start Property")',run:function(){const input=this.anchor.querySelector("input");if(!input.value.includes("08:00")){throw new Error('Item was not created with the correct property value');}},},{trigger:'.o_widget_knowledge_properties_panel .o_field_property_add button',run:'click',},{trigger:'.o_field_property_definition_header',run:"edit Date Property",},{trigger:'.o_field_property_definition_type button.dropdown-toggle',run:'click',},{trigger:'.dropdown-menu .dropdown-item:contains("Date"):not(:contains("Time"))',run:'click',},{trigger:'.o_knowledge_editor .odoo-editor-editable',run:'click',},{trigger:'.o_widget_knowledge_properties_panel .o_field_property_add button',run:'click',},{trigger:'.o_field_property_definition_header',run:"edit Boolean Property",},{trigger:'.o_field_property_definition_type button.dropdown-toggle',run:'click',},{trigger:'.dropdown-menu .dropdown-item:contains("Checkbox")',run:'click',},{trigger:'.o_knowledge_editor .odoo-editor-editable',run:'click',},{trigger:'.o_widget_knowledge_properties_panel .o_field_property_add button',run:'click',},{trigger:'.o_field_property_definition_header',run:"edit Text Property",},{trigger:'.o_field_property_definition_type button.dropdown-toggle',run:'click',},{trigger:'.dropdown-menu .dropdown-item:contains("Text")',run:'click',},{trigger:'.o_knowledge_editor .odoo-editor-editable',run:'click',},{trigger:'.o_widget_knowledge_properties_panel .o_property_field:contains("Text Property") input',run:'edit Custom text && click body',},{trigger:'.o_knowledge_editor .odoo-editor-editable h1',run:"editor Item Article",},{trigger:'.o_knowledge_tree .o_article_name:contains("Article Items")',run:'click',},{trigger:'.fc-timegrid-event .o_event_title:contains("Item Article")',},{trigger:'.o_control_panel_breadcrumbs_actions .dropdown-toggle',run:'click',},{trigger:'.dropdown-item:contains(Edit)',run:"click",},{trigger:'.o_knowledge_item_calendar_dialog_date_start .o_select_menu_toggler',run:'click',},{trigger:'.o_select_menu_menu .o_select_menu_item:contains("Date Property")',run:'click',},{trigger:'.o_knowledge_item_calendar_dialog_date_stop .o_select_menu_toggler:empty',},{trigger:'.o_knowledge_item_calendar_dialog_date_stop .o_select_menu_toggler',run:'click',},{trigger:'.o_knowledge_item_calendar_dialog_date_stop .o_select_menu:not(:contains("Date Property"))',},{trigger:'.o_knowledge_item_calendar_props_dialog',run:'click',},{trigger:'.o_color .o_select_menu_toggler',run:'click',},{trigger:'.o_select_menu_menu .o_select_menu_item:contains("Boolean Property")',run:'click',},{trigger:'.o_scale .o_select_menu_toggler',run:'click',},{trigger:'.o_select_menu_menu .o_select_menu_item:contains("Month")',run:'click',},{trigger:'.modal-footer .btn-primary',run:'click',},{trigger:".fc-view:not(:has(.fc-event-container))",},{trigger:'.o_knowledge_article_view_calendar_embedded_view .o_calendar_header .o_view_scale_selector:contains("Month")',},{trigger:'.o_control_panel_breadcrumbs_actions .dropdown-toggle',run:'click',},{trigger:'.dropdown-item:contains(Edit)',run:"click",},{trigger:'.o_knowledge_item_calendar_dialog_date_start .o_select_menu_toggler',run:'click',},{trigger:'.o_select_menu_menu .o_select_menu_item:contains("Start Property")',run:'click',},{trigger:'.o_knowledge_item_calendar_dialog_date_stop .o_select_menu_toggler:empty',},{trigger:'.o_knowledge_item_calendar_dialog_date_stop .o_select_menu_toggler',run:'click',},{trigger:'.o_select_menu_menu .o_select_menu_item:contains("Stop Property")',run:'click',},{trigger:'.modal-footer .btn-primary',run:'click',},{trigger:'.o_control_panel_breadcrumbs_actions .dropdown-toggle',run:'click',},{trigger:'.dropdown-item:contains(Open)',run:"click",},{trigger:".o_knowledge_article_view_calendar_embedded_view.o_action",},{trigger:'.fc-view .o_event_title:contains("Item Article")',},{trigger:'.o_main_navbar .o_menu_toggle',run:"click",},{trigger:'.o_app[data-menu-xmlid="knowledge.knowledge_menu_root"]',run:'click',},{trigger:"[data-embedded='view']",},{trigger:'.o_knowledge_article_view_calendar_embedded_view .o_calendar_header .o_view_scale_selector button:contains("Month")',run:'click',},{trigger:'.o-dropdown--menu .o_scale_button_week',run:'click',},{trigger:'.fc-timegrid-event .o_event_title:contains("Item Article")',run:function(){const target=document.querySelector('.fc-timegrid-slot.fc-timegrid-slot-lane[data-time="09:00:00"]');dragDate(this.anchor,target);},},{trigger:'.fc-timegrid-event:contains("Item Article")',async run({hover}){const element=this.anchor.querySelector(`.fc-event-main`)
await hover(element);await new Promise(requestAnimationFrame);const resizer=this.anchor.querySelector(`.fc-event-resizer-end`);Object.assign(resizer.style,{display:"block",height:"1px",bottom:"0",});const target=document.querySelector('.fc-timegrid-slot.fc-timegrid-slot-lane[data-time="11:00:00"]');dragDate(resizer,target);},},{trigger:'.fc-timegrid-event',run:'dblclick',},{trigger:'.o_hierarchy_article_name input:value("Item Article")',},{trigger:'.o_widget_knowledge_properties_panel .o_property_field:contains("Start Property")',run:function(){const input=this.anchor.querySelector("input");if(!input.value.includes("09:00")){console.error('Item start date property has not been updated');}},},{trigger:'.o_widget_knowledge_properties_panel .o_property_field:contains("Stop Property")',run:function(){const input=this.anchor.querySelector("input");if(!input.value.includes("11:15")){console.error('Item stop date property has not been updated');}},},{trigger:'.o_widget_knowledge_properties_panel .o_property_field:contains("Text Property")',run:function(){const input=this.anchor.querySelector("input");if(!input.value.includes("Custom text")){console.error('Item text property has changed');}},},{trigger:".o_widget_knowledge_properties_panel .o_property_field:contains(Start Property)",run:"hover && click .o_widget_knowledge_properties_panel .o_property_field:contains(Start Property) .o_field_property_open_popover",},{trigger:'.o_field_property_definition .o_field_property_definition_delete',run:'click',},{trigger:'.modal-dialog .btn-primary',run:'click',},{trigger:'.o_knowledge_tree .o_article_name:contains("Article Items")',run:'click',},{trigger:'.o_knowledge_article_view_calendar_embedded_view .o_knowledge_item_calendar_nocontent',},{trigger:'body',run:()=>{unpatchDate();embeddedViewPatchUtil.after();},},...endKnowledgeTour()]});return __exports;});;

/* /knowledge/static/tests/tours/commands/knowledge_search_favorites_tour.js */
odoo.define('@knowledge/../tests/tours/commands/knowledge_search_favorites_tour',['@web/core/registry','@knowledge/../tests/tours/knowledge_tour_utils','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{endKnowledgeTour,openCommandBar}=require("@knowledge/../tests/tours/knowledge_tour_utils");const{stepUtils}=require("@web_tour/tour_utils");const embedKnowledgeKanbanViewSteps=function(article){return[{trigger:".o_app[data-menu-xmlid='knowledge.knowledge_menu_root']",run:"click",},{trigger:"[role='menuitem']:contains(Articles)",run:"click",},{trigger:".o_switch_view.o_kanban",run:"click",},{trigger:".o_kanban_renderer",},{trigger:".o_control_panel .o_cp_action_menus button",run:"click",},{trigger:".dropdown-menu .dropdown-toggle:contains(Knowledge)",run:function(){this.anchor.dispatchEvent(new Event("mouseenter"));},},{trigger:".dropdown-menu .dropdown-item:contains('Insert view in article')",run:"click",},{trigger:`.modal-dialog td.o_field_cell:contains(${article})`,run:"click",}];};registry.category("web_tour.tours").add("knowledge_items_search_favorites_tour",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),{trigger:".o_app[data-menu-xmlid='knowledge.knowledge_menu_root']",run:"click",},{trigger:".o_field_html",run:function(){const header=document.querySelector(".o_hierarchy_article_name input");if(header.value!=="Article 1"){console.error(`Wrong article: ${header.value}`);}},},{trigger:".odoo-editor-editable > h1",run:function(){openCommandBar(this.anchor);},},{trigger:".o-we-command-name:contains('Item Kanban')",run:"click",},{trigger:".modal-body input.form-control",run:"edit Items 1",},{trigger:"button:contains('Insert')",run:"click",},{trigger:"[data-embedded='view'] .o_control_panel:contains(Items 1)",},{trigger:".odoo-editor-editable > h1",run:function(){openCommandBar(this.anchor);},},{trigger:".o-we-command-name:contains('Item Kanban')",run:"click",},{trigger:".modal-body input.form-control",run:"edit Items 2",},{trigger:"button:contains('Insert')",run:"click",},{trigger:"[data-embedded='view'] .o_control_panel:contains(Items 2)",},...endKnowledgeTour(),],});registry.category("web_tour.tours").add("knowledge_search_favorites_tour",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),...embedKnowledgeKanbanViewSteps("Article 1"),{trigger:"[data-embedded='view']:has( .o_control_panel:contains(Articles)) .o_control_panel_breadcrumbs_actions .dropdown-toggle",run:"click",},{trigger:'.dropdown-item:contains(Edit)',run:"click",},{trigger:'.modal-dialog input.form-control',run:`edit Kanban 1`,},{trigger:"button:contains('Rename')",run:"click",},{trigger:'[data-embedded="view"] .o_control_panel:contains(Kanban 1)',},...stepUtils.toggleHomeMenu(),...embedKnowledgeKanbanViewSteps("Article 1"),{trigger:'[data-embedded="view"] .o_control_panel:contains(Articles)',},...endKnowledgeTour(),],});return __exports;});;

/* /knowledge/static/tests/tours/knowledge_article_comments_tour.js */
odoo.define('@knowledge/../tests/tours/knowledge_article_comments_tour',['@web/core/registry','@web/../tests/utils','@web_tour/tour_utils','@knowledge/../tests/tours/knowledge_tour_utils','@html_editor/utils/position','@html_editor/../tests/tours/helpers/editor'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{insertText}=require("@web/../tests/utils");const{stepUtils}=require("@web_tour/tour_utils");const{endKnowledgeTour}=require("@knowledge/../tests/tours/knowledge_tour_utils");const{boundariesIn}=require("@html_editor/utils/position");const{setSelection}=require("@html_editor/../tests/tours/helpers/editor");const addAnswerComment=(commentText)=>[{trigger:'.o-mail-Composer-input',run:async()=>{await insertText('.o-mail-Composer-input',commentText);}},{trigger:'.o-mail-Composer-send:enabled',run:"click",},{trigger:`.o-mail-Thread :contains(${commentText})`,}];registry.category('web_tour.tours').add('knowledge_article_comments',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="knowledge.knowledge_menu_root"]',run:"click",},{trigger:'section[data-section="workspace"] .o_article .o_article_name:contains("Sepultura")',run:"click",},{trigger:'.o_knowledge_comment_box[data-thread-id], .o_knowledge_comment_small_ui img',run:"click",},{trigger:'.o-mail-Thread :contains("Marc, can you check this?")',},{content:"Check that composer doesn't have paper plane button but has a send button",trigger:".o-mail-Composer:has(button.o-mail-Composer-send):not(:has(i.fa-paper-plane-o))",},...addAnswerComment("Sure thing boss, all done!"),{content:"Hover on first message to make actions visible and click on it",trigger:".o-mail-Message-core:first",run:"hover && click .o-mail-Message-actions:first",},{content:"Resolve Thread",trigger:".o-mail-Message-actions:first button[name=closeThread]",run:"click",},{content:"Wait for the composer to be fully closed",trigger:"body:not(:has(.o-mail-Thread))",},{content:"Select some text in the first paragraph",trigger:".note-editable p.o_knowledge_tour_first_paragraph",run:function(){const[anchorNode,anchorOffset,focusNode,focusOffset]=boundariesIn(this.anchor);setSelection({anchorNode,anchorOffset,focusNode,focusOffset});},},{trigger:'.o-we-toolbar button[name="expand_toolbar"]',run:"click",},{trigger:'.o-we-toolbar button[name="comments"]',run:"click",},{trigger:'.o_knowledge_comments_popover .o-mail-Composer-input',run:async()=>{await insertText('.o-mail-Composer-input','My Knowledge Comment');}},{trigger:'.o_knowledge_comments_popover .o-mail-Composer-send:enabled',run:"click",},{trigger:".note-editable p.o_knowledge_tour_first_paragraph a:not([data-id='undefined']):not(:visible)",},{trigger:'.o_knowledge_comment_box[data-thread-id] .o_knowledge_comment_small_ui img',},{trigger:'.btn-comments',run:"click",},{trigger:'.o-mail-Thread :contains("My Knowledge Comment")',},{trigger:'.o_knowledge_comments_panel select',run:"select resolved",},{trigger:'.o-mail-Thread :contains("Sure thing boss, all done!")',},{trigger:'.o_knowledge_comment_box',run:"click",},...addAnswerComment("Oops forgot to mention, will be done in task-112233"),...endKnowledgeTour()]});return __exports;});;

/* /knowledge/static/tests/tours/knowledge_cover_picker.js */
odoo.define('@knowledge/../tests/tours/knowledge_cover_picker',['@knowledge/../tests/tours/knowledge_tour_utils','@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{endKnowledgeTour}=require("@knowledge/../tests/tours/knowledge_tour_utils");const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");function moveCover(position){const cover=document.querySelector(".o_knowledge_cover img");cover.dispatchEvent(new PointerEvent("pointerdown"));document.dispatchEvent(new PointerEvent("pointermove",{clientY:position}));document.dispatchEvent(new PointerEvent("pointerup"));}
registry.category("web_tour.tours").add("knowledge_cover_selector_tour",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),{content:"Open Knowledge App",trigger:'.o_app[data-menu-xmlid="knowledge.knowledge_menu_root"]',run:"click",},{content:"Click on the 'New Article' button",trigger:".o_knowledge_create_article",run:"click",},{trigger:'.o_article_active:contains("Untitled")',},{content:"Set the name of the article",trigger:".o_hierarchy_article_name > input",run:"edit Birds && click body",},{content:"Make the add cover button visible (only visible on hover)",trigger:'.o_article_active:contains("Birds")',},{content:"click on toggle menu",trigger:".o_knowledge_header .dropdown-toggle",run:"click",},{content:"Click on add cover button",trigger:".dropdown-item:contains('Add Cover')",run:"click",},{trigger:".modal-body .unsplash_error",},{trigger:".o_upload_media_url_button",},{trigger:".modal-body .o_nocontent_help",},{content:"Change the search query to find odoo_logo file",trigger:".modal-body input.o_we_search",run:"edit odoo_logo",},{content:"Choose the odoo_logo cover",trigger:'.o_existing_attachment_cell .o_button_area[aria-label*="odoo_logo"]',run:"click",},{content:"Check cover has been added to the article and is initially centered, make the reposition cover button visible",trigger:'.o_knowledge_cover img[style="object-position: 50% 50%;"]',run:"hover && click .o_knowledge_reposition_cover",},{content:"Move the cover down and click on the 'Cancel' button",trigger:".o_reposition_hint",run:()=>{moveCover(1000);const undoButton=document.querySelector(".o_knowledge_undo_cover_move");setTimeout(()=>undoButton.dispatchEvent(new PointerEvent("pointerdown",{bubbles:true})),0);},},{trigger:".o_knowledge_cover:not(:has(.o_reposition_hint))",},{content:"Check that the undo button works as expected (cover should be centered)",trigger:'.o_knowledge_cover img[style="object-position: 50% 50%;"]',run:"hover && click .o_knowledge_reposition_cover",},{trigger:".o_reposition_hint",run:()=>{moveCover(1000);const saveButton=document.querySelector(".o_knowledge_save_cover_move");setTimeout(()=>saveButton.dispatchEvent(new PointerEvent("pointerdown",{bubbles:true})),0);},},{trigger:".o_knowledge_cover:not(:has(.o_reposition_hint))",},{content:"Check that the cover is positioned at the top",trigger:'.o_knowledge_cover img[style="object-position: 50% 0.01%;"]',run:"click",},{content:"Create another article",trigger:".o_knowledge_create_article",run:"click",},{trigger:'.o_article_active:contains("Untitled")',},{content:"Change the name of the article",trigger:".o_hierarchy_article_name > input",run:"edit odoo && click body",},{trigger:".o_article_active:contains(odoo)",},{content:"Go back to previous article",trigger:'.o_knowledge_sidebar .o_article_name:contains("Birds")',run:"click",},{trigger:'.o_article_active:contains("Birds")',},{content:"Check that the cover is still positioned at the top and make the replace cover visible",trigger:'.o_knowledge_cover img[style="object-position: 50% 0.01%;"]',run:"hover && click .o_knowledge_replace_cover",},{trigger:".modal-body .o_nocontent_help",},{trigger:".modal-footer .btn-secondary",run:"click",},{content:"Make the remove cover button visible and click on it",trigger:".o_knowledge_cover",run:"hover && click .o_knowledge_remove_cover",},{content:"Check cover has been removed from the article",trigger:".o_knowledge_body:not(:has(.o_widget_knowledge_cover))",},{content:"Open other article",trigger:".o_knowledge_sidebar .o_article_name:contains(odoo)",run:"click",},{trigger:".o_article_active:contains(odoo)",},{content:"Open options dropdown",trigger:".o_knowledge_header .dropdown-toggle",run:"click",},{content:"Click on add cover button",trigger:".dropdown-item:contains('Add Cover')",run:"click",},{trigger:'.modal-body .o_existing_attachment_cell .o_button_area[aria-label="odoo_logo.png"]',run:"click",},{content:"check the cover is in odoo article",trigger:".o_knowledge_cover",},{content:"Open previous article again",trigger:'.o_knowledge_sidebar .o_article_name:contains("Birds")',run:"click",},{content:"Open options dropdown",trigger:".o_knowledge_header .dropdown-toggle",run:"click",},{content:"Click on add cover button",trigger:".dropdown-item:contains('Add Cover')",run:"click",},{trigger:".modal-body .o_nocontent_help",},{content:"Check odoo logo is not shown as the search query does not match its name and remove search query",trigger:".modal-body input.o_we_search",run:"clear",},{content:"Check that Odoo logo is now shown in the cover selector, make the trash button visible and click on delete cover button",trigger:'.modal-body .o_existing_attachment_cell .o_button_area[aria-label="odoo_logo.png"]',run:`hover && click .modal-body .o_existing_attachment_cell:has(img[title="odoo_logo.png"]) .o_existing_attachment_remove`,},{content:"Confirm deletion of cover (should ask for confirmation)",trigger:".modal:contains(Confirmation) .modal-footer .btn-primary",run:"click",},{content:"Check that no cover is shown anymore in the cover selector",trigger:".modal:contains(choose a nice cover) .modal-body .o_we_existing_attachments:not(:has(.o_existing_attachment_cell))",},{content:"Close it",trigger:".modal:contains(choose a nice cover) .modal-footer .btn-secondary",run:"click",},{content:"Open other article to check that its cover has been removed since it has been deleted",trigger:".o_knowledge_sidebar .o_article_name:contains(odoo)",run:"click",},{trigger:".o_article_active:contains(odoo)",},{trigger:".o_knowledge_body:not(:has(.o_widget_knowledge_cover))",},...endKnowledgeTour(),],});return __exports;});;

/* /knowledge/static/tests/tours/knowledge_cover_random_unplash.js */
odoo.define('@knowledge/../tests/tours/knowledge_cover_random_unplash',['@knowledge/../tests/tours/knowledge_tour_utils','@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{endKnowledgeTour}=require("@knowledge/../tests/tours/knowledge_tour_utils");const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");function makeVisible(el){if(el){el.style.setProperty("visibility","visible","important");el.style.setProperty("opacity","1","important");el.style.setProperty("display","block","important");}}
registry.category("web_tour.tours").add('knowledge_random_cover_tour',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="knowledge.knowledge_menu_root"]',run:"click",},{trigger:'.o_knowledge_create_article',run:"click",},{trigger:'.o_article_active:contains("Untitled")',run:()=>makeVisible(document.querySelector('.o_knowledge_add_cover')),},{trigger:'.o_knowledge_add_cover',run:"click",},{trigger:'.o_knowledge_cover .o_knowledge_cover_image',run:()=>makeVisible(document.querySelector('.o_knowledge_replace_cover')),},{trigger:'.o_knowledge_replace_cover',run:"click",},{trigger:".modal-body .o_load_done_msg",},{trigger:'.modal-footer .btn-secondary',run:"click",},{trigger:'.o_knowledge_edit_cover_buttons',run:()=>makeVisible(document.querySelector('.o_knowledge_remove_cover')),},{trigger:'.o_knowledge_remove_cover',run:"click",},{trigger:'.o_hierarchy_article_name > input',run:"edit Birds && click body",},{trigger:'.o_article_active:contains("Birds")',run:()=>makeVisible(document.querySelector('.o_knowledge_add_cover')),},{trigger:'.o_knowledge_add_cover',run:"click",},{trigger:'.o_knowledge_cover .o_knowledge_cover_image',run:()=>makeVisible(document.querySelector('.o_knowledge_replace_cover')),},{trigger:'.o_knowledge_replace_cover',run:"click",},{trigger:".modal-body .o_load_more",},{trigger:'.modal-footer .btn-secondary',run:"click",},...endKnowledgeTour()]});return __exports;});;

/* /knowledge/static/tests/tours/knowledge_embedded_views_tour.js */
odoo.define('@knowledge/../tests/tours/knowledge_embedded_views_tour',['@web/core/registry','@web_tour/tour_utils','@knowledge/../tests/tours/knowledge_tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");const{endKnowledgeTour,openCommandBar}=require("@knowledge/../tests/tours/knowledge_tour_utils");registry.category("web_tour.tours").add('knowledge_embedded_view_filters_tour',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="knowledge.knowledge_menu_root"]',run:"click",},{trigger:'.odoo-editor-editable > p',run:function(){openCommandBar(this.anchor);},},{trigger:'.o-we-command-name:contains("Item List")',run:"click",},{trigger:'.btn-primary',run:"click",},{trigger:'tbody tr.o_data_row:nth-child(2)',},{trigger:'.o_searchview_input_container input',run:"edit 1",},{trigger:'li#1',run:"click",},{trigger:'tbody:not(tr.o_data_row:nth-child(2))',},{trigger:'tbody > tr > td[name="display_name"]',run:"click",},{trigger:'.o_hierarchy_article_name input:value("Child 1")',},{trigger:'.o_article .o_article_name:contains("EditorCommandsArticle")',run:"click",},{trigger:'.o_searchview_input_container > div',},{trigger:'tbody:not(tr.o_data_row:nth-child(2))',},...endKnowledgeTour()]});return __exports;});;

/* /knowledge/static/tests/tours/knowledge_history_tour.js */
odoo.define('@knowledge/../tests/tours/knowledge_history_tour',['@knowledge/../tests/tours/knowledge_tour_utils','@web/core/registry','@web_tour/tour_utils','@html_editor/html_migrations/html_migrations_utils'],function(require){'use strict';let __exports={};const{endKnowledgeTour}=require('@knowledge/../tests/tours/knowledge_tour_utils');const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");const{htmlEditorVersions}=require("@html_editor/html_migrations/html_migrations_utils");const VERSIONS=htmlEditorVersions();const CURRENT_VERSION=VERSIONS.at(-1);const testArticleName='Test history Article';function changeArticleContentAndSave(newContent){return[{trigger:'.note-editable.odoo-editor-editable h1',run:`editor ${newContent}`,},{trigger:'a[data-menu-xmlid="knowledge.knowledge_menu_home"]',run:"click",},{trigger:'.o_article:contains("'+testArticleName+'"):not(.o_article_active)',run:async()=>{await new Promise((r)=>setTimeout(r,300));},},{trigger:'.o_article:contains("'+testArticleName+'") a.o_article_name',run:"click",},{trigger:'.o_article_active:contains("'+testArticleName+'") ',}];}
registry.category("web_tour.tours").add('knowledge_history_tour',{url:'/odoo?debug=1,tests',steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="knowledge.knowledge_menu_root"]',run:"click",},{trigger:'.o_knowledge_create_article',run:"click",},{trigger:'section[data-section="private"] .o_article .o_article_name:contains("Untitled")',},...changeArticleContentAndSave(testArticleName),...changeArticleContentAndSave('Modified Title 01'),...changeArticleContentAndSave('Modified Title 02'),...changeArticleContentAndSave('Modified Title 03'),{trigger:'.o_knowledge_header .dropdown-toggle',run:"click",},{trigger:'.dropdown-item:contains("Open Version History")',run:"click",},{trigger:'.modal-header:contains("History")',run:"click",},{trigger:".modal .html-history-dialog.html-history-loaded",},{trigger:".html-history-dialog .revision-list .btn",run:function(){const items=document.querySelectorAll(".revision-list .btn");if(items.length!==5){throw new Error('Expect 5 Revisions in the history dialog, got '+items.length);}},},{trigger:'.history-container .history-content-view:contains("Modified Title 03")',run:"click",},{trigger:'.html-history-dialog .revision-list .btn:nth-child(4)',run:"click",},{trigger:".modal .html-history-dialog.html-history-loaded",},{trigger:'.history-container .history-content-view:contains("'+testArticleName+'")',run:"click",},{trigger:'.history-container .history-view-top-bar a:contains(Comparison)',run:"click",},{trigger:'.history-container .history-comparison-view',run:function(){const comparisonHtml=document.querySelector('.history-container .history-comparison-unified .o_readonly').innerHTML.replace(/ data-heading-link-id="[0-9a-fA-F]+"/,"");const correctHtml=`<h1 class="oe-hint" data-oe-version="${CURRENT_VERSION}"><added>Modified Title 03</added><removed>`+testArticleName+'</removed></h1>';if(comparisonHtml!==correctHtml){throw new Error('Expect comparison to be '+correctHtml+', got '+comparisonHtml);}}},{trigger:'.history-container .history-view-top-bar label:contains(Split)',run:"click",},{trigger:'.history-container .history-comparison-view',run:function(){const deletedElements=document.querySelectorAll('.history-container .history-comparison-split del');const addedElements=document.querySelectorAll('.history-container .history-comparison-split ins');if(deletedElements.length!==3){throw new Error('Expect 3 deletedElement in the splitted comparison, got '+deletedElements.length);}
if(addedElements.length!==3){throw new Error('Expect 3 deletedElement in the splitted comparison, got '+addedElements.length);}
if(deletedElements[0].parentElement.textContent!=="  Test history Article"){throw new Error('Expect deleted string to be "Test history Article", got '+deletedElements[0].parentElement.textContent);}
if(addedElements[0].parentElement.textContent!=="  Modified Title 03"){throw new Error('Expect added string to be "Modified Title 03", got '+addedElements[0].parentElement.textContent);}}},{trigger:'.modal-footer .btn-primary:enabled',run:"click",},{trigger:'.note-editable.odoo-editor-editable h1:contains("'+testArticleName+'")',run:"click",},...endKnowledgeTour()]});return __exports;});;

/* /knowledge/static/tests/tours/knowledge_main_flow_tour.js */
odoo.define('@knowledge/../tests/tours/knowledge_main_flow_tour',['@knowledge/../tests/tours/knowledge_tour_utils','@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{dragAndDropArticle,endKnowledgeTour,}=require("@knowledge/../tests/tours/knowledge_tour_utils");const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add('knowledge_main_flow_tour',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="knowledge.knowledge_menu_root"]',run:"click",},{trigger:'.o_knowledge_create_article',run:"click",},{trigger:'section[data-section="private"] .o_article .o_article_name:contains("Untitled")',},{trigger:'.note-editable.odoo-editor-editable',run:function(){const selection=document.getSelection();if(!this.anchor.contains(selection.anchorNode)){throw new Error("The autofocus doesn't work");}}},{trigger:'.note-editable.odoo-editor-editable h1',run:"editor My Private Article",},{trigger:'section[data-section="workspace"]',run:"hover && click section[data-section=workspace] .o_section_create",},{trigger:'section[data-section="private"] .o_article .o_article_name:contains("My Private Article")',},{trigger:'section[data-section="workspace"] .o_article .o_article_name:contains("Untitled")',},{trigger:'.note-editable.odoo-editor-editable',run:function(){const selection=document.getSelection();if(!this.anchor.contains(selection.anchorNode)){throw new Error("The autofocus doesn't work");}}},{trigger:'.o_hierarchy_article_name > input',run:'edit My Workspace Article && click body',},{trigger:'.note-editable.odoo-editor-editable',run:"editor Content of My Workspace Article",},{trigger:'.o_article:contains("My Workspace Article")',run:"hover && click .o_article:contains(My Workspace Article) a.o_article_create",},{trigger:'section[data-section="workspace"] .o_article .o_article_name:contains("Untitled")',},{trigger:'.note-editable.odoo-editor-editable',run:function(){const selection=document.getSelection();if(!this.anchor.contains(selection.anchorNode)){throw new Error("The autofocus doesn't work");}}},{trigger:'.o_hierarchy_article_name > input',run:"edit Child Article 1 && click body",},{trigger:'.o_article:contains("My Workspace Article")',run:"hover && click .o_article:contains(My Workspace Article) a.o_article_create",},{trigger:'section[data-section="workspace"] .o_article .o_article_name:contains("Untitled")',},{trigger:'.note-editable.odoo-editor-editable',run:function(){const selection=document.getSelection();if(!this.anchor.contains(selection.anchorNode)){throw new Error("The autofocus doesn't work");}}},{trigger:'.o_hierarchy_article_name > input',run:"edit Child Article 2 && click body",},{trigger:'.o_article_handle:contains("Child Article 2")',run:({queryOne})=>{dragAndDropArticle(queryOne('.o_article_handle:contains("Child Article 2")'),queryOne('.o_article_handle:contains("Child Article 1")'),);},},{trigger:'.o_article:has(.o_article_name:contains(My Workspace Article)) ul li:first:contains(Child Article 2)',},{trigger:'section[data-section="workspace"] .o_article .o_article_name:contains("My Workspace Article")',run:"click",},{trigger:'.o_knowledge_editor:contains("Content of My Workspace Article")',},{trigger:'.note-editable.odoo-editor-editable',run:function(){const selection=document.getSelection();if(!this.anchor.contains(selection.anchorNode)){throw new Error("The autofocus doesn't work");}}},{trigger:'.o_knowledge_header .btn:contains("Share")',run:"click",},{content:"click on 'Invite'",trigger:'.o_knowledge_permission_panel .btn:contains("Invite")',run:"click",},{content:"Type the invited person's name",trigger:".o_field_many2many_tags_email[name=partner_ids] input",run:"edit micheline@knowledge.com",},{content:"Open the simplified create form view",trigger:".o-autocomplete--dropdown-menu .o_m2o_dropdown_option_create_edit a",run:"click",},{content:"Give an email address to the partner",trigger:".modal .o_field_widget[name=email] input",run:"edit micheline@knowledge.com",},{content:"Save the new partner",trigger:".modal .o_form_button_save:contains(save)",run:"click",},{trigger:"body:not(:has(.modal:contains(create recipients)))",},{trigger:".modal .o_field_tags span.o_badge_text",},{content:"Submit the invite wizard",trigger:".modal button:contains(Invite)",run:"click",},{trigger:"body:not(:has(.modal:contains(invite people)))",},{trigger:".o_knowledge_permission_panel_members span:contains('micheline@knowledge.com')",},{trigger:'.o_knowledge_toggle_favorite',run:"click",},{trigger:'section[data-section="favorites"] .o_article .o_article_name:contains("My Workspace Article")',},{trigger:'section[data-section="private"] .o_article .o_article_name:contains("My Private Article")',run:"click",},{trigger:'.o_knowledge_editor:contains("My Private Article")',},{trigger:'.note-editable.odoo-editor-editable',run:function(){const selection=document.getSelection();if(!this.anchor.contains(selection.anchorNode)){throw new Error("The autofocus doesn't work");}}},{trigger:'.o_knowledge_toggle_favorite',run:"click",},{trigger:'.o_knowledge_toggle_favorite .fa-star',},{trigger:'section[data-section="favorites"] .o_article_handle:contains("My Private Article")',run:({queryOne})=>{dragAndDropArticle(queryOne('section[data-section="favorites"] .o_article_handle:contains("My Private Article")'),queryOne('section[data-section="favorites"] .o_article_handle:contains("My Workspace Article")'),);},},{trigger:'section[data-section="favorites"] ul li:first:contains(My Private Article)',},{trigger:'section[data-section="workspace"] .o_article .o_article_name:contains("My Workspace Article")',run:"click",},{trigger:':contains("Content of My Workspace Article")',},{trigger:'.note-editable.odoo-editor-editable',run:function(){const selection=document.getSelection();if(!this.anchor.contains(selection.anchorNode)){throw new Error("The autofocus doesn't work");}}},{trigger:'.o_knowledge_create_article',run:"click",},{trigger:'section[data-section="private"] .o_article .o_article_name:contains("Untitled")',},{trigger:'.note-editable.odoo-editor-editable',run:function(){const selection=document.getSelection();if(!this.anchor.contains(selection.anchorNode)){throw new Error("The autofocus doesn't work");}}},{trigger:'.o_hierarchy_article_name > input',run:"edit Article to be moved && click body",},{trigger:'.o_knowledge_header .dropdown-toggle',run:'click'},{trigger:'.dropdown-item:contains("Move To")',run:"click",},{trigger:'.o_select_menu_item:contains("Article 3")',run:"click",},{trigger:'.o_select_menu_toggler:contains("Article 3")',},{trigger:'.modal-content .btn-primary:contains("Move Article")',run:"click",},{trigger:'section[data-section="workspace"] .o_article .o_article_name:contains("Article to be moved")',run:'click'},{trigger:'.o_knowledge_sidebar_trash a:contains("Open the Trash")',run:"click",},{trigger:'.o_breadcrumb .active:contains("Trash")',},{trigger:'.o_data_row:first .o_data_cell[name="display_name"]:contains("Article 2")',},...endKnowledgeTour()]});return __exports;});;

/* /knowledge/static/tests/tours/knowledge_main_flow_tour_portal.js */
odoo.define('@knowledge/../tests/tours/knowledge_main_flow_tour_portal',['@knowledge/../tests/tours/knowledge_tour_utils','@web/core/browser/browser','@web/core/registry'],function(require){'use strict';let __exports={};const{dragAndDropArticle}=require('@knowledge/../tests/tours/knowledge_tour_utils');const{browser}=require("@web/core/browser/browser");const{registry}=require("@web/core/registry");let workspaceArticleResId;let privateArticleResId;function extractURLResID(url){return parseInt((url.pathname.match("/knowledge/article/([0-9]+)")||[]).at(1));}
registry.category("web_tour.tours").add('knowledge_main_flow_tour_portal',{url:'/knowledge/home',steps:()=>[{trigger:'.o_section_create',run:(actionHelper)=>{const url=new URL(browser.location);workspaceArticleResId=extractURLResID(url);if(!workspaceArticleResId){throw new Error(`Expected pathname to be like /knowledge/article/{id}, got ${url.pathname} instead.`);}
actionHelper.click();},},{trigger:'section[data-section="private"] .o_article .o_article_name:contains("Untitled")',run:()=>{const url=new URL(browser.location);const resId=extractURLResID(url);if(resId!==workspaceArticleResId+1){throw new Error(`Expected pathname to be like /knowledge/article/${workspaceArticleResId + 1}, got ${url.pathname} instead.`);}},},{trigger:'.o_hierarchy_article_name > input',run:"edit My Private Article && click body",},{trigger:'.note-editable.odoo-editor-editable',run:"editor Content of My Private Article",},{trigger:'body',run:()=>{if(document.querySelectorAll('section[data-section="workspace"] .o_article .o_article_name').length!==1){throw new Error("Internal Workspace Article is not supposed to be visible for portal user.");}}},{trigger:'.o_knowledge_search',run:"click",},{trigger:".o_article_search_dialog input",run:"edit Workspace Article",},{trigger:`.o_article_search_item:contains(Workspace Article)`,run:'click',},{trigger:'.o_knowledge_editor:contains("Content of Workspace Article")',},{trigger:'.note-editable.odoo-editor-editable',run:"editor Edited Content of Workspace Article",},{content:"Hover on Workspace Article to make create article visible",trigger:".o_article:contains(Workspace Article)",run:"hover && click .o_article:contains(Workspace Article) a.o_article_create",},{trigger:'section[data-section="workspace"] .o_article .o_article_name:contains("Untitled")',},{trigger:'.o_hierarchy_article_name > input',run:"edit Child Article 1 && click body",},{content:"create child article (2)",trigger:".o_article:contains(Workspace Article)",run:"hover && click .o_article:contains(Workspace Article) a.o_article_create",},{trigger:'section[data-section="workspace"] .o_article .o_article_name:contains("Untitled")',},{trigger:'.o_hierarchy_article_name > input',run:"edit Child Article 2 && click body",},{trigger:'section[data-section="workspace"] .o_article .o_article_name:contains("Workspace Article")',run:"click",},{trigger:'.o_knowledge_editor:contains("Edited Content of Workspace Article")',},{trigger:'.o_knowledge_toggle_favorite',run:"click",},{trigger:'div.o_favorite_container .o_article .o_article_name:contains("Workspace Article")',},{trigger:'section[data-section="private"] .o_article .o_article_name:contains("My Private Article")',run:"click",},{trigger:'.o_knowledge_editor:contains("My Private Article")',run:()=>{privateArticleResId=extractURLResID(new URL(browser.location));if(privateArticleResId===workspaceArticleResId){throw new Error(`Expected private article resId ${privateArticleResId} to be different from workspace article resId ${workspaceArticleResId}.`);}
browser.history.back();},},{trigger:'.o_knowledge_editor:contains("Edited Content of Workspace Article")',run:()=>{const resId=extractURLResID(new URL(browser.location));if(resId!==workspaceArticleResId){throw new Error(`Expected to be back on the workspace article with resId ${workspaceArticleResId}, got ${resId} instead.`)}
browser.history.forward();},},{trigger:'.o_knowledge_editor:contains("My Private Article")',run:()=>{const resId=extractURLResID(new URL(browser.location));if(resId!==privateArticleResId){throw new Error(`Expected to be back on the private article with resId ${privateArticleResId}, got ${resId} instead.`)}},},{trigger:'.o_knowledge_toggle_favorite',run:"click",},{trigger:'.o_knowledge_toggle_favorite .fa-star',},{trigger:'div.o_favorite_container .o_article_handle:contains("My Private Article")',run:({queryOne})=>{dragAndDropArticle(queryOne('div.o_favorite_container .o_article_handle:contains("My Private Article")'),queryOne('div.o_favorite_container .o_article_handle:contains("Workspace Article")'),);},},{trigger:'div.o_favorite_container ul li:first:contains("My Private Article")',}]});return __exports;});;

/* /knowledge/static/tests/tours/knowledge_pick_emoji_tour.js */
odoo.define('@knowledge/../tests/tours/knowledge_pick_emoji_tour',['@knowledge/../tests/tours/knowledge_tour_utils','@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{endKnowledgeTour}=require('@knowledge/../tests/tours/knowledge_tour_utils');const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add('knowledge_pick_emoji_tour',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="knowledge.knowledge_menu_root"]',run:"click",},{trigger:'.o_knowledge_create_article',run:"click",},{trigger:'section[data-section="private"] .o_article .o_article_name:contains("Untitled")',},{trigger:'.o_knowledge_header .dropdown-toggle',run:"click",},{trigger:'.dropdown-item:contains("Add Icon")',run:'click',},{trigger:'.o_knowledge_body .o_article_emoji',run:'click',},{trigger:'.o-Emoji[data-codepoints="😃"]',run:'click',},{trigger:'.o_knowledge_body .o_article_emoji:contains(😃)',},{trigger:'.o_knowledge_header .o_article_emoji:contains(😃)',},{trigger:'.o_knowledge_sidebar .o_article_emoji:contains(😃)',},...endKnowledgeTour()]});return __exports;});;

/* /knowledge/static/tests/tours/knowledge_properties_tour.js */
odoo.define('@knowledge/../tests/tours/knowledge_properties_tour',['@knowledge/../tests/tours/knowledge_tour_utils','@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{dragAndDropArticle,endKnowledgeTour,unfoldArticleFromSidebar}=require("@knowledge/../tests/tours/knowledge_tour_utils");const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add('knowledge_properties_tour',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="knowledge.knowledge_menu_root"]',run:"click",},unfoldArticleFromSidebar("ParentArticle"),{trigger:'.o_article .o_article_name:contains("ChildArticle")',run:'click',},{trigger:'.o_hierarchy_article_name input:value("ChildArticle")',},{trigger:'.o_knowledge_header .dropdown-toggle',run:'click',},{trigger:'.dropdown-item:contains("Add Properties")',run:'click',},{trigger:'.o_field_property_add button',run:'click'},{trigger:'.o_field_property_definition_header',run:"edit myproperty && click body",},{trigger:'.o_field_property_label:contains("myproperty")',},{trigger:'.o_knowledge_editor .odoo-editor-editable',run:'click',},{trigger:'.o_article .o_article_name:contains("InheritPropertiesArticle")',run:'click',},{trigger:'.o_hierarchy_article_name input:value("InheritPropertiesArticle")',run:({queryOne})=>{dragAndDropArticle(queryOne('.o_article_handle:contains("InheritPropertiesArticle")'),queryOne('.o_article_handle:contains("ChildArticle")'),);},},{trigger:'.o_widget_knowledge_properties_panel .o_field_property_label:contains("myproperty")',},...endKnowledgeTour()]});return __exports;});;

/* /knowledge/static/tests/tours/knowledge_readonly_favorite_tour.js */
odoo.define('@knowledge/../tests/tours/knowledge_readonly_favorite_tour',['@knowledge/../tests/tours/knowledge_tour_utils','@web/core/registry'],function(require){'use strict';let __exports={};const{dragAndDropArticle,endKnowledgeTour,}=require("@knowledge/../tests/tours/knowledge_tour_utils");const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("knowledge_readonly_favorite_tour",{steps:()=>[{trigger:".o_article_active:contains(Readonly Article 1)",},{trigger:".o_knowledge_toggle_favorite:has(.fa-star-o)",run:"click",},{trigger:".o_knowledge_toggle_favorite:has(.fa-star)",},{trigger:'section[data-section="favorites"]:contains("Readonly Article 1")',},{trigger:'.o_knowledge_sidebar .o_article_name:contains("Readonly Article 2")',run:"click",},{trigger:".o_article_active:contains(Readonly Article 2)",},{trigger:".o_knowledge_toggle_favorite:has(.fa-star-o)",run:"click",},{trigger:'section[data-section="favorites"] li:last:contains("Readonly Article 2")',run:({queryOne})=>dragAndDropArticle(queryOne('section[data-section="favorites"] li:last .o_article_handle'),queryOne('section[data-section="favorites"] li:first .o_article_handle')),},{trigger:'section[data-section="favorites"] li:first:contains("Readonly Article 2")',},{trigger:'section[data-section="favorites"] li:last:contains("Readonly Article 1")',},...endKnowledgeTour(),],});return __exports;});;

/* /knowledge/static/tests/tours/knowledge_readonly_item_kanban_tour.js */
odoo.define('@knowledge/../tests/tours/knowledge_readonly_item_kanban_tour',['@knowledge/../tests/tours/knowledge_tour_utils','@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{endKnowledgeTour}=require("@knowledge/../tests/tours/knowledge_tour_utils");const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add('knowledge_readonly_item_kanban_tour',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="knowledge.knowledge_menu_root"]',run:"click",},{trigger:'[data-embedded="view"]',run:function(){this.anchor.scrollIntoView();},},{trigger:'[data-embedded="view"] .o_kanban_renderer',},{trigger:'.o_control_panel_main:not(:has(.o-kanban-button-new))',},...endKnowledgeTour()]});return __exports;});;

/* /knowledge/static/tests/tours/knowledge_readonly_item_list_tour.js */
odoo.define('@knowledge/../tests/tours/knowledge_readonly_item_list_tour',['@knowledge/../tests/tours/knowledge_tour_utils','@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{endKnowledgeTour}=require("@knowledge/../tests/tours/knowledge_tour_utils");const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add('knowledge_readonly_item_list_tour',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="knowledge.knowledge_menu_root"]',run:"click",},{trigger:'[data-embedded="view"]',run:function(){this.anchor.scrollIntoView();},},{trigger:'[data-embedded="view"] .o_list_renderer',},{trigger:'.o_control_panel_main:not(:has(.o_list_button_add))',},...endKnowledgeTour()]});return __exports;});;

/* /knowledge/static/tests/tours/knowledge_resequence_children_of_readonly_parent_tour.js */
odoo.define('@knowledge/../tests/tours/knowledge_resequence_children_of_readonly_parent_tour',['@knowledge/../tests/tours/knowledge_tour_utils','@web/core/registry'],function(require){'use strict';let __exports={};const{dragAndDropArticle,endKnowledgeTour,unfoldArticleFromSidebar}=require('@knowledge/../tests/tours/knowledge_tour_utils');const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add('knowledge_resequence_children_of_readonly_parent_tour',{steps:()=>[unfoldArticleFromSidebar("Readonly Parent"),{trigger:"li.o_article:has(li:nth-child(1):contains(Child 1)):has(li:nth-child(2):contains(Child 2))",},{trigger:'.o_article_active:contains(Readonly Parent)',run:function(){const children=this.anchor.parentElement.querySelectorAll(".o_article_name");dragAndDropArticle(children[2],children[1]);},},{trigger:"li.o_article:has(li:nth-child(1):contains(Child 2)):has(li:nth-child(2):contains(Child 1))",},{trigger:'.o_article_active:contains(Readonly Parent)',run:function(){const child1=this.anchor.parentElement.querySelectorAll(".o_article_name")[2]
dragAndDropArticle(child1,this.anchor);},},{trigger:'.o_section:contains(Workspace):has(li:nth-child(1):contains(Child 1)):has(li:nth-child(2):contains(Readonly Parent))',},...endKnowledgeTour()]});return __exports;});;

/* /knowledge/static/tests/tours/knowledge_sidebar_readonly_tour.js */
odoo.define('@knowledge/../tests/tours/knowledge_sidebar_readonly_tour',['@knowledge/../tests/tours/knowledge_tour_utils','@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{dragAndDropArticle}=require("@knowledge/../tests/tours/knowledge_tour_utils");const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add("knowledge_sidebar_readonly_tour",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="knowledge.knowledge_menu_root"]',run:"click",},{trigger:'.o_knowledge_tree .o_article:contains("Workspace Article") + .o_article:contains("Private Article")',},{trigger:'.o_article.readonly .o_article_handle:contains("Private Article") .o_article_icon',run:'hover && click .o_article.readonly .o_article_handle:contains("Private Article") .o_article_caret .fa-caret-right',},{trigger:'.o_article:contains("Private Child")',run:({queryOne})=>{dragAndDropArticle(queryOne('section[data-section="workspace"] .o_article_name:contains("Workspace Article")'),queryOne('section[data-section="workspace"] .o_article_name:contains("Private Article")'));},},{trigger:'.modal-title:contains("Move cancelled")',},{trigger:".modal-footer .btn-primary",run:"click",},{trigger:'.o_knowledge_tree .o_article:contains("Workspace Article") + .o_article:contains("Private Article")',run:({queryOne})=>{dragAndDropArticle(queryOne('section[data-section="workspace"] .o_article_name:contains("Private Article")'),queryOne('section[data-section="workspace"] .o_article_name:contains("Workspace Article")'));},},{trigger:'.o_knowledge_tree .o_article:contains("Workspace Article") + .o_article:contains("Private Article")',},{trigger:'.o_article:contains("Private Article") .o_article_emoji:contains("📄")',run:"click",},{trigger:"body:not(:has(.o-EmojiPicker))",},],});return __exports;});;

/* /knowledge/static/tests/tours/knowledge_sidebar_tour.js */
odoo.define('@knowledge/../tests/tours/knowledge_sidebar_tour',['@knowledge/../tests/tours/knowledge_tour_utils','@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{changeInternalPermission,dragAndDropArticle,openPermissionPanel,}=require("@knowledge/../tests/tours/knowledge_tour_utils");const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add('knowledge_sidebar_tour',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="knowledge.knowledge_menu_root"]',run:"click",},{trigger:'section[data-section="workspace"]',run:"hover && click section[data-section=workspace] .o_section_create",},{trigger:'section[data-section="workspace"] .o_article .o_article_name:contains("Untitled")',},{trigger:'.o_hierarchy_article_name > input',run:"edit Workspace Article && click body",},{trigger:'.o_article_active:contains("Workspace Article")',},{trigger:'.note-editable.odoo-editor-editable',run:"editor Content of Workspace Article",},{trigger:'section[data-section="private"]',run:"hover && click section[data-section=private] .o_section_create",},{trigger:'section[data-section="private"] .o_article .o_article_name:contains("Untitled")',},{trigger:'.o_hierarchy_article_name > input',run:"edit Private Article && click body",},{trigger:'.o_article_active:contains("Private Article")',},{content:"Check that the shared section does not exists",trigger:'.o_knowledge_tree:not(:has(section[data-section="shared"]))',},{content:"First create a private one",trigger:"section[data-section=private]",run:"hover && click section[data-section=private] .o_section_create",},{trigger:'.o_article_active:contains("Untitled")',},{trigger:'.o_hierarchy_article_name > input',run:"edit Shared Article && click body",},{trigger:'.o_knowledge_header button:contains("Share")',run:"click",},{trigger:'.o_knowledge_permission_panel .btn:contains("Invite")',run:"click",},{trigger:'.o_field_many2many_tags_email[name=partner_ids] input',run:"edit henri@knowledge.com",},{trigger:'.o-autocomplete--dropdown-menu .o_m2o_dropdown_option_create_edit a',run:"click",},{trigger:".modal:not(.o_inactive_modal) .o_field_widget[name=email] input",run:"edit henri@knowledge.com",},{trigger:".modal:not(.o_inactive_modal) .o_form_button_save",run:"click",},{trigger:".o_field_tags span.o_badge_text",},{trigger:".modal:not(.o_inactive_modal) button:contains(Invite)",run:"click",},{content:"Close permission panel after that the wizard closed",trigger:"body:not(:has(.modal:contains(invite))",},{content:`Check that the article has been added to a new "Shared" section`,trigger:"section[data-section=shared]:contains(Shared Article)",},{content:"Hover on Workspace Article to make create article visible",trigger:".o_article:contains(Workspace Article)",run:"hover && click .o_article:contains(Workspace Article) a.o_article_create",},{content:"Check that the child has been added",trigger:'.o_article:contains("Workspace Article") .o_article:contains("Untitled")',},{content:"Rename the article",trigger:".o_hierarchy_article_name > input",run:"edit Workspace Child && click body",},{content:"Hover on Private Article to make create article visible",trigger:".o_article:contains(Private Article)",run:"hover && click .o_article:contains(Private Article) a.o_article_create",},{content:"Check that the child has been added",trigger:".o_article:contains(Private Article) .o_article:contains(Untitled)",},{trigger:'.o_hierarchy_article_name > input',run:"edit Private Child 1 && click body",},{content:"Hover on Shared Article to make create article visible",trigger:".o_article:contains(Shared Article)",run:"hover && click .o_article:contains(Shared Article) a.o_article_create",},{content:"Check that the child has been added",trigger:".o_article:contains(Shared Article) .o_article:contains(Untitled)",},{trigger:'.o_hierarchy_article_name > input',run:"edit Shared Child && click body",},{trigger:'.o_article_name:contains("Workspace Article")',run:"click",},{trigger:'.o_article_active:contains("Workspace Article")',},{trigger:'.note-editable.odoo-editor-editable:contains("Content of Workspace Article")',},{trigger:'.o_knowledge_search',run:"click",},{trigger:'.o_command_palette_search input',run:'edit Private Article',},{trigger:'.o_command_name:not(.small):contains("Private Article")',run:"click",},{trigger:'.o_article_active .o_article_name:contains("Private Article")',},{trigger:'.o_knowledge_sidebar_trash a:contains("Open the Trash")',run:"click",},{trigger:'.o_last_breadcrumb_item.active:contains("Trash")',},{trigger:'.breadcrumb-item.o_back_button',run:"click",},{trigger:'.o_knowledge_tree:not(:has(section[data-section="favorites"]))',},{trigger:'.o_knowledge_toggle_favorite',run:"click",},{trigger:'section[data-section="favorites"] .o_article:contains("Private Article")',},{trigger:'.o_knowledge_toggle_favorite',run:"click",},{trigger:'.o_knowledge_toggle_favorite .fa-star-o',},{trigger:'.o_knowledge_tree:not(:has(section[data-section="favorites"]))',run:"click",},{trigger:'.o_knowledge_toggle_favorite',run:"click",},{trigger:'section[data-section="favorites"] .o_article:not(:has(.o_article))',},{trigger:'section[data-section="favorites"] .o_article_handle:contains("Private Article") .o_article_icon',run:'hover && click section[data-section="favorites"] .o_article_handle:contains("Private Article") .o_article_caret .fa-caret-right',},{trigger:'section[data-section="favorites"] .o_article_handle:contains("Private Article") .o_article_caret:not(:visible) .fa-caret-down',},{trigger:'section[data-section="favorites"] .o_article:contains("Private Article") .o_article_name:contains("Private Child 1")',},{trigger:'section[data-section="favorites"] .o_article_handle:contains("Private Article") .o_article_icon',run:'hover && click section[data-section="favorites"] .o_article_handle:contains("Private Article") .o_article_caret .fa-caret-down',},{trigger:'section[data-section="favorites"] .o_article_handle:contains("Private Article") .o_article_caret:not(:visible) .fa-caret-right',},{content:"Check that caret changed and that child is hidden again",trigger:'section[data-section="favorites"] .o_article:not(:has(.o_article))',},{content:"Check that article in main tree is still unfolded",trigger:'section[data-section="private"] .o_article:contains("Private Child 1")',},{trigger:'section[data-section="favorites"] .o_article_handle:contains("Private Article") .o_article_caret:not(:visible) .fa-caret-right',},{content:"Hover on Favorites Private Article to make create article visible",trigger:"section[data-section=favorites] .o_article:contains(Private Article)",run:"hover && click section[data-section=favorites] .o_article:contains(Private Article) a.o_article_create",},{content:"Check that article has been unfolded",trigger:'section[data-section="favorites"] .o_article:contains("Private Article") .o_article_caret:not(:visible) .fa-caret-down',},{trigger:'section[data-section="favorites"] .o_article:contains("Private Article") .o_article_name:contains("Private Child 1")',},{trigger:'section[data-section="favorites"] .o_article:contains("Private Article") .o_article_name:contains("Untitled")',},{trigger:'section[data-section="private"] .o_article:contains("Private Article") .o_article_name:contains("Untitled")',},{trigger:'.o_hierarchy_article_name > input',run:"edit Private Child 2 && click body",},{trigger:'section[data-section="favorites"] .o_article_name:contains("Private Child 2")',},{trigger:'section[data-section="private"] .o_article_name:contains("Private Child 2")',},{trigger:'section[data-section="private"] .o_article_caret:not(:visible) .fa-caret-down',},{content:"Click on the caret (should be caret down)",trigger:'section[data-section="private"] .o_article_handle:contains("Private Article") .o_article_icon',run:'hover && click section[data-section="private"] .o_article_handle:contains("Private Article") .o_article_caret .fa-caret-down',},{trigger:'section[data-section="private"] .o_article_caret:not(:visible) .fa-caret-right',},{content:"Check that caret changed, and that children are hidden, and that favorite has not been folded",trigger:'section[data-section="private"] .o_article:not(:has(.o_article))',},{trigger:'section[data-section="favorites"] .o_article_handle:contains("Private Article") .o_article_caret:not(:visible) .fa-caret-down',},{trigger:'section[data-section="favorites"] .o_article .o_article',run:"click",},{trigger:'section[data-section="favorites"] .o_article_handle:contains("Private Article") .o_article_icon',run:'hover &&  click section[data-section="favorites"] .o_article_handle:contains("Private Article") .o_article_caret .fa-caret-down',},{trigger:'section[data-section="private"] .o_article_handle:contains("Private Article") .o_article_icon',run:'hover && click section[data-section="private"] .o_article_handle:contains("Private Article") .o_article_caret .fa-caret-right',},{trigger:'section[data-section="private"] .o_article_handle:contains("Private Article") .o_article_caret:not(:visible) .fa-caret-down',},{trigger:'section[data-section="private"] .o_article .o_article',},{trigger:'section[data-section="favorites"] .o_article_handle:contains("Private Article") .o_article_caret:not(:visible) .fa-caret-right',},{trigger:'section[data-section="favorites"] .o_article:not(:has(.o_article))',},{trigger:'section[data-section="private"] .o_article_handle:contains("Private Article") .o_article_icon',run:'hover && click section[data-section="private"] .o_article_handle:contains("Private Article") .o_article_caret .fa-caret-down',},{trigger:'section[data-section="private"] .o_article_handle:contains("Private Article") .o_article_caret:not(:visible) .fa-caret-right',},{content:"Hover on Private Section => Private Article to make create article visible",trigger:"section[data-section=private] .o_article:contains(Private Article)",run:"hover && click section[data-section=private] .o_article:contains(Private Article) a.o_article_create",},{trigger:'section[data-section="private"] .o_article_caret:not(:visible) .fa-caret-down',},{content:"Check that article has been unfolded and that previously existing children are shown",trigger:'section[data-section="private"] .o_article .o_article:contains("Private Child 1")',},{trigger:'section[data-section="favorites"] .o_article .o_article:contains("Untitled")',},{trigger:'section[data-section="private"] .o_article .o_article:contains("Untitled")',},{trigger:'.o_hierarchy_article_name > input',run:'edit Private Child 3 && click body',},{trigger:'.o_knowledge_header .dropdown-toggle',run:"click",},{trigger:'.o_knowledge_options_dropdown .dropdown-item:contains("Add Icon")',run:"click",},{trigger:".o_article_active .o_article_emoji:not(:contains(📄))",},{trigger:'.o_knowledge_body div[name="icon"]',run:()=>{const bodyIcon=document.querySelector('.o_knowledge_body div[name="icon"]').innerText;const sidebarIcon=document.querySelector('.o_article_active .o_article_emoji').innerText;if(bodyIcon!==sidebarIcon){console.error("Sidebar icon has not been updated.");}},},{trigger:'.o_article_name:contains("Workspace Child")',run:"click",},{trigger:'.o_knowledge_header .dropdown-toggle',run:"click",},{trigger:'.o_knowledge_options_dropdown .dropdown-item:contains("Convert")',run:"click",},{trigger:'section[data-section="workspace"] .o_article:contains("Workspace Article")',},{trigger:'section[data-section="workspace"] .o_article:not(:has(.o_article))',},{trigger:'.o_knowledge_toggle_favorite',run:"click",},{trigger:'section[data-section="favorites"] .o_article:contains("Workspace Child")',},{trigger:'.o_knowledge_header .dropdown-toggle',run:"click",},{trigger:'.o_knowledge_options_dropdown .dropdown-item:contains("Convert")',run:"click",},{trigger:'section[data-section="workspace"] .o_article:contains("Workspace Child")',},{trigger:'.o_knowledge_header .dropdown-toggle',run:"click",},{trigger:'.o_knowledge_options_dropdown .dropdown-item:contains("Convert")',run:"click",},{trigger:'section[data-section="workspace"] .o_article:contains("Workspace Article")',},{trigger:'section[data-section="workspace"] .o_article:not(:has(.o_article))',},{trigger:'section[data-section="favorites"] .o_article:contains("Workspace Child")',},{content:"Open the shared child article",trigger:".o_article_name:contains(Shared Child)",run:"click",},{trigger:".o_article_active:contains('Shared Child')",},{content:"Open the share dropdown",trigger:".o_knowledge_header button:contains('Share')",run:"click",},{content:"Open the member dropdown",trigger:".o_knowledge_permission_panel_members .dropdown-toggle",run:"click",},{content:"Remove the member",trigger:".o_knowledge_permission_panel_remove_member",run:"click",},{content:"Confirm restriction",trigger:".modal:not(.o_inactive_modal) .modal-footer .btn-primary",run:"click",},{trigger:"body:not(:has(.modal))",},{trigger:'section[data-section="shared"] .o_article .o_article',},...changeInternalPermission('write'),{trigger:'section[data-section="shared"] .o_article .o_article',},{trigger:'.o_article_name:contains("Shared Article")',run:"click",},{trigger:'.o_article_active:contains("Shared Article")',},...changeInternalPermission('write'),{trigger:'section[data-section="workspace"] .o_article:contains("Shared Article")',},...changeInternalPermission('none'),{trigger:'section[data-section="shared"] .o_article:contains("Shared Article")',},...openPermissionPanel,{trigger:'.o_knowledge_permission_panel_members > div:contains("Guest") .dropdown-toggle',run:'click',},{trigger:'.o_knowledge_permission_panel_remove_member',run:'click',},{trigger:'section[data-section="private"] .o_article:contains("Shared Article")',},...openPermissionPanel,,{trigger:'.o_knowledge_permission_panel .btn:contains("Invite")',run:"click",},{trigger:'.o_field_many2many_tags_email[name=partner_ids] input',run:"edit henri@knowledge.com",},{trigger:'.o-autocomplete--dropdown-menu.show',},{trigger:'.o-autocomplete--dropdown-item:contains("henri@")',run:"click",},{trigger:'.o_field_tags span.o_badge_text',},{trigger:".modal button:contains(Invite)",run:"click",},{trigger:"body:not(:has(.modal))",},{content:"Open private child",trigger:".o_article_name:contains(Private Child 2)",run:"click",},{trigger:'.o_article_active:contains("Private Child 2")',},...changeInternalPermission('read'),{trigger:'section[data-section="private"] .o_article .o_article:contains("Private Child 2")',},{trigger:'.o_article_name:contains("Private Article")',run:"click",},{trigger:'.o_article_active:contains("Private Article")',},...changeInternalPermission('read'),{trigger:'section[data-section="workspace"] .o_article:contains("Private Article")',},...changeInternalPermission('write'),{trigger:'section[data-section="workspace"] .o_article:contains("Private Article")',},...changeInternalPermission('read'),{trigger:'section[data-section="workspace"] .o_article:contains("Private Article")',},...changeInternalPermission('none'),{trigger:'section[data-section="private"] .o_article:contains("Private Article")',},{trigger:'section[data-section="private"] .o_article .o_article:first:contains("Private Child 1")',run:({queryOne})=>{dragAndDropArticle(queryOne('.o_section[data-section="private"] .o_article_name:contains("Private Child 3")'),queryOne('.o_section[data-section="private"] .o_article_name:contains("Private Child 1")'),);},},{trigger:'section[data-section="private"] .o_article .o_article:first:contains("Private Child 3")',},{trigger:'section[data-section="favorites"] .o_article .o_article:first:contains("Private Child 3")',run:"click",},{trigger:'.o_article_name:contains("Private Child 2")',run:"click",},{trigger:'.o_article_active:contains("Private Child 2")',},{trigger:'.o_knowledge_header .dropdown-toggle',run:"click",},{trigger:'.o_knowledge_options_dropdown .dropdown-item:contains("Add Properties")',},{trigger:'section[data-section="private"] .o_article:first:contains("Private Article")',run:({queryOne})=>{dragAndDropArticle(queryOne('.o_section[data-section="private"] .o_article_name:contains("Private Child 2")'),queryOne('.o_section[data-section="private"] .o_article_name:contains("Private Article")'),);},},{trigger:'.o_section[data-section="private"] ul li:first:contains("Private Child 2") .o_article_active',},{trigger:'.o_section[data-section="private"] .o_article:not(:has(.o_article:contains("Private Child 2")))',},{trigger:'.o_section[data-section="favorites"]:not(:has(.o_article:contains("Private Child 2")))',},{trigger:'.o_knowledge_header .dropdown-toggle',async run(helpers){await new Promise((resolve)=>setTimeout(resolve,1000));await helpers.click();}},{trigger:'.o_knowledge_options_dropdown .dropdown-item:contains("Add Properties").o_disabled_option',},{trigger:'.o_section[data-section="private"] .o_article:contains("Private Child 2") + .o_article:contains("Private Article")',run:({queryOne})=>{dragAndDropArticle(queryOne('.o_section[data-section="private"] .o_article_name:contains("Private Article")'),queryOne('.o_section[data-section="private"] .o_article_name:contains("Private Child 2")'),);},},{trigger:'.o_section[data-section="private"] .o_article:contains("Private Article") + .o_article:contains("Private Child 2")',},{content:"Create a new article",trigger:"section[data-section=private]",run:"hover && click section[data-section=private] .o_section_create",},{trigger:'.o_article_active:contains("Untitled")',},{trigger:'.o_hierarchy_article_name > input',run:"edit Private Child 4 && click body",},{trigger:'.o_article_active:contains("Private Child 4")',run:({queryOne})=>{dragAndDropArticle(queryOne('section[data-section="private"] .o_article_name:contains("Private Child 4")'),queryOne('section[data-section="private"] .o_article_name:contains("Private Child 1")'),);},},{trigger:'section[data-section="private"] .o_article:contains("Private Child 4") + .o_article:contains("Private Child 1")',},{trigger:'section[data-section="private"] .o_article:contains("Private Child 3") + .o_article:contains("Private Child 4")',},{trigger:'section[data-section="favorites"] .o_article:contains("Private Child 4") + .o_article:contains("Private Child 1")',},{trigger:'section[data-section="favorites"] .o_article:contains("Private Child 3") + .o_article:contains("Private Child 4")',},{trigger:'section[data-section="workspace"] .o_article:contains("Workspace Article")',run:({queryOne})=>{dragAndDropArticle(queryOne('section[data-section="workspace"] .o_article:contains("Workspace Article")'),queryOne('section[data-section="private"]'),);},},{trigger:'.modal-footer .btn-primary',run:"click",},{trigger:'section[data-section="workspace"]:not(:has(.o_article:contains("Workspace Article")))',},{trigger:'section[data-section="private"] .o_article:contains("Workspace Article")',},{trigger:'section[data-section="workspace"] .o_knowledge_empty_info',},{trigger:'.o_knowledge_tree',run:({queryOne})=>{dragAndDropArticle(queryOne('section[data-section="private"] .o_article_name:contains("Workspace Article")'),queryOne('section[data-section="workspace"] .o_section_header'),);},},{content:"Cancel the move",trigger:".modal-footer .btn-secondary:enabled",run:"click",},{trigger:'section[data-section="workspace"]:not(:has(.o_article:contains("Workspace Article")))',},{trigger:'section[data-section="private"] .o_article:contains("Workspace Article")',},{trigger:'.o_knowledge_tree',run:({queryOne})=>{dragAndDropArticle(queryOne('section[data-section="private"] .o_article_name:contains("Workspace Article")'),queryOne('section[data-section="workspace"]'),);},},{trigger:'.modal-footer .btn-primary',run:"click",},{trigger:'section[data-section="private"]:not(:has(.o_article:contains("Workspace Article")))',},{trigger:'section[data-section="workspace"] .o_article:contains("Workspace Article")',},{trigger:'section[data-section="workspace"]:not(:has(.o_knowledge_empty_info))',},{trigger:'.o_article:contains("Private Article")',run:({queryOne})=>{dragAndDropArticle(queryOne('section[data-section="private"] .o_article:contains("Private Article")'),queryOne('section[data-section="shared"]'),);},},{trigger:'.modal-title:contains("Move cancelled")',},{trigger:'.modal-footer .btn-primary',run:"click",},{content:"Create a new shared article",trigger:"section[data-section=private]",run:"hover && click  section[data-section=private] .o_section_create",},{trigger:'.o_article_active:contains("Untitled")',},{trigger:'.o_hierarchy_article_name > input',run:"edit Shared 2 && click body",},{trigger:'.o_knowledge_header button:contains("Share")',run:"click",},{trigger:'.o_knowledge_permission_panel .btn:contains("Invite")',run:"click",},{trigger:'.o_field_many2many_tags_email[name=partner_ids] input',run:'edit henri@knowledge.com',},{trigger:'.o-autocomplete--dropdown-menu.show',},{trigger:'.o-autocomplete--dropdown-item:contains("henri@")',run:"click",},{trigger:'.o_field_tags span.o_badge_text',},{trigger:".modal button:contains(Invite)",run:"click",},{trigger:'section[data-section="shared"] .o_article:contains("Shared Article") + .o_article:contains("Shared 2")',run:({queryOne})=>{dragAndDropArticle(queryOne('section[data-section="shared"] .o_article_name:contains("Shared 2")'),queryOne('section[data-section="shared"] .o_article_name:contains("Shared Article")'),);},},{trigger:'section[data-section="shared"] .o_article:contains("Shared 2") + .o_article:contains("Shared Article")',},{content:"Create a new article",trigger:"section[data-section=private]",run:"hover && click section[data-section=private] .o_section_create",},{trigger:'.o_article_active:contains("Untitled")',},{trigger:'.o_hierarchy_article_name > input',run:"edit Moved to Share && click body",},{trigger:'.o_article_active:contains("Moved to Share")',run:({queryOne})=>{dragAndDropArticle(queryOne('section[data-section="private"] .o_article_name:contains("Moved to Share")'),queryOne('section[data-section="shared"] .o_article_name:contains("Shared Child")'),);},},{content:"Moving under a shared article should ask for confirmation",trigger:'.modal .modal-footer .btn-primary',run:"click",},{trigger:'section[data-section="private"]:not(:has(.o_article:contains("Moved to Share")))',},{trigger:'section[data-section="shared"] .o_article .o_article:contains("Moved to Share")',},{trigger:'.o_knowledge_tree',run:({queryOne})=>{dragAndDropArticle(queryOne('section[data-section="shared"] .o_article_name:contains("Moved to Share")'),queryOne('section[data-section="shared"] .o_article_name:contains("Shared Article")'),);},},{trigger:'section[data-section="shared"] .o_article:contains("Moved to Share") + .o_article:contains("Shared Article")',run:({queryOne})=>{dragAndDropArticle(queryOne('section[data-section="shared"] .o_article_name:contains("Moved to Share")'),queryOne('section[data-section="shared"] .o_article_name:contains("Shared Article")'),);},},{trigger:'section[data-section="private"]:not(:has(.o_article:contains("Moved to Share")))',},{trigger:'section[data-section="shared"] .o_article .o_article:contains("Moved to Share")',},{trigger:'.o_knowledge_tree',run:({queryOne})=>{dragAndDropArticle(queryOne('section[data-section="private"] .o_article_name:contains("Private Child 2")'),queryOne('.o_section.o_knowledge_sidebar_trash'),);},},{trigger:'.o_knowledge_tree:not(:has(.o_article:contains("Private Child 2")))',},{trigger:'.o_article_active:contains("Moved to Share")',run:({queryOne})=>{dragAndDropArticle(queryOne('section[data-section="shared"] .o_article_name:contains("Shared Article")'),queryOne('.o_section.o_knowledge_sidebar_trash'),);},},{trigger:'.o_knowledge_tree:not(:has(.o_article:contains("Shared Article")))',},{trigger:'.o_knowledge_tree .o_article:first:has(.o_article_active)',},{trigger:'section[data-section="favorites"] .o_article:contains("Private Article") + .o_article:contains("Workspace Child")',run:({queryOne})=>{dragAndDropArticle(queryOne('section[data-section="favorites"] .o_article_name:contains("Workspace Child")'),queryOne('section[data-section="favorites"] .o_article_name:contains("Private Article")'),);},},{trigger:'section[data-section="favorites"] .o_article:contains("Workspace Child") + .o_article:contains("Private Article")',}]});return __exports;});;

/* /knowledge/static/tests/tours/knowledge_template_tour.js */
odoo.define('@knowledge/../tests/tours/knowledge_template_tour',['@knowledge/../tests/tours/knowledge_tour_utils','@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{endKnowledgeTour}=require("@knowledge/../tests/tours/knowledge_tour_utils");const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add("knowledge_load_template",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="knowledge.knowledge_menu_root"]',run:"click",},{trigger:'.o_knowledge_create_article',run:"click",},{trigger:'.o_knowledge_helper .o_knowledge_load_template',run:"click",},{trigger:'.o_knowledge_template_selector div:contains("My Template")',run:"click",},{trigger:'button:contains("Load Template")',run:"click",},{trigger:'.o_knowledge_body .o_article_emoji:contains(📚)',},{trigger:'.o_hierarchy_article_name input:value("My Template")',},{trigger:'.o_knowledge_body .note-editable:contains(Lorem ipsum dolor sit amet, consectetur adipisicing elit.)',},...endKnowledgeTour()]});return __exports;});;

/* /knowledge/static/tests/tours/knowledge_tour_utils.js */
odoo.define('@knowledge/../tests/tours/knowledge_tour_utils',['@knowledge/components/sidebar/sidebar','@web_tour/tour_utils','@html_editor/utils/position','@odoo/owl','@web/core/utils/patch','@knowledge/editor/embedded_components/backend/view/readonly_embedded_view'],function(require){'use strict';let __exports={};const{SORTABLE_TOLERANCE}=require("@knowledge/components/sidebar/sidebar");const{stepUtils}=require("@web_tour/tour_utils");const{childNodeIndex}=require("@html_editor/utils/position");const{Component,xml}=require("@odoo/owl");const{patch}=require("@web/core/utils/patch");const{ReadonlyEmbeddedViewComponent}=require("@knowledge/editor/embedded_components/backend/view/readonly_embedded_view");const internalPermissions={none:"Members only",read:"Can Read",write:"Can Edit",};const openPermissionPanel=__exports.openPermissionPanel=[{isActive:["body:has(.o_knowledge_permission_panel)"],content:"close o_knowledge_permission_panel if it already opened",trigger:".o_knowledge_header button:contains('Share')",run:"click",},{trigger:"body:not(:has(.o_knowledge_permission_panel))",},{trigger:".o_knowledge_header button:contains('Share')",async run(helpers){await new Promise((r)=>setTimeout(r,1000));await helpers.click();},},{trigger:"body:has(.o_knowledge_permission_panel)",},];const changeInternalPermission=__exports.changeInternalPermission=(permission)=>{return[...openPermissionPanel,{trigger:".o_knowledge_permission_panel .o_internal_permission .dropdown-toggle",run:"click",},{trigger:`.o-dropdown-item:contains('${internalPermissions[permission]}')`,run:"click",},];};__exports.unfoldArticleFromSidebar=unfoldArticleFromSidebar;function unfoldArticleFromSidebar(name,section){let trigger=section?`.o_section[data-section=${section}] .o_article_name:contains(${name})`:`.o_article_name:contains(${name})`;return{trigger,run:function(){const handle=this.anchor.closest(".o_article_handle");const caret=handle.querySelector(".o_article_caret");caret.click();}}}
function getOffset(element){if(!element.getClientRects().length){return{top:0,left:0};}
const rect=element.getBoundingClientRect();const win=element.ownerDocument.defaultView;return{top:rect.top+win.pageYOffset,left:rect.left+win.pageXOffset,};}
const dragAndDropArticle=__exports.dragAndDropArticle=(source,target)=>{const elementOffset=getOffset(source);const targetOffset=getOffset(target);const targetY=targetOffset.top+(targetOffset.top>elementOffset.top?target.offsetHeight-1:0);const element=source.closest("li");element.dispatchEvent(new PointerEvent("pointerdown",{bubbles:true,which:1,clientX:elementOffset.right,clientY:elementOffset.top,}));element.dispatchEvent(new PointerEvent("pointermove",{bubbles:true,which:1,clientX:elementOffset.right,clientY:elementOffset.top+SORTABLE_TOLERANCE,}));setTimeout(()=>{target.dispatchEvent(new PointerEvent("pointermove",{bubbles:true,which:1,clientX:targetOffset.right,clientY:targetY,}));setTimeout(()=>{element.dispatchEvent(new PointerEvent("pointerup",{bubbles:true,which:1,clientX:targetOffset.right,clientY:targetY,}));},200);},200);};__exports.appendArticleLink=appendArticleLink;function appendArticleLink(htmlFieldContainerSelector,articleName,previousSiblingSelector=""){return[{trigger:`${htmlFieldContainerSelector} .odoo-editor-editable > p:last ${previousSiblingSelector}, ${htmlFieldContainerSelector} .odoo-editor-editable > div.o-paragraph:last ${previousSiblingSelector}`,run:function(){if(previousSiblingSelector){openPowerbox(this.anchor.parentElement,this.anchor);}else{openPowerbox(this.anchor);}},},{trigger:'.o-we-powerbox .o-we-command .o-we-command-img.fa-newspaper-o',run:'click',},{trigger:".o_article_search_input input",run:`edit ${articleName}`,},{trigger:`.o_article_search_item .o_article_search_name:contains(${articleName})`,run:'click',}]}
__exports.endKnowledgeTour=endKnowledgeTour;function endKnowledgeTour(){return[...stepUtils.toggleHomeMenu(),{trigger:'.o_app[data-menu-xmlid="knowledge.knowledge_menu_root"]',}];}
__exports.openCommandBar=openCommandBar;function openCommandBar(paragraph,offset=0){const sel=document.getSelection();sel.removeAllRanges();const range=document.createRange();range.setStart(paragraph,offset);range.setEnd(paragraph,offset);sel.addRange(range);paragraph.dispatchEvent(new KeyboardEvent("keydown",{key:"/",}));const slash=document.createTextNode("/");paragraph.prepend(slash);sel.removeAllRanges();range.setStart(slash,1);range.setEnd(slash,1);sel.addRange(range);paragraph.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:"/",bubbles:true,}));paragraph.dispatchEvent(new KeyboardEvent("keyup",{key:"/",}));}
__exports.openPowerbox=openPowerbox;function openPowerbox(paragraph,previousSibling){let offset=0;if(previousSibling){offset=childNodeIndex(previousSibling)+1;}
const sel=document.getSelection();sel.removeAllRanges();const range=document.createRange();range.setStart(paragraph,offset);range.setEnd(paragraph,offset);sel.addRange(range);paragraph.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:"/",bubbles:true,}));}
const WithoutLazyLoading=__exports.WithoutLazyLoading=class WithoutLazyLoading extends Component{static template=xml`<t t-slot="default"/>`;static props=["*"];}
__exports.embeddedViewPatchFunctions=embeddedViewPatchFunctions;function embeddedViewPatchFunctions(){let unpatchEmbeddedView;return{before:()=>{unpatchEmbeddedView=patch(ReadonlyEmbeddedViewComponent.components,{...ReadonlyEmbeddedViewComponent.components,WithLazyLoading:WithoutLazyLoading,});},after:()=>{unpatchEmbeddedView();},};}
return __exports;});;

/* /contacts/static/tests/tours/debug_menu_set_defaults.js */
odoo.define('@contacts/../tests/tours/debug_menu_set_defaults',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add('debug_menu_set_defaults',{url:'/odoo?debug=1',steps:()=>[...stepUtils.goToAppSteps('contacts.menu_contacts',"Open the contacts menu"),{content:"Create a new contact",trigger:'.o_list_button_add',run:"click",},{content:"Check that Company is checked by default, and not Individual",trigger:'.o_field_widget[name="company_type"] input[data-value="company"]:checked',},{content:"Select the individual radio button",trigger:'.o_field_widget[name="company_type"] input[data-value="person"]',run:"click",},{content:"Open the debug menu",trigger:'.o_debug_manager button',run:"click",},{content:"Click the Set Defaults menu",trigger:'.dropdown-item:contains(Set Default Values)',run:"click",},{content:"Choose Company Type = Individual",trigger:'#formview_default_fields',run:function(){const element_field=document.querySelector('select#formview_default_fields');element_field.value='company_type';element_field.dispatchEvent(new Event("change"));},},{content:"Check that there are conditions",trigger:'#formview_default_conditions',run:"click",},{content:"Save the new default",trigger:'footer button:contains(Save default)',run:"click",},{content:"Discard the contact creation",trigger:'button.o_form_button_cancel',run:"click",},{trigger:'.o_action_manager > .o_list_view .o_list_button_add',run:"click",},{content:"Check that Individual is checked instead of Company",trigger:'.o_field_widget[name="company_type"] input[data-value="person"]:checked',},{content:"Discard the contact creation",trigger:'button.o_form_button_cancel',run:"click",},{content:"Wait for discard",trigger:'.o_control_panel .o_list_button_add',},]});return __exports;});;

/* /sale_subscription/static/src/js/tours/test_sale_subscription_portal.js */
odoo.define('@sale_subscription/js/tours/test_sale_subscription_portal',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("test_sale_subscription_portal",{steps:()=>[{content:"Wait for the whole page to load",trigger:"#chatterRoot:shadow .o-mail-Chatter",},{content:"Check that Pay button is enabled",trigger:".o_payment_form button[name='o_payment_submit_button']:not([disabled])",},],});registry.category("web_tour.tours").add("test_sale_subscription_portal_payment",{steps:()=>[{content:"Wait for the whole page to load",trigger:"#chatterRoot:shadow .o-mail-Chatter",},{content:"Check that payment_message section is  not rendered",trigger:":not(:contains(section#payment_message))",},],});return __exports;});;

/* /sale_subscription/static/tests/tours/sale_subscription_combo_configurator.js */
odoo.define('@sale_subscription/../tests/tours/sale_subscription_combo_configurator',['@web/core/registry','@web_tour/tour_utils','@sale/js/tours/combo_configurator_tour_utils','@sale/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require('@web/core/registry');const{stepUtils}=require('@web_tour/tour_utils');const configuratorTourUtils=require('@sale/js/tours/combo_configurator_tour_utils')[Symbol.for("default")];const tourUtils=require('@sale/js/tours/tour_utils')[Symbol.for("default")];registry.category('web_tour.tours').add('sale_subscription_combo_configurator',{url:'/odoo',steps:()=>[...stepUtils.goToAppSteps('sale_subscription.menu_sale_subscription_root',"Open the subscription app"),{content:"Create a new SO",trigger:'.o_list_button_add',run:'click',},...tourUtils.selectCustomer("Test Partner"),...tourUtils.addProduct("Combo product"),configuratorTourUtils.assertPrice('5.00'),configuratorTourUtils.assertPriceInfo("per week"),{content:"Cancel the configurator",trigger:'button:contains(Cancel)',run:'click',},{content:"Select another subscription plan",trigger:'input#plan_id_0',run:'edit 2 Months',},{trigger:'ul.ui-autocomplete a:contains("2 Months")',run:'click',},...tourUtils.addProduct("Combo product"),configuratorTourUtils.assertPrice('15.00'),configuratorTourUtils.assertPriceInfo("per 2 months"),configuratorTourUtils.selectComboItem("Test Product"),...configuratorTourUtils.saveConfigurator(),...stepUtils.saveForm(),],});return __exports;});;

/* /sale_subscription/static/tests/tours/sale_subscription_product_configurator.js */
odoo.define('@sale_subscription/../tests/tours/sale_subscription_product_configurator',['@web/core/registry','@web_tour/tour_utils','@sale/js/tours/product_configurator_tour_utils','@sale/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require('@web/core/registry');const{stepUtils}=require('@web_tour/tour_utils');const configuratorTourUtils=require('@sale/js/tours/product_configurator_tour_utils')[Symbol.for("default")];const tourUtils=require('@sale/js/tours/tour_utils')[Symbol.for("default")];registry.category('web_tour.tours').add('sale_subscription_product_configurator',{url:'/odoo',steps:()=>[...stepUtils.goToAppSteps('sale_subscription.menu_sale_subscription_root',"Open the subscription app"),{content:"Create a new SO",trigger:'.o_list_button_add',run:'click',},...tourUtils.selectCustomer("Test Partner"),...tourUtils.addProduct("Main product"),configuratorTourUtils.assertProductPrice("Main product",'5.00'),configuratorTourUtils.assertProductPriceInfo("Main product","per week"),configuratorTourUtils.assertOptionalProductPrice("Optional product",'6.00'),configuratorTourUtils.assertOptionalProductPriceInfo("Optional product","per week"),{content:"Cancel the configurator",trigger:'button:contains(Cancel)',run:'click',},{content:"Select another subscription plan",trigger:'input#plan_id_0',run:'edit 2 Months',},{trigger:'ul.ui-autocomplete a:contains("2 Months")',run:'click',},...tourUtils.addProduct("Main product"),configuratorTourUtils.assertProductPrice("Main product",'15.00'),configuratorTourUtils.assertProductPriceInfo("Main product","per 2 months"),configuratorTourUtils.assertOptionalProductPrice("Optional product",'16.00'),configuratorTourUtils.assertOptionalProductPriceInfo("Optional product","per 2 months"),...configuratorTourUtils.saveConfigurator(),...stepUtils.saveForm(),],});return __exports;});;

/* /sale_project/static/tests/tours/project_create_sol_tour.js */
odoo.define('@sale_project/../tests/tours/project_create_sol_tour',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add('project_create_sol_tour',{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),{trigger:".o_app[data-menu-xmlid='project.menu_main_pm']",content:'Select Project main menu.',run:"click",},{trigger:".o_kanban_record:contains(Test History Project):first",content:"Open the project dropdown of project name 'Test History Project'.",run:"hover && click .o_kanban_record:contains(Test History Project):first .o_dropdown_kanban .dropdown-toggle",},{trigger:".o_kanban_card_manage_settings a:contains('Settings')",content:'Start editing the project.',run:"click",},{trigger:".o_field_widget[name='partner_id'] input",content:"Add the customer for this project",run:"click",},{isActive:["auto"],trigger:".ui-autocomplete > li > a:not(:has(i.fa))",content:"Select the customer in the autocomplete dropdown",run:"click",},{trigger:'div.o_notebook_headers',},{trigger:'a.nav-link[name="settings"]',content:'Click on Settings tab to configure this project.',run:"click",},{id:"project_sale_timesheet_start",trigger:"div[name='sale_line_id'] input",content:'Add the Sales Order Item',run:"fill New Sale order line",},{trigger:".o_field_widget[name=sale_line_id] .o-autocomplete--dropdown-menu .o_m2o_dropdown_option_create a",content:"Create an Sales Order Item in the autocomplete dropdown.",run:"click",},{trigger:"body:not(:has(.modal))",},{trigger:".o_form_button_save:enabled",content:"Save project",run:"click",},...stepUtils.toggleHomeMenu(),...stepUtils.goToAppSteps("project.menu_main_pm",'Go to the Project app.'),]});return __exports;});;

/* /sale_project/static/tests/tours/project_tour.js */
odoo.define('@sale_project/../tests/tours/project_tour',['@web/core/registry','@project/../tests/tours/project_tour','@web/core/utils/patch'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");require("@project/../tests/tours/project_tour");const{patch}=require("@web/core/utils/patch");patch(registry.category("web_tour.tours").get("project_test_tour"),{steps(){const originalSteps=super.steps();const projectCreationStepIndex=originalSteps.findIndex((step)=>step.id==="project_creation");originalSteps.splice(projectCreationStepIndex,0,{trigger:"div[name='allow_billable'] input",run:"edit Test",});return originalSteps;},});return __exports;});;

/* /sale_timesheet/static/tests/tours/sale_timesheet_tour.js */
odoo.define('@sale_timesheet/../tests/tours/sale_timesheet_tour',['@web/core/registry','@web_tour/tour_utils','@sale/js/tours/tour_utils','@odoo/owl'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");const tourUtils=require("@sale/js/tours/tour_utils")[Symbol.for("default")];const{markup}=require("@odoo/owl");registry.category("web_tour.tours").add('sale_timesheet_tour',{url:'/odoo',steps:()=>[...stepUtils.goToAppSteps("sale.sale_menu_root","Go to the Sales App"),...tourUtils.createNewSalesOrder(),...tourUtils.selectCustomer("Brandon Freeman"),...tourUtils.addProduct("Service Product (Prepaid Hours)"),{trigger:'div[name="product_uom_qty"] input',content:"Add 10 hours as ordered quantity for this product.",run:"edit 10 && press Tab",},{trigger:'.o_field_cell[name=price_subtotal]:contains(2,500.00)',},{trigger:"button[name=action_confirm]:enabled",content:'Click on Confirm button to create a sale order with this quotation.',run:"click",},{content:'Wait for the confirmation to finish. State should be "Sales Order"',trigger:'.o_field_widget[name=state] .o_arrow_button_current:contains("Sales Order")',},...stepUtils.toggleHomeMenu(),...stepUtils.goToAppSteps("project.menu_main_pm",'Go to the Project app.'),{trigger:'button.o-kanban-button-new',content:'Add a new project.',run:"click",},{isActive:['button.o-kanban-button-new.dropdown'],trigger:'button.o-dropdown-item:contains("New Project")',content:'Let\'s create a regular project.',tooltipPosition:'right',run:"click",},{trigger:'.o_field_widget.o_project_name input',content:'Select your project name (e.g. Project for Freeman)',run:"edit Project for Freeman",},{trigger:'div[name="allow_billable"] input',run:'click',},{trigger:'button[name="action_view_tasks"]',content:'Click on Create button to create and enter to this newest project.',run:"click",},{trigger:".breadcrumb-item.o_back_button",run:"click",},{trigger:".o_kanban_record:contains('Project for Freeman')",},{trigger:".o_switch_view.o_list",run:"click",},{trigger:"tr.o_data_row td[name='name']:contains('Project for Freeman')",run:"click",},{trigger:".nav-link:contains('Settings')",run:"click",},{trigger:"div[name='allow_milestones'] input",run:"click",},{trigger:"button[name='action_view_tasks']",run:"click",},{trigger:'div.o_kanban_header > div:first-child input',content:'Select a name of your kanban column (e.g. To Do)',run:"edit To Do",},{trigger:'button.o_kanban_add',content:'Click on Add button to create the column.',run:"click",},{content:"wait the new column is created",trigger:".o_kanban_renderer .o_kanban_group .o_kanban_header_title:contains(to do)",},{trigger:'button.o-kanban-button-new',content:'Click on Create button to create a task into your project.',run:"click",},{trigger:'div[name="display_name"] > input',content:'Select the name of the task (e.g. Onboarding)',run:"edit Onboarding",},{trigger:'button.o_kanban_edit',content:'Click on Edit button to enter to the form view of the task.',tooltipPosition:'bottom',run:"click",},{trigger:'div[name="partner_id"] input',content:markup('Select the customer of your Sales Order <i>(e.g. Brandon Freeman)</i>. Since we have a Sales Order for this customer with a prepaid service product which the remaining hours to deliver is greater than 0, the Sales Order Item in the task should be contain the Sales Order Item containing this prepaid service product.'),run:"edit Brandon Freeman",},{trigger:'div[name="partner_id"] ul > li:first-child > a:contains(Freeman)',content:'Select the customer in the autocomplete dropdown.',run:"click",},{trigger:"div.o_notebook_headers",},{trigger:'a.nav-link:contains(Timesheets)',content:'Click on Timesheets page to log a timesheet',run:"click",},{trigger:'div[name="timesheet_ids"] td.o_field_x2many_list_row_add a[role="button"]',content:'Click on Add a line to create a new timesheet into the task.',run:"click",},{trigger:'.o_field_x2many div[name="name"] input',content:'Enter a description for this timesheet',run:"edit work",},{trigger:'div[name="unit_amount"] input',content:'Enter one hour for this timesheet',run:"edit 1",},{trigger:'i.o_optional_columns_dropdown_toggle',content:'The so_line field should be hidden by default. We check if it is the case by adding this field in the timesheet list view',run:"click",},{trigger:'input[name="so_line"]',content:'Check the so_line field to display the column on the list view.',run:function(actions){if(!this.anchor.checked){actions.click();}},},{trigger:'button.o_form_button_save i',content:'Manually save the records (sale order should be filled based on the partner picked for this task',run:"click",},{trigger:'button[name="action_view_so"]',content:'Click on this stat button to see the SO linked to the SOL of the task.',run:"click",},{trigger:'div[name="order_line"]',content:'Check if the quantity delivered is equal to 1 hour.',run({queryFirst}){const header=this.anchor.querySelectorAll("thead > tr");if(!header||header.length===0)
console.error('No Sales Order Item is found in the Sales Order.');const tr=[...header][0];let index=-1;for(let i=0;i<tr.children.length;i++){const th=tr.children.item(i);if(th.dataset&&th.dataset.name==='qty_delivered')
index=i;}
const qtyDelivered=queryFirst(`tbody > tr:first-child > td.o_data_cell:eq(${index})`,{root:this.anchor});if(qtyDelivered.textContent!=="1.00")
console.error('The quantity delivered on this Sales Order Item should be equal to 1.00 hour. qtyDelivered = '+qtyDelivered);},},{trigger:'button[data-menu-xmlid="project.menu_project_config"]',content:'Click on the Configuration menu.',run:"click",},{trigger:'.dropdown-item[data-menu-xmlid="project.menu_projects_config"]',content:'Select Configuration > Projects.',run:"click",},{trigger:'button.o_list_button_add',content:'Click on Create button to create a new project and see the different configuration available for the project.',run:"click",},{isActive:['button.o_list_button_add.dropdown'],trigger:'button.o-dropdown-item:contains("New Project")',content:'Let\'s create a regular project.',tooltipPosition:'right',run:"click",},{trigger:"div.o_notebook_headers",},{trigger:'a.nav-link[name="settings"]',content:'Click on Settings page to check the allow_billable checkbox',run:"click",},{trigger:'div[name="allow_billable"] input',content:'Check the allow_billable',run:function(actions){if(!this.anchor.checked){actions.click();}}},{trigger:'div[name="partner_id"] input',content:markup('Add the customer for this project to select an SO and SOL for this customer <i>(e.g. Brandon Freeman)</i>.'),run:"edit Brandon Freeman",},{trigger:'div[name="partner_id"] ul > li:first-child > a:contains(Freeman)',content:'Select the customer in the autocomplete dropdown',run:"click",},{trigger:'div[name="sale_line_id"] input',content:'Select a Sales Order Item as Default Sales Order Item for each task in this project.',run:"edit S",},{trigger:'[name="sale_line_id"] ul.ui-autocomplete > li:first-child > a:not(:has(i.fa))',content:'Select the Sales Order Item in the autocomplete dropdown.',run:"click",},{trigger:"div.o_notebook_headers",},{trigger:'a.nav-link[name="billing_employee_rate"]',content:'Click on Invoicing tab to configure the invoicing of this project.',run:"click",},{trigger:'div[name="sale_line_employee_ids"] td.o_field_x2many_list_row_add > a[role="button"]',content:'Click on Add a line on the mapping list view.',run:"click",},{trigger:'div[name="sale_line_employee_ids"] div[name="employee_id"] input',content:'Select an employee to link a Sales Order Item on his timesheets into this project.',run:'click',},{trigger:'[name="employee_id"] ul.ui-autocomplete > li:first-child > a:not(:has(i.fa))',content:'Select the first employee in the autocomplete dropdown',run:"click",},{trigger:'div[name="sale_line_employee_ids"] div[name="sale_line_id"] input',content:'Select the Sales Order Item to link to the timesheets of this employee.',tooltipPosition:'bottom',run:"edit S",},{trigger:'[name=sale_line_id] ul.ui-autocomplete > li:first-child > a:not(:has(i.fa))',content:'Select the first Sales Order Item in the autocomplete dropdown.',run:"click",},{trigger:'h1 > div[name="name"] > div > textarea',content:'Set Project name',run:"edit Project with employee mapping",},{trigger:'[data-menu-xmlid="project.menu_projects"]',content:'Select Project main menu',run:"click",},{trigger:".o_switch_view.o_list",run:"click",},{trigger:"tr.o_data_row td[name='name']:contains('Project for Freeman')",run:"click",},{trigger:'div[name="partner_id"] input',content:markup('Add the customer for this project to select an SO and SOL for this customer <i>(e.g. Brandon Freeman)</i>.'),run:"edit Brandon Freeman",},{trigger:'div[name="partner_id"] ul > li:first-child > a:contains(Freeman)',content:'Select the customer in the autocomplete dropdown',run:"click",},{trigger:"div.o_notebook_headers",},{trigger:'a.nav-link[name="settings"]',content:'Click on Settings tab to configure this project.',run:"click",},{trigger:'div[name="sale_line_id"] input',content:'Select the first sale order of the list',run:"edit Prepaid",},{trigger:'ul.ui-autocomplete > li:first-child > a:not(:has(i.fa))',content:'Select the first item on the autocomplete dropdown',run:"click",},{trigger:'[data-menu-xmlid="project.menu_projects"]',content:'Select Project main menu',run:"click",},{trigger:'.o_kanban_record:contains("Project for Freeman")',content:'Open the project',run:"click",},{trigger:".o_control_panel_navigation button i.fa-sliders",content:'Open embedded actions',run:"click",},{trigger:"span.o-dropdown-item:contains('Top Menu')",run:"click",},{trigger:".o-dropdown-item div span:contains('Dashboard')",content:"Put Dashboard in the embedded actions",run:"click",},{trigger:".o_embedded_actions button span:contains('Dashboard')",content:"Open Dashboard",run:"click",},{trigger:".o_rightpanel_section[name='profitability'] .o_rightpanel_title:contains('Profitability')",content:'Check the user sees Profitability section',},{trigger:".o_rightpanel_section[name='profitability'] .o_rightpanel_data > div > .o_rightpanel_subsection:eq(0) > table > thead > tr > th:eq(0):contains('Revenues')",content:'Check the user sees Profitability subsection row',},{trigger:"button.o_group_caret:has(.fa-caret-right)",content:'Check that the dropdown button is present',run:"click",},{trigger:"th:contains('Sales Order Items')",content:'Check that the sale items section is present',},{trigger:"button.o_group_caret:has(.fa-caret-down)",content:'Check that the button has changed',run:"click",},{trigger:".o_rightpanel_section[name='profitability'] .o_rightpanel_data > div > .o_rightpanel_subsection:eq(1) > table > thead > tr > th:eq(0):contains('Costs')",content:'Check the user sees Profitability subsection row',},{trigger:".o_rightpanel_section[name='profitability'] .o_rightpanel_data > div > .o_rightpanel_subsection:eq(2) > table > thead > tr > th:eq(0):contains('Total')",content:'Check the user sees Profitability subsection row',},{trigger:".o_rightpanel_section[name='milestones'] .o_rightpanel_title:contains('Milestones')",content:'Check the user sees Milestones section',run:"click",},{trigger:".o_add_milestone a",content:"Add a first milestone",run:"click",},{trigger:".o_list_button_add",content:"Add a first milestone",run:"click",},{trigger:"div.o_field_widget[name=name] input",run:"edit New milestone",},{trigger:"input[data-field=deadline]",content:"Edit new Milestone",run:"edit 12/12/2099",},{trigger:".o_list_button_save",content:"Save new Milestone",run:"click",},{trigger:".breadcrumb-item.o_back_button",run:"click",},{trigger:".o-kanban-button-new",content:"Create new Project Update",run:"click",},{trigger:"div.o_field_widget[name=name] input",content:"Give a name to Project Update",run:"edit New update",},{trigger:".o_field_widget[name=description] h3:contains('Profitability')",content:"Profitability title must be in description",},{trigger:".o_field_widget[name=description] h3:contains('Milestones')",content:"Milestones title must be in description",},{trigger:'.o_back_button',content:'Go back to the kanban view and the project update will be added on that view',run:"click",},{trigger:'.o_controller_with_rightpanel',content:'Check the kanban view of project update is rendered to be sure the user leaves the form view and the project update is created',},...stepUtils.toggleHomeMenu(),...stepUtils.goToAppSteps("project.menu_main_pm",'Go to the Project app.'),]});return __exports;});;

/* /helpdesk/static/tests/tours/helpdesk_search_ticket_on_portal.js */
odoo.define('@helpdesk/../tests/tours/helpdesk_search_ticket_on_portal',['@helpdesk/../tests/tours/helpdesk_search_ticket_steps','@web/core/registry'],function(require){'use strict';let __exports={};const HelpdeskSearchTicketSteps=require("@helpdesk/../tests/tours/helpdesk_search_ticket_steps")[Symbol.for("default")];const{registry}=require("@web/core/registry");const helpdeskSearchTicketSteps=new HelpdeskSearchTicketSteps();registry.category("web_tour.tours").add("helpdesk_search_ticket_on_portal_tour",{url:"/my/tickets",steps:()=>[{trigger:".border-end",content:"click on dropdown.",run:"click",},{trigger:'.dropdown-menu a:contains("Search Tickets")',content:"select Search Tickets.",run:"click",},{content:"Type name of ticket",trigger:'form input[name="search"]',run:"edit lamp stand",},helpdeskSearchTicketSteps._searchTickets(),{trigger:"table > tbody > tr a:has(span:contains(lamp stand))",content:"click on ticket.",run:"click",expectUnloadPage:true,},{trigger:"#chatterRoot:shadow div.o-mail-Thread-empty",},],});return __exports;});;

/* /helpdesk/static/tests/tours/helpdesk_search_ticket_steps.js */
odoo.define('@helpdesk/../tests/tours/helpdesk_search_ticket_steps',[],function(require){'use strict';let __exports={};class HelpdeskSearchTicketSteps{_searchTickets(){return{content:"search Ticket",trigger:".oi-search",run:"click",expectUnloadPage:true,};}}
__exports[Symbol.for("default")]=HelpdeskSearchTicketSteps;return __exports;});;

/* /helpdesk_timesheet/static/tests/tours/timesheet_record_time.js */
odoo.define('@helpdesk_timesheet/../tests/tours/timesheet_record_time',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add('timesheet_record_time_new_helpdesk_ticket',{url:"/web",steps:()=>[{trigger:".o_app[data-menu-xmlid='hr_timesheet.timesheet_menu_root']",content:"Open Timesheet app.",run:"click"},{trigger:'.btn_start_timer',content:"Launch the timer to start a new activity.",run:"click"},{trigger:'div[name=name] input',content:"Describe your activity.",run:"edit Description"},{trigger:'.timesheet-timer div[name="project_id"] input',content:"Select the project on which you are working.",run:"edit Project Helpdesk Team",},{isActive:["auto"],trigger:".ui-autocomplete > li > a:contains(Test Project Helpdesk Team)",run:"click",},{trigger:'.timesheet-timer div[name="helpdesk_ticket_id"] input',content:"Create a new Ticket.",run:"edit Test Helpdesk Ticket",},{isActive:["auto"],trigger:".ui-autocomplete > li > a:contains(Test Helpdesk Ticket)",run:"click",},{trigger:'body',content:"Wait for the ticket to be created",run:function(){return new Promise(resolve=>setTimeout(resolve,1000));}},{trigger:'.o_stop_timer_button',content:"Stop the timer when you are done.",run:"click"}]});return __exports;});;

/* /website_knowledge/static/tests/tours/website_knowledge_public_view_tour.js */
odoo.define('@website_knowledge/../tests/tours/website_knowledge_public_view_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");function checkSearchArticles(expectedArticles){if(document.querySelectorAll(".o_article_search_item").length!==expectedArticles.length){console.error("Incorrect number of articles returned by search");}
for(const articleName of expectedArticles){if(!this.queryOne(`.o_article_search_item:contains(${articleName})`)){console.error(`Missing article "${articleName}" in search results`);}}}
registry.category("web_tour.tours").add("website_knowledge_public_view_tour",{steps:()=>[{content:"Check that the article has the right display name",trigger:".o_knowledge_header span:contains('🐣 Published Root')",},{content:"Check that the cover has been loaded",trigger:".o_knowledge_cover img",},{content:"Check the article icon",trigger:".o_knowledge_icon:contains('🐣')",},{content:"Check the article content",trigger:".o_knowledge_article .o_readonly h1:contains('Published Root')",},{content:"Check that the sidebar initially only has the subsite root article",trigger:".o_knowledge_sidebar .o_article:contains('Published Root')",run:()=>{if(document.querySelectorAll(".o_knowledge_sidebar .o_article").length>1){console.error("Sidebar has more articles than expected");}},},{content:"Unfold the article in the sidebar",trigger:".o_knowledge_sidebar .o_article .o_article_icon",run:"click",},{content:"Check that only the published child articles is shown",trigger:".o_knowledge_sidebar .o_article ul .o_article .o_article_name:contains('Published Child')",run:()=>{if(document.querySelectorAll(".o_knowledge_sidebar .o_article ul .o_article").length>1){console.error("Sidebar has more articles than expected");}},},{content:"Open the article from the sidebar",trigger:".o_knowledge_sidebar .o_article ul .o_article .o_article_name",run:"click",},{content:"Check that the article was opened",trigger:".o_knowledge_header span:contains('📄 Published Child')",},{content:"Check that active article in the sidebar was updated",trigger:".o_knowledge_sidebar .o_article_active .o_article_name:contains(Published Child)",},{content:"Click on search bar",trigger:".o_knowledge_sidebar button:has(i.fa-search)",run:"click",},{content:"Search for the word 'publi'",trigger:".o_article_search_dialog input",run:"edit publi",},{content:"Check that search only returns the published articles",trigger:".o_article_search_item",run:(helpers)=>checkSearchArticles.call(helpers,["Published Subchild","Published Child","Published Root","Published Item",]),},{content:"Search for the word 'content'",trigger:".o_article_search_dialog input",run:"edit content",},{content:"Check that the search only returns the published child containing 'content'",trigger:".o_article_search_dialog:not(:contains('Published Root'))",run:(helpers)=>checkSearchArticles.call(helpers,["Untitled"]),},{content:"Click on the article to open it",trigger:".o_article_search_item",run:"click",},{content:"Check that the untitled article was opened",trigger:".o_knowledge_header:contains('📄 Untitled')",},{content:"Check that article is visible in the sidebar",trigger:".o_knowledge_sidebar .o_article_active .o_article_name:contains('Untitled')",},],});return __exports;});;

/* /website_knowledge/static/tests/tours/website_knowledge_searchbar_snippet_tour.js */
odoo.define('@website_knowledge/../tests/tours/website_knowledge_searchbar_snippet_tour',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{changeOptionInPopover,clickOnSnippet,clickOnSave,insertSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("test_searchbar_within_knowledge_articles",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_searchbar_input",name:"Search"}),...clickOnSnippet({id:"s_searchbar_input",name:"Search"}),...changeOptionInPopover("Search",'Search within',"Knowledge articles"),{content:"Limit search to 'Knowledge Articles'",trigger:':iframe .s_searchbar_input[action="/website/search/knowledge"]',},...clickOnSave(),{content:"Enter search term",trigger:":iframe .o_searchbar_form input",run:"edit Test Filter knowledge Article",},{content:"Check that the number of results found is correct.",trigger:":iframe .o_searchbar_form .o_dropdown_menu",run:function(){const dropdownItemsEls=this.anchor.querySelectorAll(".dropdown-item");if(dropdownItemsEls.length!==1){throw new Error("Tour failed: More/Less than 1 item is there for given keyword.");}}},]);return __exports;});;

/* /im_livechat/static/tests/tours/chatbot_step_type_clear_only.js */
odoo.define('@im_livechat/../tests/tours/chatbot_step_type_clear_only',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("change_chatbot_step_type",{steps:()=>[{content:"Open an existing script",trigger:".o_field_cell[data-tooltip='Clear Answer Test Bot']",run:"click",},{content:"Open first step",trigger:'.o_row_draggable .o_field_cell:contains("Question")',run:"click",},{content:"Change step type to 'text'",trigger:'div[name="step_type"] input',run:"click",},{trigger:'.dropdown-item:contains("Text")',run:"click",},{content:"Verify answers cleared",trigger:".btn-primary:contains('Save')",run:"click",},{trigger:".o_form_button_save",run:"click",},{trigger:".o_form_button_save:not(:visible)",},],});return __exports;});;

/* /im_livechat/static/tests/tours/im_livechat_channel_creation_tour.js */
odoo.define('@im_livechat/../tests/tours/im_livechat_channel_creation_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const requestChatSteps=[{trigger:".o-livechat-root:shadow .o-livechat-LivechatButton",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-ChatWindow",},];registry.category("web_tour.tours").add("im_livechat_request_chat",{steps:()=>requestChatSteps,});registry.category("web_tour.tours").add("im_livechat_request_chat_and_send_message",{steps:()=>[...requestChatSteps,{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"edit Hello, I need help please !",},{trigger:".o-livechat-root:shadow .o-mail-Composer button[title='Add Emojis']",run:"click",},{trigger:".o-livechat-root:shadow .o-EmojiPicker .o-Emoji:contains('😀')",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input:value('Hello, I need help please !😀')",},{trigger:".o-livechat-root:shadow .o-mail-Composer button[aria-label='Send']:enabled",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-Message:contains('Hello, I need help')",},],});return __exports;});;

/* /im_livechat/static/tests/tours/im_livechat_chatbot_steps_sequence_tour.js */
odoo.define('@im_livechat/../tests/tours/im_livechat_chatbot_steps_sequence_tour',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");function createChatbotSteps(...stepMessages){return[{trigger:"div[name='script_step_ids'] .o_field_x2many_list_row_add a",run:"click",},...stepMessages.map((message)=>[{trigger:".modal .odoo-editor-editable",run:`editor ${message}`,},{trigger:`.modal .odoo-editor-editable:contains(${message})`,},{trigger:".modal button:contains(Save & New)",run:"click",},{trigger:`tr:contains(${message})`,},{trigger:".modal .odoo-editor-editable:empty",},]).flat(),{trigger:".modal-footer button:contains(Discard)",run:"click",},];}
const commonSteps=[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="im_livechat.menu_livechat_root"]',run:"click",},{trigger:'button[data-menu-xmlid="im_livechat.livechat_config"]',run:"click",},{trigger:'a[data-menu-xmlid="im_livechat.chatbot_config"]',run:"click",},{trigger:".o_list_button_add",run:"click",},{trigger:'input[id="title_0"]',run:"edit Test Chatbot Sequence",},...createChatbotSteps("Step 1","Step 2","Step 3"),];registry.category("web_tour.tours").add("im_livechat_chatbot_steps_sequence_tour",{url:"/odoo",steps:()=>[...commonSteps,{trigger:"body.o_web_client:not(.modal-open)",},],});registry.category("web_tour.tours").add("im_livechat_chatbot_steps_sequence_with_move_tour",{url:"/odoo",steps:()=>[...commonSteps,...createChatbotSteps("Step 4","Step 5"),{trigger:"body.o_web_client:not(.modal-open)",},{trigger:'div[name="script_step_ids"] tr:nth-child(5) .o_row_handle',run:'drag_and_drop(div[name="script_step_ids"] tr:nth-child(2))',},...createChatbotSteps("Step 6"),{trigger:"body.o_web_client:not(.modal-open)",},{trigger:'tr:contains("Step 6")',},],});return __exports;});;

/* /im_livechat/static/tests/tours/im_livechat_history_back_and_forth.js */
odoo.define('@im_livechat/../tests/tours/im_livechat_history_back_and_forth',['@web/core/utils/concurrency','@web/core/registry'],function(require){'use strict';let __exports={};const{delay}=require("@web/core/utils/concurrency");const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("im_livechat_history_back_and_forth_tour",{steps:()=>[{trigger:"button.o_switch_view.o_list",run:"click",},{trigger:".o_data_cell:contains(Visitor)",run:"click",},{trigger:".o-mail-DiscussContent-threadName[title='Visitor']",async run(){await delay(1000);history.back();},},{trigger:".o_data_cell:contains(Visitor)",async run(){await delay(0);history.forward();},},{trigger:".o-mail-DiscussContent-threadName[title='Visitor']",async run(){await delay(1000);history.back();},},{trigger:".o_data_cell:contains(Visitor)",},],});return __exports;});;

/* /im_livechat/static/tests/tours/im_livechat_report_pivot_redirect_tour.js */
odoo.define('@im_livechat/../tests/tours/im_livechat_report_pivot_redirect_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");function makePivotRedirectTourSteps(singleRecordName,multiRecordName){return[{content:"Click on a cell with a single related record",trigger:`.o_pivot table tbody tr:has(th:contains(${singleRecordName})) td:eq(0)`,run:"click",},{trigger:".o-mail-Discuss",content:"Verify redirection to the single record view",},{content:"Go back to the pivot view",trigger:".o_back_button",run:"click",},{content:"Click on a cell with a multiple related records",trigger:`.o_pivot table tbody tr:has(th:contains(${multiRecordName})) td:eq(0)`,run:"click",},{trigger:".o_list_view",content:"Verify redirection to the list view for multiple records",},];}
registry.category("web_tour.tours").add("im_livechat_agents_report_pivot_redirect_tour",{steps:()=>makePivotRedirectTourSteps("test 1","test 2"),});registry.category("web_tour.tours").add("im_livechat_sessions_report_pivot_redirect_tour",{steps:()=>makePivotRedirectTourSteps("operator_1","operator_2"),});return __exports;});;

/* /im_livechat/static/tests/tours/im_livechat_session_history_open.js */
odoo.define('@im_livechat/../tests/tours/im_livechat_session_history_open',['@odoo/owl','@web/core/registry','@web/../tests/helpers/utils'],function(require){'use strict';let __exports={};const{whenReady}=require("@odoo/owl");const{registry}=require("@web/core/registry");const{patchWithCleanup}=require("@web/../tests/helpers/utils");let firstChannelId;registry.category("web_tour.tours").add("im_livechat_session_history_open",{steps:()=>[{trigger:"body",async run(){await whenReady();const busService=odoo.__WOWL_DEBUG__.root.env.services.bus_service;patchWithCleanup(busService,{addChannel(channel){document.body.classList.add(`o-bus-channel-${channel}`);return super.addChannel(...arguments);},deleteChannel(channel){document.body.classList.remove(`o-bus-channel-${channel}`);return super.deleteChannel(...arguments);},});},},{trigger:".o_switch_view[data-tooltip='List']",run:"click",},{trigger:".o_data_cell:contains('test 2')",run:"click",},{trigger:".o-mail-Message-content:contains('Test Channel 2 Msg')",async run({waitFor}){firstChannelId=odoo.__WOWL_DEBUG__.root.env.services.action.currentController.state.resId;await waitFor(`body.o-bus-channel-discuss\\.channel_${firstChannelId}`,{timeout:3000,});},},{trigger:".oi-chevron-right",run:"click",},{trigger:".o-mail-Message-content:contains('Test Channel 1 Msg')",async run({waitFor}){await waitFor(`body:not(.o-bus-channel-discuss\\.channel_${firstChannelId})`,{timeout:3000,});const channelId=odoo.__WOWL_DEBUG__.root.env.services.action.currentController.state.resId;await waitFor(`body.o-bus-channel-discuss\\.channel_${channelId}`,{trimeout:3000,});},},],});return __exports;});;

/* /im_livechat/static/tests/tours/looking_for_help_discuss_category_tour.js */
odoo.define('@im_livechat/../tests/tours/looking_for_help_discuss_category_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("im_livechat.looking_for_help_discuss_category_tour",{steps:()=>[{trigger:".o-mail-DiscussSidebarCategory-livechatNeedHelp + .o-mail-DiscussSidebarChannel-container:contains(Visitor Accounting) + .o-mail-DiscussSidebarChannel-container:contains(Visitor Sales)",},{trigger:".o-mail-DiscussSidebarChannel:contains(Sales) .o-mail-starred",},{trigger:".o-mail-DiscussSidebarChannel:contains(Accounting):not(:has(.o-mail-starred))",},{trigger:".o-mail-DiscussSidebarChannel:contains(Accounting)",run:"hover && click [title='Chat Actions']",},{trigger:".o-mail-DiscussSidebar:has(.o-mail-DiscussSidebarChannel:contains(Accounting))",},{trigger:"button[name='livechat-status']",run:"hover",},{trigger:".o-livechat-LivechatStatusSelection-Label:contains(In progress)",run:"click",},{trigger:".o-mail-DiscussSidebar:not(:has(.o-mail-DiscussSidebarChannel:contains(Accounting)))",},],});return __exports;});;

/* /im_livechat/static/tests/tours/support/im_livechat_basic_tour.js */
odoo.define('@im_livechat/../tests/tours/support/im_livechat_basic_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("im_livechat.basic_tour",{steps:()=>[{trigger:".channel_name:contains(Support Channel)",},{trigger:".o-livechat-root:shadow .o-livechat-LivechatButton",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-ChatWindow",},],});return __exports;});;

/* /im_livechat/static/tests/tours/support/im_livechat_meeting_view_tour.js */
odoo.define('@im_livechat/../tests/tours/support/im_livechat_meeting_view_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("im_livechat.meeting_view_tour",{steps:()=>[{trigger:".o-livechat-root:shadow .o-livechat-LivechatButton",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-Thread[data-transient]",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"edit Hello!",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"press Enter",},{trigger:".o-livechat-root:shadow [title='Join Call']",run:"click",},{trigger:".o-livechat-root:shadow .o-discuss-Call [title='Fullscreen']",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-Meeting",},{trigger:".o-livechat-root:shadow .o-mail-MeetingSideActions [name^='more-action:'] ",run:"click",},{trigger:".o-livechat-root:shadow [name='call-settings']",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-DiscussContent-panelContainer .o-mail-ActionPanel-header:contains('voice settings')",},],});return __exports;});;

/* /calendar/static/tests/tours/calendar_tour.js */
odoo.define('@calendar/../tests/tours/calendar_tour',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");const todayDate=function(){const now=new Date();const year=now.getFullYear();const month=String(now.getMonth()+1).padStart(2,"0");const day=String(now.getDate()).padStart(2,"0");return`${month}/${day}/${year} 10:00:00`;};registry.category("web_tour.tours").add("calendar_appointments_hour_tour",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="calendar.mail_menu_calendar"]',content:"Open Calendar",run:"click",},{trigger:".o-calendar-button-new",content:"Create a new event",run:"click",},{trigger:"#name_0",content:"Give a name to the new event",run:"edit TEST EVENT",},{trigger:"div[name='start'] button",content:"Open the date picker",run:"click",},{trigger:"#start_0",content:"Give a date to the new event",run:`edit ${todayDate()}`,},{trigger:"#duration_0",content:"Give a duration to the new event",run:"edit 02:00",},{trigger:".fa-cloud-upload",content:"Save the new event",run:"click",},{trigger:".o_back_button",content:"Go back to Calendar view",run:"click",},{trigger:".scale_button_selection",content:"Click to change calendar view",run:"click",},{trigger:'.dropdown-item:contains("Month")',content:"Change the calendar view to Month",run:"click",},{trigger:".fc-col-header-cell.fc-day.fc-day-mon",content:"Check the day is properly displayed",run:"click",},{trigger:'.fc-time:contains("10:00")',content:"Check the time is properly displayed",run:"click",},{trigger:'.o_event_title:contains("TEST EVENT")',content:"Check the event title",},],});const clickOnTheEvent={content:"Click on the event (focus + waiting)",trigger:'a .fc-event-main:contains("Test Event")',async run(actions){await actions.click();await new Promise((r)=>setTimeout(r,1000));const custom=document.querySelector(".o_cw_custom_highlight");if(custom){custom.click();}},};registry.category("web_tour.tours").add("test_calendar_delete_tour",{steps:()=>[clickOnTheEvent,{trigger:".o_cw_popover",},{content:"Delete the event",trigger:".o_cw_popover_delete",run:"click",},{content:"Validate the deletion",trigger:'button:contains("Delete")',run:"click",},],});registry.category("web_tour.tours").add("test_calendar_decline_tour",{steps:()=>[clickOnTheEvent,{trigger:".o_cw_popover",},{content:"Delete the event",trigger:".o_cw_popover_delete",run:"click",},{content:"Wait declined status",trigger:".o_attendee_status_declined",},],});return __exports;});;

/* /survey/static/tests/tours/certification_failure.js */
odoo.define('@survey/../tests/tours/certification_failure',['@web/core/utils/patch','@web/core/registry'],function(require){'use strict';let __exports={};const{patch}=require("@web/core/utils/patch");function patchSurveyForm(){const SurveyForm=odoo.loader.modules.get("@survey/interactions/survey_form").SurveyForm;patch(SurveyForm.prototype,{submitForm(){this.fadeInOutDelay=0;return super.submitForm(...arguments);},});}
const{registry}=require("@web/core/registry");const patchSteps=[{content:"Patching Survey Form Interaction",trigger:"body",run:function(){patchSurveyForm();},},];const failSteps=[{content:"Clicking on Start Certification",trigger:'button.btn.btn-primary.btn-lg:contains("Start Certification")',run:"click",},{content:"Selecting answer 'No'",trigger:'div.js_question-wrapper:contains("Do we sell Acoustic Bloc Screens") label:contains("No")',run:"click",},{content:"Ticking answer 'Fanta'",trigger:'div.js_question-wrapper:contains("Select all the existing products") label:contains("Fanta")',run:"click",},{content:"Ticking answer 'Drawer'",trigger:'div.js_question-wrapper:contains("Select all the existing products") label:contains("Drawer")',run:"click",},{content:"Ticking answer 'Conference chair'",trigger:'div.js_question-wrapper:contains("Select all the existing products") label:contains("Conference chair")',run:"click",},{content:"Ticking answer 'Color'",trigger:'div.js_question-wrapper:contains("Select all the available customizations for our Customizable Desk") label:contains("Color")',run:"click",},{content:"Ticking answer 'Height'",trigger:'div.js_question-wrapper:contains("Select all the available customizations for our Customizable Desk") label:contains("Height")',run:"click",},{content:"Selecting answer '2'",trigger:'div.js_question-wrapper:contains("How many versions of the Corner Desk do we have") label:contains("2")',run:"click",},{content:"Missing products",trigger:'div.js_question-wrapper:contains("Do you think we have missing products in our catalog") textarea',run:"edit I don't know products enough to be able to answer that",},{content:"Selecting answer '$80'",trigger:'div.js_question-wrapper:contains("How much do we sell our Cable Management Box") label:contains("$80")',run:"click",},{content:"Ticking answer 'Corner Desk Right Sit'",trigger:'div.js_question-wrapper:contains("Select all the products that sell for $100 or more") label:contains("Corner Desk Right Sit")',run:"click",},{content:"Ticking answer 'Desk Combination'",trigger:'div.js_question-wrapper:contains("Select all the products that sell for $100 or more") label:contains("Desk Combination")',run:"click",},{content:"Ticking answer 'Office Chair Black'",trigger:'div.js_question-wrapper:contains("Select all the products that sell for $100 or more") label:contains("Office Chair Black")',run:"click",},{trigger:'div.js_question-wrapper:contains("What do you think about our prices") label:contains("Correctly priced")',run:"click",},{content:"Inputting answer '60'",trigger:'div.js_question-wrapper:contains("How many days is our money-back guarantee") input',run:"edit 60",},{content:"Inputting answer '01/06/2020'",trigger:'div.js_question-wrapper:contains("If a customer purchases a product on 6 January 2020, what is the latest day we expect to ship it") input',run:"edit 01/06/2020",},{content:"Inputting answer '01/06/2021 00:00:01'",trigger:'div.js_question-wrapper:contains("If a customer purchases a 1 year warranty on 6 January 2020, when do we expect the warranty to expire") input',run:"edit 01/06/2021 00:00:01",},{trigger:'div.js_question-wrapper:contains("What day to you think is best for us to start having an annual sale (not rated)") input',run:"edit Test",},{trigger:'div.js_question-wrapper:contains("What day and time do you think most customers are most likely to call customer service (not rated)") input',run:"edit Test",},{content:"Inputting answer '0'",trigger:'div.js_question-wrapper:contains("How many chairs do you think we should aim to sell in a year (not rated)") input',run:"edit 0",},{content:"Finish Survey",trigger:'button[type="submit"]',run:"click",},{content:"Click on Submit",trigger:'button.btn-primary:contains("Submit")',run:"click",},];const retrySteps=[{trigger:'a:contains("Retry")',run:"click",expectUnloadPage:true,},];var lastSteps=[{trigger:'h1:contains("You scored")',},{trigger:'body:not(:has(a:contains("Retry")))',}];registry.category("web_tour.tours").add("test_certification_failure",{url:"/survey/start/4ead4bc8-b8f2-4760-a682-1fde8daaaaac",steps:()=>[].concat(patchSteps,failSteps,retrySteps,failSteps,lastSteps),});return __exports;});;

/* /survey/static/tests/tours/certification_success.js */
odoo.define('@survey/../tests/tours/certification_success',['@web/core/registry','@web/core/utils/patch'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{patch}=require("@web/core/utils/patch");function patchSurveyForm(){const SurveyForm=odoo.loader.modules.get("@survey/interactions/survey_form").SurveyForm;patch(SurveyForm.prototype,{submitForm(){this.fadeInOutDelay=0;return super.submitForm(...arguments);},});}
registry.category("web_tour.tours").add("test_certification_success",{url:"/survey/start/4ead4bc8-b8f2-4760-a682-1fde8daaaaac",steps:()=>[{content:"Patching Survey Form Interaction",trigger:"body",run:function(){patchSurveyForm();},},{content:"Clicking on Start Certification",trigger:'button.btn.btn-primary.btn-lg:contains("Start Certification")',run:"click",},{content:"Selecting answer 'Yes'",trigger:'div.js_question-wrapper:contains("Do we sell Acoustic Bloc Screens") label:contains("Yes")',run:"click",},{content:"Ticking answer 'Chair floor protection'",trigger:'div.js_question-wrapper:contains("Select all the existing products") label:contains("Chair floor protection")',run:"click",},{content:"Ticking answer 'Drawer'",trigger:'div.js_question-wrapper:contains("Select all the existing products") label:contains("Drawer")',run:"click",},{content:"Ticking answer 'Conference chair'",trigger:'div.js_question-wrapper:contains("Select all the existing products") label:contains("Conference chair")',run:"click",},{content:"Ticking answer 'Color'",trigger:'div.js_question-wrapper:contains("Select all the available customizations for our Customizable Desk") label:contains("Color")',run:"click",},{content:"Ticking answer 'Legs'",trigger:'div.js_question-wrapper:contains("Select all the available customizations for our Customizable Desk") label:contains("Legs")',run:"click",},{content:"Selecting answer '2'",trigger:'div.js_question-wrapper:contains("How many versions of the Corner Desk do we have") label:contains("2")',run:"click",},{content:"Missing products",trigger:'div.js_question-wrapper:contains("Do you think we have missing products in our catalog") textarea',run:"edit I think we should make more versions of the customizable desk, it's such an amazing product!",},{content:"Selecting answer '$80' (wrong one)",trigger:'div.js_question-wrapper:contains("How much do we sell our Cable Management Box") label:contains("$80")',run:"click",},{content:"Ticking answer 'Corner Desk Right Sit'",trigger:'div.js_question-wrapper:contains("Select all the products that sell for $100 or more") label:contains("Corner Desk Right Sit")',run:"click",},{content:"Ticking answer 'Desk Combination'",trigger:'div.js_question-wrapper:contains("Select all the products that sell for $100 or more") label:contains("Desk Combination")',run:"click",},{content:"Ticking answer 'Large Desk'",trigger:'div.js_question-wrapper:contains("Select all the products that sell for $100 or more") label:contains("Large Desk")',run:"click",},{content:"Selecting answer 'Underpriced'",trigger:'div.js_question-wrapper:contains("What do you think about our prices") label:contains("Underpriced")',run:"click",},{content:"Inputting answer '30'",trigger:'div.js_question-wrapper:contains("How many days is our money-back guarantee") input',run:"edit 30",},{content:"Inputting answer '01/08/2020'",trigger:'div.js_question-wrapper:contains("If a customer purchases a product on 6 January 2020, what is the latest day we expect to ship it") input',run:"edit 01/08/2020",},{content:"Inputting answer '01/07/2021 00:00:01'",trigger:'div.js_question-wrapper:contains("If a customer purchases a 1 year warranty on 6 January 2020, when do we expect the warranty to expire") input',run:"edit 01/07/2021 00:00:01",},{content:"Inputting answer '01/01/2021'",trigger:'div.js_question-wrapper:contains("What day to you think is best for us to start having an annual sale (not rated)") input',run:"edit 01/01/2021",},{content:"Inputting answer '01/01/2021 13:00:01'",trigger:'div.js_question-wrapper:contains("What day and time do you think most customers are most likely to call customer service (not rated)") input',run:"edit 01/01/2021 13:00:01",},{content:"Inputting answer '1000'",trigger:'div.js_question-wrapper:contains("How many chairs do you think we should aim to sell in a year (not rated)") input',run:"edit 1000",},{content:"Finish Survey",trigger:'button[type="submit"]',run:"click",},{content:"Click on Submit",trigger:'button.btn-primary:contains("Submit")',run:"click",},{content:"You scored",trigger:'h1:contains("You scored")',},{content:"test passed",trigger:'div:contains("Congratulations, you have passed the test!")',},],});return __exports;});;

/* /survey/static/tests/tours/survey.js */
odoo.define('@survey/../tests/tours/survey',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const survey_steps=(checkPageTranslation)=>[{content:'Click on Start',trigger:'button.btn:contains("Start")',run:"click",},...(checkPageTranslation?checkPageTranslation:[]),{content:'Answer Where do you live',trigger:'div.js_question-wrapper:contains("Where do you live") input',run:"edit Mordor-les-bains",},{content:'Answer Where do you live',trigger:'div.js_question-wrapper:contains("When is your date of birth") input',run:"edit 05/05/1980",},{content:'Answer How frequently do you buy products online',trigger:'div.js_question-wrapper:contains("How frequently do you buy products online") label:contains("Once a month")',run:"click",},{content:'Answer How many times did you order products on our website',trigger:'div.js_question-wrapper:contains("How many times did you order products on our website") input',run:"edit 12",},{content:'Submit and go to Next Page',trigger:'button[value="next"]',run:"click",},...(checkPageTranslation?checkPageTranslation:[]),{content:'Answer Which of the following words would you use to describe our products (High Quality)',trigger:'div.js_question-wrapper:contains("Which of the following words would you use to describe our products") label:contains("High quality")',run:"click",},{content:'Answer Which of the following words would you use to describe our products (Good value for money)',trigger:'div.js_question-wrapper:contains("Which of the following words would you use to describe our products") label:contains("Good value for money")',run:"click",},{content:'Answer What do your think about our new eCommerce (The new layout and design is fresh and up-to-date)',trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("The new layout and design is fresh and up-to-date") td:first',run:"click",},{content:'Answer What do your think about our new eCommerce (It is easy to find the product that I want)',trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("It is easy to find the product that I want") td:eq(2)',run:"click",},{content:'Answer What do your think about our new eCommerce (The tool to compare the products is useful to make a choice)',trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("The tool to compare the products is useful to make a choice") td:eq(3)',run:"click",},{content:'Answer What do your think about our new eCommerce (The checkout process is clear and secure)',trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("The checkout process is clear and secure") td:eq(2)',run:"click",},{content:'Answer What do your think about our new eCommerce (I have added products to my wishlist)',trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("I have added products to my wishlist") td:last',run:"click",},{content:'Answer Do you have any other comments, questions, or concerns',trigger:'div.js_question-wrapper:contains("Do you have any other comments, questions, or concerns") textarea',run:"edit This is great. Really.",},{content:'Answer How would you rate your experience on our website?',trigger:'div.js_question-wrapper:contains("How would you rate your experience on our website") label:contains("4")',run:"click",},{content:'Click Submit and finish the survey',trigger:'button[value="finish"]',run:"click",},{content:"Click on Submit",trigger:".modal-footer button.btn-primary",run:"click",},{content:'Thank you',trigger:'h1:contains("Thank you!")',}];registry.category("web_tour.tours").add("test_survey",{url:"/survey/start/b137640d-14d4-4748-9ef6-344caaaaaae",steps:()=>[{content:"Check that the language selector is hidden",trigger:"select[name='lang_code'].d-none:not(:visible)",},...survey_steps(),],});registry.category("web_tour.tours").add("test_survey_multilang",{url:"/survey/start/b137640d-14d4-4748-9ef6-344caaaaaae",steps:()=>{return[{content:"Select French",trigger:"select[name='lang_code']",run(){const langSelect=document.querySelector("select[name='lang_code']");if(Array.from(langSelect.classList).includes("d-none")){throw new Error("The language selector must not be hidden.");}
langSelect.value="fr_BE";langSelect.dispatchEvent(new Event("change",{bubbles:true}));},expectUnloadPage:true,},{content:"Check French translation",trigger:"h1.o_survey_main_title:contains('Enquête de satisfaction')",},{content:"Select French",trigger:"select[name='lang_code']",run(){const langSelect=document.querySelector("select[name='lang_code']");langSelect.value="fr_BE";langSelect.dispatchEvent(new Event("change",{bubbles:true}));},expectUnloadPage:true,},{content:"Check French translation",trigger:"h1.o_survey_main_title:contains('Enquête de satisfaction')",},...survey_steps([{content:"Check Page translation",trigger:".js_question-wrapper h3:contains('FR: ')",},]),];},});return __exports;});;

/* /survey/static/tests/tours/survey_chained_conditional_questions.js */
odoo.define('@survey/../tests/tours/survey_chained_conditional_questions',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add('test_survey_chained_conditional_questions',{url:'/survey/start/3cfadce3-3f7e-41da-920d-10fa0eb19527',steps:()=>[{content:'Click on Start',trigger:'button.btn:contains("Start")',run:"click",},{content:'Answer Q1 with Answer 1',trigger:'div.js_question-wrapper:contains("Q1") label:contains("Answer 1")',run:"click",},{trigger:'div.js_question-wrapper:contains("Q4")',},{content:'Answer Q2 with Answer 1',trigger:'div.js_question-wrapper:contains("Q2") label:contains("Answer 1")',run:"click",},{content:'Answer Q3 with Answer 1',trigger:'div.js_question-wrapper:contains("Q3") label:contains("Answer 1")',run:"click",},{content:'Answer Q1 with Answer 3',trigger:'div.js_question-wrapper:contains("Q1") label:contains("Answer 3")',run:"click",},{content:'Check that Q2 was hidden',trigger:'div.js_question-wrapper:contains("Q3")',run:()=>{expectHiddenQuestion("Q2");expectHiddenQuestion("Q4");},},{content:'Answer Q3 with Answer 2',trigger:'div.js_question-wrapper:contains("Q3") label:contains("Answer 2")',run:"click",},{content:'Answer Q1 with Answer 2',trigger:'div.js_question-wrapper:contains("Q1") label:contains("Answer 2")',run:"click",},{content:'Check that only question 1 is now visible',trigger:'div.js_question-wrapper:contains("Q1")',run:()=>{expectHiddenQuestion("Q2","Q2's trigger is gone.");expectHiddenQuestion("Q3","No reason to show it now.");expectHiddenQuestion("Q4","No reason to show it now.");},},{content:'Answer Q1 with Answer 3',trigger:'div.js_question-wrapper:contains("Q1") label:contains("Answer 3")',run:"click",},{content:'Check that questions Q2 and Q4 are hidden',trigger:'div.js_question-wrapper:contains("Q1")',run:()=>{expectHiddenQuestion("Q2","Q2 should stay hidden.");expectHiddenQuestion("Q4","Q4 should stay hidden.");},},{content:'Answer Q3 with Answer 2',trigger:'div.js_question-wrapper:contains("Q3") label:contains("Answer 2")',run:"click",},{content:'Answer Q1 with Answer 2',trigger:'div.js_question-wrapper:contains("Q1") label:contains("Answer 2")',run:"click",},{content:'Check that only question 1 is now the only one visible again',trigger:'div.js_question-wrapper:contains("Q1")',run:()=>{expectHiddenQuestion("Q2","Q2's trigger is gone, again.");expectHiddenQuestion("Q3","As Q2's gone, so should this one.");expectHiddenQuestion("Q4","No reason to show it now.");},},{content:'Click Submit and finish the survey',trigger:'button[value="finish"]',run:"click",},{content:"Click on Submit",trigger:'button.btn-primary:contains("Submit")',run:"click",},{content:'Thank you',trigger:'h1:contains("Thank you!")',}]});__exports.expectHiddenQuestion=expectHiddenQuestion;function expectHiddenQuestion(questionTitle,msg){const divs=document.querySelectorAll("div.js_question-wrapper.d-none");const matchingDivs=Array.from(divs).filter((div)=>div.textContent.includes(questionTitle));if(matchingDivs.length!==1){console.error(msg);}}
return __exports;});;

/* /survey/static/tests/tours/survey_conditional_questions_on_different_page.js */
odoo.define('@survey/../tests/tours/survey_conditional_questions_on_different_page',['@web/core/registry','@survey/../tests/tours/survey_chained_conditional_questions'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{expectHiddenQuestion}=require("@survey/../tests/tours/survey_chained_conditional_questions");registry.category("web_tour.tours").add('test_survey_conditional_question_on_different_page',{url:'/survey/start/1cb935bd-2399-4ed1-9e10-c649318fb4dc',steps:()=>[{content:'Click on Start',trigger:'button.btn:contains("Start")',run:"click",},{content:'Answer Q1 with Answer 1',trigger:'div.js_question-wrapper:contains("Q1") label:contains("Answer 1")',run:"click",},{content:'Go to next page',trigger:'button[value="next"]',run:"click",},{content:'Check that Q3 is visible',trigger:'div.js_question-wrapper:contains("Q3")',},{content:'Answer Q2 with Answer 2',trigger:'div.js_question-wrapper:contains("Q2") label:contains("Answer 2")',run:"click",},{content:'Check that Q3 is still visible',trigger:'div.js_question-wrapper:contains("Q3")',},{content:'Go back',trigger:'button[value="previous"]',run:"click",},{content:'Answer Q1 with Answer 2',trigger:'div.js_question-wrapper:contains("Q1") label:contains("Answer 2")',run:"click",},{content:'Go to next page',trigger:'button[value="next"]',run:"click",},{content:'Check that Q3 is hidden',trigger:'div.js_question-wrapper:contains("Q2")',run:()=>expectHiddenQuestion("Q3","Q3 should be hidden as q1_a1 trigger is not selected anymore"),},{content:'Answer Q2 with Answer 1',trigger:'div.js_question-wrapper:contains("Q2") label:contains("Answer 1")',run:"click",},{content:'Check that Q3 is now visible again',trigger:'div.js_question-wrapper:contains("Q3")',}],});return __exports;});;

/* /survey/static/tests/tours/survey_form.js */
odoo.define('@survey/../tests/tours/survey_form',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add('survey_tour_test_survey_form_triggers',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),{content:'Go to Survey',trigger:'.o_app[data-menu-xmlid="survey.menu_surveys"]',run:"click",},{content:"Create a new survey",trigger:".o-kanban-button-new",run:"click",},{content:"Set the Survey's title",trigger:".o_field_widget[name=title] textarea",run:"edit Test survey",},{content:"Add a first question",trigger:"td.o_field_x2many_list_row_add a",run:"click",},{content:"Set the first question's title",trigger:".modal .modal-content .o_field_widget[name=title] input",run:"edit Question 1",},...addTwoAnswers(),...saveAndNew(),{content:"Set the second question's title",trigger:".modal .o_field_widget[name=title] input",run:"edit Question 2",},...addTwoAnswers(),...changeTab("options"),{content:"Set a trigger for the first question",trigger:".modal .o_field_widget[name=triggering_answer_ids] input",run:"click",},{content:"Set the first question's first answer as trigger",trigger:".modal ul.ui-autocomplete a:contains(Question 1 : Answer A)",run:'click',},...changeTab("answers"),...saveAndNew(),{content:"Set the third question's title",trigger:".modal .o_field_widget[name=title] input",run:"edit Question 3",},...addTwoAnswers(),...changeTab("options"),{content:"Set a trigger for the second question",trigger:".modal .o_field_widget[name=triggering_answer_ids] input",run:"click",},{content:"Set the second question's second answer as trigger",trigger:".modal ul.ui-autocomplete a:contains(Question 2 : Answer B)",run:'click',},{trigger:".modal button:contains(save & close)",run:"click",},{trigger:"body:not(:has(.modal))",},{content:"Check that Question 2 has 'normal' trigger icon",trigger:"tr:contains('Question 2') button i.fa-code-fork",},{content:"Check that Question 3 has 'normal' trigger icon",trigger:"tr:contains('Question 3') button i.fa-code-fork",},{content:"Move Question 3 above its trigger (Question 2)",trigger:"div[name=question_and_page_ids] table tr:eq(3) div[name=sequence]",run:"drag_and_drop(div[name=question_and_page_ids] table tr:eq(2))",},{content:"Check that Question 3 has 'warning' trigger icon",trigger:"tr:contains('Question 3') button i.fa-exclamation-triangle",},{content:"Open that question to check the server's misplacement evaluation agrees",trigger:"tr.o_data_row td:contains('Question 3')",run:"click",},{content:"Check that an alert is shown",trigger:".modal .o_form_sheet_bg div:first-child.alert-warning:contains('positioned before some or all of its triggers')",},...changeTab("options"),{content:"Remove invalid trigger",trigger:".modal .o_field_widget[name=triggering_answer_ids] span:contains('Question 2') a.o_delete",run:"click",},{content:"Check that the alert is gone",trigger:`.modal .o_form_sheet_bg div:first-child:not(.alert-warning).o_form_sheet`,},{content:"Choose a new valid trigger",trigger:".modal .o_field_widget[name=triggering_answer_ids] input",run:"click",},{content:"Set the first question's second answer as trigger, then",trigger:'ul.ui-autocomplete a:contains("Question 1 : Answer B")',run:'click',},{content:"Save the question (1)",trigger:".modal button:contains(save)",run:"click",},{trigger:"body:not(:has(.modal))",},{content:"Check that Question 3 has its 'normal' trigger icon back",trigger:"tr:contains('Question 3') button i.fa-code-fork",},{content:"Move Question 3 back below Question 2",trigger:"div[name=question_and_page_ids] table tr:eq(2) div[name=sequence]",run:"drag_and_drop(div[name=question_and_page_ids] table tr:eq(4))",},{content:"Open that question again",trigger:"tr.o_data_row td:contains('Question 3')",run:"click",},...changeTab("options"),{trigger:".modal .modal-content .o_field_widget[name=triggering_answer_ids] input",run(){this.anchor.scrollIntoView(true);}},{content:"Add a second trigger to confirm we can now use Question 2 again",trigger:".modal .modal-content .o_field_widget[name=triggering_answer_ids] input",run:"click",},{content:"Add the second question's second answer as trigger, then",trigger:'.modal-content ul.ui-autocomplete a:contains("Question 2 : Answer B")',run:"click",},{content:"Save the question (2)",trigger:".modal button:contains(save)",run:"click",},{trigger:"body:not(:has(.modal))",},{content:"Move Question 1 back below Question 3",trigger:"div[name=question_and_page_ids] table tr:eq(1) div[name=sequence]",run:"drag_and_drop(div[name=question_and_page_ids] table tr:eq(4))",},{content:"Check that Question 3 has 'warning' trigger icon",trigger:"tr:contains('Question 3') button i.fa-exclamation-triangle",},{content:"Open that question again",trigger:"tr.o_data_row td:contains('Question 3')",run:"click",},{content:"Check that an alert is shown also when only one trigger is misplaced",trigger:".modal .o_form_sheet_bg div:first-child.alert-warning:contains('positioned before some or all of its triggers')",},...changeTab("options"),{content:"Remove temporarily used trigger",trigger:".modal .o_field_widget[name=triggering_answer_ids] span:contains('Question 1') a.o_delete",run:"click",},{content:"Check that the alert is gone in this case too",trigger:`.modal .o_form_sheet_bg div:first-child:not(.alert-warning).o_form_sheet`,},{content:"Save the question (3)",trigger:".modal button:contains(save)",run:"click",},{trigger:"body:not(:has(.modal))",},{content:"Check that Question 3 has its 'normal' trigger icon back",trigger:"tr:contains('Question 3') button i.fa-code-fork",},{content:"Move Question 1 back above Question 2",trigger:"div[name=question_and_page_ids] table tr:eq(3) div[name=sequence]",run:"drag_and_drop(div[name=question_and_page_ids] table tr:eq(1))",},{content:"Open Question 2 again",trigger:"tr.o_data_row td:contains('Question 2')",run:"click",},{content:"Delete Answer B",trigger:"div[name=suggested_answer_ids] tr:contains('Answer B') button[name=delete]",run:"click",},{content:"Save the question (4)",trigger:".modal button:contains(save)",run:"click",},{trigger:"body:not(:has(.modal))",},{content:"Check that Question 3 no longer has a trigger icon",trigger:"div[name=question_and_page_ids] tr:contains('Question 3') div.o_widget_survey_question_trigger:not(:has(button)):not(:visible)",},{content:"Check that Question 2 however still has a trigger icon",trigger:"tr:contains('Question 2') button i.fa-code-fork",},{content:"Delete Question 1",trigger:"tr:contains('Question 1') button[name=delete]",run:"click",},{content:"Check that now Question 2 too does no longer have a trigger icon",trigger:"tr:contains('Question 2') div.o_widget_survey_question_trigger:not(:has(button)):not(:visible)",},{content:'Go back to Kanban View',trigger:'[data-menu-xmlid="survey.menu_survey_form"]',run:"click",},{content:"Check that we arrived on the kanban view",trigger:".o-kanban-button-new",}]});function addTwoAnswers(){return[{content:"Add the first answer",trigger:".modal div[name=suggested_answer_ids] .o_field_x2many_list_row_add a",run:"click",},{trigger:".modal tr.o_selected_row div[name=value] input",run:"edit Answer A",},{content:"Add the second answer",trigger:".modal div[name=suggested_answer_ids] .o_field_x2many_list_row_add a",run:"click",},{trigger:".modal tr:nth-child(2).o_selected_row div[name=value] input",run:"edit Answer B",},];}
function saveAndNew(){return[{content:"Click Save & New",trigger:".modal button.o_form_button_save_new",run:"click",},{content:"Wait for the dialog to render new question form",trigger:".modal div[name=suggested_answer_ids] .o_list_table tbody tr:first-child:not(.o_data_row)",},];}
function changeTab(tabName){return[{content:`Go to ${tabName} tab`,trigger:`.modal .modal-content a[name=${tabName}].nav-link`,run:"click",},{content:`Wait for tab ${tabName} tab`,trigger:`.modal .modal-content a[name=${tabName}].nav-link.active`,},];}
return __exports;});;

/* /survey/static/tests/tours/survey_prefill.js */
odoo.define('@survey/../tests/tours/survey_prefill',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add('test_survey_prefill',{url:'/survey/start/b137640d-14d4-4748-9ef6-344caaaaaae',steps:()=>[{trigger:'button.btn.btn-primary.btn-lg:contains("Start Survey")',run:"click",},{trigger:'div.js_question-wrapper:contains("Where do you live?") input',run:"edit Grand-Rosiere",},{trigger:'div.js_question-wrapper:contains("When is your date of birth?") input',run:"edit 05/05/1980",},{trigger:'div.js_question-wrapper:contains("How frequently do you buy products online?") label:contains("Once a week")',run:"click",},{trigger:'div.js_question-wrapper:contains("How many times did you order products on our website?") input',run:"edit 42",},{content:'Click on Next Page',trigger:'button[value="next"]',run:"click",},{content:'Answer Which of the following words would you use to describe our products (High Quality)',trigger:'div.js_question-wrapper:contains("Which of the following words would you use to describe our products") label:contains("High quality")',run:"click",},{content:'Answer Which of the following words would you use to describe our products (Good value for money)',trigger:'div.js_question-wrapper:contains("Which of the following words would you use to describe our products") label:contains("Good value for money")',run:"click",},{content:'Answer What do your think about our new eCommerce (The new layout and design is fresh and up-to-date)',trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("The new layout and design is fresh and up-to-date") td:first',run:"click",},{content:'Answer What do your think about our new eCommerce (It is easy to find the product that I want)',trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("It is easy to find the product that I want") td:eq(2)',run:"click",},{content:'Answer What do your think about our new eCommerce (The tool to compare the products is useful to make a choice)',trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("The tool to compare the products is useful to make a choice") td:eq(3)',run:"click",},{content:'Answer What do your think about our new eCommerce (The checkout process is clear and secure)',trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("The checkout process is clear and secure") td:eq(2)',run:"click",},{content:'Answer What do your think about our new eCommerce (I have added products to my wishlist)',trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("I have added products to my wishlist") td:last',run:"click",},{content:'Answer Do you have any other comments, questions, or concerns',trigger:'div.js_question-wrapper:contains("Do you have any other comments, questions, or concerns") textarea',run:"edit Is the prefill working?",},{content:'Answer How would you rate your experience on our website?',trigger:'div.js_question-wrapper:contains("How would you rate your experience on our website") label:contains("4")',run:"click",},{content:'Click on the previous page name in the breadcrumb',trigger:'ol.breadcrumb a:first',run:"click",},{content:"check survey is prefilled",trigger:'div.js_question-wrapper:contains("How many times did you order products on our website?") input:value(42)',},{trigger:`div.js_question-wrapper:contains("Where do you live?") input:value(Grand-Rosiere)`,},{trigger:`div.js_question-wrapper:contains("When is your date of birth?") input:value(05/05/1980)`,},{trigger:`div.js_question-wrapper:contains("How frequently do you buy products online?) label:contains("Once a week") input:hidden:checked`,},{trigger:".o_survey_title",run:"click",},{content:"Click on Next Page",trigger:'button[value="next"]',run:"click",},{trigger:'div.js_question-wrapper:contains("Do you have any other comments, questions, or concerns") textarea:value(Is the prefill working?)',},{trigger:'div.js_question-wrapper:contains("Which of the following words would you use to describe our products") label:contains("High quality") input:hidden:checked',},{trigger:'div.js_question-wrapper:contains("Which of the following words would you use to describe our products") label:contains("Good value for money") input:hidden:checked',},{trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("The new layout and design is fresh and up-to-date") input:first:hidden:checked',},{trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("It is easy to find the product that I want") input:eq(2):hidden:checked',},{trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("The tool to compare the products is useful to make a choice") input:eq(3):hidden:checked',},{trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("The checkout process is clear and secure") input:eq(2):hidden:checked',},{trigger:'div.js_question-wrapper:contains("What do your think about our new eCommerce") tr:contains("I have added products to my wishlist") input:last:hidden:checked',},{trigger:'div.js_question-wrapper:contains("How would you rate your experience on our website") label:contains("4") input:hidden:checked',},],});return __exports;});;

/* /survey/static/tests/tours/survey_roaming_mandatory_questions.js */
odoo.define('@survey/../tests/tours/survey_roaming_mandatory_questions',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require('@web/core/registry');registry.category('web_tour.tours').add('test_survey_roaming_mandatory_questions',{url:'/survey/start/853ebb30-40f2-43bf-a95a-bbf0e367a365',steps:()=>[{content:'Click on Start',trigger:'button.btn:contains("Start")',run:"click",},{content:'Skip question Q1',trigger:'button.btn:contains("Continue")',run:"click",},{trigger:'div.js_question-wrapper:contains("Q2")',},{content:'Skip question Q2',trigger:'button.btn:contains("Continue")',run:"click",},{content:'Check if Q3 button is Submit',trigger:'button.btn:contains("Submit")',},{content:'Go back to Q2',trigger:'button.btn[value="previous"]',run:"click",},{content:'Check if the alert box is present',trigger:'div.o_survey_question_error span',},{content:'Skip question Q2 again',trigger:'button.btn:contains("Continue")',run:"click",},{content:'Answer Q3',trigger:'div.js_question-wrapper:contains("Q3") label:contains("Answer 1")',run:"click",},{content:'Click on Submit',trigger:'button.btn:contains("Submit")',run:"click",},{content:"Click on Submit",trigger:'button.btn-primary:contains("Submit")',run:"click",},{content:'Check if question is Q1',trigger:'div.js_question-wrapper:contains("Q1")',},{content:'Click on "Next Skipped" button',trigger:'button.btn:contains("Next Skipped")',run:"click",},{content:'Check if question is Q2',trigger:'div.js_question-wrapper:contains("Q2")',},{content:'Click on "Next Skipped" button',trigger:'button.btn:contains("Next Skipped")',run:"click",},{content:'Check if question is Q1 again (should loop on skipped questions)',trigger:'div.js_question-wrapper:contains("Q1")',},{content:'Answer Q1',trigger:'div.js_question-wrapper:contains("Q1") label:contains("Answer 2")',run:"click",},{content:'Check if the visible question is the skipped question Q2',trigger:'div.js_question-wrapper:contains("Q2")',},{content:'Answer Q2',trigger:'div.js_question-wrapper:contains("Q2") label:contains("Answer 3")',run:"click",},{content:'Click on Submit',trigger:'button.btn:contains("Submit")',run:"click",},{content:"Click on Submit",trigger:'button.btn-primary:contains("Submit")',run:"click",},{content:'Check if the survey is done',trigger:'div.o_survey_finished h1:contains("Thank you!")',}],});return __exports;});;

/* /website_livechat/static/tests/tours/lazy_frontend_bus_tour.js */
odoo.define('@website_livechat/../tests/tours/lazy_frontend_bus_tour',['@bus/services/worker_service','@web/../tests/helpers/utils','@web/core/registry'],function(require){'use strict';let __exports={};const{WORKER_STATE}=require("@bus/services/worker_service");const{patchWithCleanup}=require("@web/../tests/helpers/utils");const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("website_livechat.lazy_frontend_bus",{url:"/",steps:()=>{const busService=odoo.__WOWL_DEBUG__.root.env.services.bus_service;if(busService.isActive){throw new Error("The bus service should not be started at page load.");}
patchWithCleanup(busService,{start(){document.body.classList.add("o-bus-service-started");return super.start(...arguments);},});const workerService=odoo.__WOWL_DEBUG__.root.env.services.worker_service;if(workerService._state!==WORKER_STATE.UNINITIALIZED){throw new Error("The worker service should not be started at page load.");}
patchWithCleanup(workerService,{ensureWorkerStarted(){document.body.classList.add("o-worker-service-started");return super.ensureWorkerStarted(...arguments);},});odoo.__WOWL_DEBUG__.root.env.services["mail.store"].isReady.then(()=>document.body.classList.add("o-mail-store-ready"));return[{trigger:"body.o-mail-store-ready:not(.o-bus-service-started):not(.o-worker-service-started)",},{trigger:".o-livechat-root:shadow .o-livechat-LivechatButton",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"edit Hello, I need help!",},{trigger:"body:not(.o-bus-service-started):not(.o-worker-service-started)",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"press Enter",},{trigger:"body.o-bus-service-started.o-worker-service-started"},];},});return __exports;});;

/* /website_livechat/static/tests/tours/website_livechat_as_portal.js */
odoo.define('@website_livechat/../tests/tours/website_livechat_as_portal',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("website_livechat_as_portal_tour",{steps:()=>[{trigger:".o-livechat-root:shadow .o-livechat-LivechatButton",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"edit Hello, I need help!",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"press Enter",},{trigger:".o-livechat-root:shadow .o-mail-Message:contains('Hello, I need help!')",},],});return __exports;});;

/* /website_livechat/static/tests/tours/website_livechat_chatbot_after_reload.js */
odoo.define('@website_livechat/../tests/tours/website_livechat_chatbot_after_reload',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const messagesContain=(text)=>`.o-livechat-root:shadow .o-mail-Message:contains("${text}")`;registry.category("web_tour.tours").add("website_livechat_chatbot_after_reload_tour",{steps:()=>[{trigger:messagesContain("Hello! I'm a bot!"),run:"click",},{content:"Reload the page",trigger:messagesContain("How can I help you?"),run:()=>location.reload(),expectUnloadPage:true,},{trigger:".o-livechat-root:shadow .o-livechat-LivechatButton",run:"click",},{trigger:messagesContain("Hello! I'm a bot!"),},],});return __exports;});;

/* /website_livechat/static/tests/tours/website_livechat_chatbot_continue.js */
odoo.define('@website_livechat/../tests/tours/website_livechat_chatbot_continue',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const messagesContain=(text)=>`.o-livechat-root:shadow .o-mail-Message:contains("${text}")`;registry.category("web_tour.tours").add("website_livechat.chatbot_continue_tour",{steps:()=>[{trigger:messagesContain("Hello, what can I do for you?"),},{trigger:".o-livechat-root:shadow button:contains(No, thank you for your time.)",run:"click",},{trigger:".o-livechat-root:shadow span:contains(This livechat conversation has ended.)",},{trigger:".o-livechat-root:shadow button[title='Give your feedback']",run:"click",},{trigger:".o-livechat-root:shadow *:contains(Did we correctly answer your question?)",},],});return __exports;});;

/* /website_livechat/static/tests/tours/website_livechat_chatbot_flow.js */
odoo.define('@website_livechat/../tests/tours/website_livechat_chatbot_flow',['@web/../tests/helpers/utils','@web/../tests/utils','@web/core/registry','@web/core/utils/concurrency','@im_livechat/core/common/chatbot_model'],function(require){'use strict';let __exports={};const{patchWithCleanup}=require("@web/../tests/helpers/utils");const{contains}=require("@web/../tests/utils");const{registry}=require("@web/core/registry");const{Deferred}=require("@web/core/utils/concurrency");const{Chatbot}=require("@im_livechat/core/common/chatbot_model");const messagesContain=(text)=>`.o-livechat-root:shadow .o-mail-Message:contains("${text}")`;let chatbotDelayProcessingDef;registry.category("web_tour.tours").add("website_livechat_chatbot_flow_tour",{steps:()=>{patchWithCleanup(Chatbot.prototype,{async _delayThenProcessAnswerAgain(message){chatbotDelayProcessingDef?.resolve();return await super._delayThenProcessAnswerAgain(message);},});patchWithCleanup(Chatbot,{MESSAGE_DELAY:0,MULTILINE_STEP_DEBOUNCE_DELAY:2000,TYPING_DELAY:0,});return[{trigger:messagesContain("I help lost visitors find their way."),},{trigger:messagesContain("How can I help you?"),run(){if(this.anchor.querySelector(".o-mail-Message-actions [title='Add a Reaction']")){console.error("Reactions should not be available before thread is persisted.");}},},{trigger:'.o-livechat-root:shadow button:contains("I\'d like to buy the software")',run:"click",},{trigger:".o-livechat-root:shadow .o-mail-ChatWindow",async run(){await contains(".o-mail-Message-actions [title='Add a Reaction']",{target:this.anchor.getRootNode(),parent:[".o-mail-Message",{text:"I'd like to buy the software"}],});},},{trigger:messagesContain("Can you give us your email please?"),},{trigger:".o-livechat-root:shadow .o-mail-Composer-input ",run:"edit No, you won't get my email!",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"press Enter",},{trigger:messagesContain("'No, you won't get my email!' does not look like a valid email. Can you please try again?"),},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"edit okfine@fakeemail.com",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"press Enter",},{trigger:messagesContain("Your email is validated, thank you!"),},{trigger:messagesContain("Would you mind providing your website address?"),},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"edit https://www.fakeaddress.com",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"press Enter",},{trigger:messagesContain("Great, do you want to leave any feedback for us to improve?"),},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"edit Yes, actually, I'm glad you asked!",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"press Enter",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"edit I think it's outrageous that you ask for all my personal information!",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"press Enter",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"edit I will be sure to take this to your manager!",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"press Enter",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"edit I want to say...",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",async run(helpers){chatbotDelayProcessingDef=new Deferred();let failTimeout=setTimeout(()=>{chatbotDelayProcessingDef.reject("Chatbot should stay in multi line step when user is typing.");},5000);chatbotDelayProcessingDef.then(()=>clearTimeout(failTimeout));helpers.edit("Never mind!");await chatbotDelayProcessingDef;chatbotDelayProcessingDef=new Deferred();failTimeout=setTimeout(()=>{chatbotDelayProcessingDef.reject("Chatbot should stay in multi line step if user isn't done typing.");},5000);chatbotDelayProcessingDef.then(()=>clearTimeout(failTimeout));helpers.edit("Never mind!!!");await chatbotDelayProcessingDef;},},{trigger:messagesContain("Ok bye!"),},{trigger:".o-livechat-root:shadow .o-mail-ChatWindow-header [title='Restart Conversation']",run:"click",},{trigger:messagesContain("Restarting conversation..."),},{trigger:messagesContain("Hello! I'm a bot!"),},{trigger:messagesContain("I help lost visitors find their way."),},{trigger:messagesContain("How can I help you?"),},{trigger:'.o-livechat-root:shadow button:contains("Pricing Question")',run:"click",},{trigger:messagesContain("For any pricing question, feel free ton contact us at pricing@mycompany.com"),},{trigger:messagesContain("We will reach back to you as soon as we can!"),},{trigger:messagesContain("Would you mind providing your website address?"),},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"edit no",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"press Enter",},{trigger:messagesContain("Great, do you want to leave any feedback for us to improve?"),},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"edit no, nothing so say",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"press Enter",},{trigger:messagesContain("Ok bye!"),run:"click",},{trigger:".o-livechat-root:shadow .o-mail-ChatWindow-header [title='Restart Conversation']",run:"click",},{trigger:".o-livechat-root:shadow button:contains(I want to speak with an operator)",run:"click",},{trigger:messagesContain("I will transfer you to a human."),},{trigger:".o-livechat-root:shadow .o-mail-Composer-input:enabled",},];},});return __exports;});;

/* /website_livechat/static/tests/tours/website_livechat_chatbot_forward.js */
odoo.define('@website_livechat/../tests/tours/website_livechat_chatbot_forward',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const messagesContain=(text)=>`.o-livechat-root:shadow .o-mail-Message:contains("${text}")`;registry.category("web_tour.tours").add("website_livechat.chatbot_forward",{url:"/",steps:()=>[{trigger:".o-livechat-root:shadow .o-livechat-LivechatButton",run:"click",},{trigger:messagesContain("Hello, what can I do for you?"),},{trigger:".o-livechat-root:shadow button:contains(Forward to operator)",run:"click",},{trigger:messagesContain("I'll forward you to an operator."),},{trigger:".o-livechat-root:shadow .o-mail-Composer-input:enabled",run:"edit Hello, I need help!",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"press Enter",},{trigger:messagesContain("Hello, I need help!"),},{trigger:".o-livechat-root:shadow .o-mail-Composer-input:enabled",},],});return __exports;});;

/* /website_livechat/static/tests/tours/website_livechat_chatbot_fw_operator_matching_lang.js */
odoo.define('@website_livechat/../tests/tours/website_livechat_chatbot_fw_operator_matching_lang',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("chatbot_fw_operator_matching_lang",{steps:()=>[{trigger:".o-livechat-root:shadow .o-mail-Message:contains('Hello! I'm a bot!')"},{trigger:".o-livechat-root:shadow button:contains(I want to speak with an operator)",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input:enabled",},],});return __exports;});;

/* /website_livechat/static/tests/tours/website_livechat_chatbot_redirect.js */
odoo.define('@website_livechat/../tests/tours/website_livechat_chatbot_redirect',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("website_livechat.chatbot_redirect",{url:"/contactus",steps:()=>[{trigger:".o-livechat-root:shadow .o-livechat-LivechatButton",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-Message:contains(Hello, were do you want to go?)",run:"click",},{trigger:".o-livechat-root:shadow button:contains(Go to the #chatbot-redirect anchor)",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-Message:contains(Tadam, we are on the page you asked for!)",run(){const url=new URL(location.href);if(url.pathname!=="/contactus"||url.hash!=="#chatbot-redirect"){throw new Error("Chatbot should have redirected to the #chatbot-redirect anchor.");}},},{trigger:".o-livechat-root:shadow button[title='Restart Conversation']",run:"click",},{trigger:".o-livechat-root:shadow button:contains(Go to the /chatbot-redirect page)",run:"click",expectUnloadPage:true,},{isActive:["mobile"],trigger:".o-livechat-root:shadow .o-mail-ChatBubble[name='Redirection Bot']",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-Message:contains('Go to the /chatbot-redirect page')",},{trigger:".o-livechat-root:shadow .o-mail-Message:last:contains('Tadam')",run(){const url=new URL(location.href);if(url.pathname!=="/chatbot-redirect"){throw new Error("Chatbot should have redirected to the /chatbot-redirect page.");}},},],});return __exports;});;

/* /website_livechat/static/tests/tours/website_livechat_chatbot_restart.js */
odoo.define('@website_livechat/../tests/tours/website_livechat_chatbot_restart',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const stepsUntilLastMessage=[{trigger:".o-livechat-root:shadow .o-mail-Message:contains(Enter your email address)",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"edit test@example.com",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"press Enter",},{trigger:".o-livechat-root:shadow .o-mail-Message:contains(Do you want to restart the conversation?)",},];registry.category("web_tour.tours").add("website_livechat.chatbot_restart_on_feedback_tour",{steps:()=>[{trigger:".o-livechat-root:shadow .o-livechat-LivechatButton",run:"click",},...stepsUntilLastMessage,{trigger:".o-livechat-root:shadow button:contains(Yes, restart please.)",run:"click",},{trigger:".o-livechat-root:shadow button[title='Restart Conversation']",run:"click",},...stepsUntilLastMessage,{trigger:".o-livechat-root:shadow button:contains(Yes, restart please.)",run:"click",},{trigger:".o-livechat-root:shadow button:contains(Continue)",run:"click",},{trigger:".o-livechat-root:shadow div:contains(Did we correctly answer your question?)",},{trigger:".o-livechat-root:shadow button[title='Restart Conversation']",run:"click",},...stepsUntilLastMessage,{trigger:".o-livechat-root:shadow button[title='Close Chat Window (ESC)']",run:"click",},{trigger:".o-livechat-root:shadow button:contains(Yes, leave conversation)",run:"click",},{trigger:".o-livechat-root:shadow div:contains(Did we correctly answer your question?)",},{trigger:'.o-livechat-root:shadow .o-mail-ChatWindow-header:not(:has(button[title="Restart Conversation"]))',},],});return __exports;});;

/* /website_livechat/static/tests/tours/website_livechat_chatbot_test_page_tour.js */
odoo.define('@website_livechat/../tests/tours/website_livechat_chatbot_test_page_tour',['@web/core/registry','@web/../tests/utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{contains}=require("@web/../tests/utils");const messagesContain=(text)=>`.o-livechat-root:shadow .o-mail-Message:contains("${text}")`;registry.category("web_tour.tours").add("website_livechat_chatbot_test_page_tour",{steps:()=>[{trigger:messagesContain("Hello! I'm a bot!"),async run(){const ChatHub=this.anchor.closest(".o-mail-ChatHub");await contains(".o-mail-ChatWindow",{text:"Testing Bot",count:1,target:ChatHub,});},},{trigger:messagesContain("I help lost visitors find their way."),run:"click",},{trigger:messagesContain("How can I help you?"),run:"click",},{trigger:'.o-livechat-root:shadow button:contains("I\'d like to buy the software")',run:"click",},{trigger:messagesContain("Can you give us your email please?"),run(){window.location.reload();},expectUnloadPage:true,},{trigger:messagesContain("Hello! I'm a bot!"),async run(){const ChatHub=this.anchor.closest(".o-mail-ChatHub");await contains(".o-mail-ChatWindow",{text:"Testing Bot",count:1,target:ChatHub,});},},{trigger:'.o-livechat-root:shadow button:contains("Other & Documentation")',run:"click",},{trigger:messagesContain("Please find documentation at"),run:()=>{},},{trigger:".o-livechat-root:shadow [title='Close Chat Window (ESC)']",run:"click",},{trigger:".o-livechat-root:shadow button:contains('Yes, leave conversation')",run:"click",},{trigger:".o-livechat-root:shadow p:contains('Did we correctly answer your question?')",async run(){await contains("button",{target:this.anchor.getRootNode(),text:"Close"});await contains("button",{target:this.anchor.getRootNode(),text:"New Session",count:0,});},},{trigger:".o-livechat-root:shadow button:contains('Close')",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-ChatHub:not(:visible)",content:"Livechat Button should not be visible",},],});return __exports;});;

/* /website_livechat/static/tests/tours/website_livechat_chatbot_trigger_selection_tour.js */
odoo.define('@website_livechat/../tests/tours/website_livechat_chatbot_trigger_selection_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const answerBothQuestions=[{trigger:".o-livechat-root:shadow .o-mail-Message:contains(Hello, here is a first question?)",},{trigger:".o-livechat-root:shadow button:contains(Yes to first question)",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-Message:contains(Hello, here is a second question?)",},{trigger:".o-livechat-root:shadow button:contains(No to second question)",run:"click",},];registry.category("web_tour.tours").add("website_livechat.chatbot_trigger_selection",{url:"/contactus",steps:()=>[{trigger:".o-livechat-root:shadow .o-livechat-LivechatButton",run:"click",},...answerBothQuestions,{trigger:".o-livechat-root:shadow button[title='Restart Conversation']",run:"click",},...answerBothQuestions,{trigger:".o-livechat-root:shadow button[title='Restart Conversation']",},],});return __exports;});;

/* /website_livechat/static/tests/tours/website_livechat_chatbot_user_input_tour.js */
odoo.define('@website_livechat/../tests/tours/website_livechat_chatbot_user_input_tour',['@web/core/registry','@web/core/network/rpc'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{rpcBus}=require("@web/core/network/rpc");registry.category("web_tour.tours").add("website_livechat.chatbot_user_input_saved_on_last_step",{steps:()=>[{trigger:".o-livechat-root:shadow .o-livechat-LivechatButton",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-Message:contains(Enter your phone number)",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"edit +919876543210",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"press Enter",},{trigger:".o-livechat-root:shadow .o-mail-Message:contains(Enter your email address)",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"edit test@example.com",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",async run(helpers){let requestId;rpcBus.addEventListener("RPC:REQUEST",function onRequest({detail}){if(detail.url==="/chatbot/step/trigger"){requestId=detail.data.id;rpcBus.removeEventListener("RPC:REQUEST",onRequest);}});await helpers.press("ENTER");await new Promise((resolve)=>{rpcBus.addEventListener("RPC:RESPONSE",function onResponse({detail}){if(detail.data.id===requestId){rpcBus.removeEventListener("RPC:RESPONSE",onResponse);resolve();}});});},},{trigger:".o-livechat-root:shadow span:contains(This livechat conversation has ended)",},],});return __exports;});;

/* /website_livechat/static/tests/tours/website_livechat_common.js */
odoo.define('@website_livechat/../tests/tours/website_livechat_common',[],function(require){'use strict';let __exports={};const start=__exports.start=[{content:"click on livechat widget",trigger:".o-livechat-root:shadow .o-livechat-LivechatButton",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-ChatWindow:contains(El Deboulonnator) .o-mail-Thread[data-transient]",},{content:"Say hello!",trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"edit Hello Sir!",},{content:"Send the message",trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"press Enter",},{content:"Verify the message has been sent",trigger:".o-livechat-root:shadow .o-mail-ChatWindow:contains(El Deboulonnator) .o-mail-Thread:not([data-transient])",async run({waitFor}){await waitFor(".o-mail-Message:contains('Hello Sir!')",{root:this.anchor,only:true,timeout:5000,});},},];const closeChat=__exports.closeChat=[{content:"Close the chat window",trigger:".o-livechat-root:shadow .o-mail-ChatWindow-header [title*=Close]",run:"click",},];const confirmnClose=__exports.confirmnClose=[{content:"Close confirmation",trigger:".o-livechat-root:shadow .o-livechat-CloseConfirmation-leave",run:"click",},];const feedback=__exports.feedback=[{content:"Patching Livechat",trigger:".o-livechat-root:shadow textarea[placeholder='Explain your note']",run:function(){document.body.classList.add("feedback_sent");},},{content:"Type a feedback",trigger:".o-livechat-root:shadow textarea[placeholder='Explain your note']",run:"edit ;-) This was really helpful. Thanks ;-)!",},{content:"Send the feedback",trigger:".o-livechat-root:shadow button:contains(Send):enabled",run:"click",},{content:"Thanks for your feedback",trigger:".o-livechat-root:shadow p:contains('Thank you for your feedback')",},];const emailTranscript=__exports.emailTranscript=[{content:"Check email field",trigger:".o-livechat-root:shadow input:value(e.e@example.com)",},{content:"Send the conversation to your email address",trigger:".o-livechat-root:shadow button[data-action=sendTranscript]",run:"click",},{content:"Check conversation is sent",trigger:".o-livechat-root:shadow .form-text:contains(The conversation was sent)",run:"click",},];const downloadTranscript=__exports.downloadTranscript=[{content:"Download transcript",trigger:".o-livechat-root:shadow .btn[title='Download a copy of this conversation']",run:"click",},];const close=__exports.close=[{content:"Close the conversation with the x button",trigger:".o-livechat-root:shadow .o-mail-ChatWindow-header [title*=Close]",run:"click",},{content:"Check that the button is not displayed anymore",trigger:".o-livechat-root:shadow .o-mail-ChatHub:not(:visible)",run(){if(this.anchor.querySelectorAll(".o-livechat-livechatButton").length){console.error(`There should have no .o-livechat-livechatButton...`);}},},];const goodRating=__exports.goodRating=[{content:"Choose Good Rating",trigger:`.o-livechat-root:shadow img[src*=rating][alt="5"]`,run:"click",},];const okRating=__exports.okRating=[{content:"Choose ok Rating",trigger:`.o-livechat-root:shadow img[src*=rating][alt="3"]`,run:"click",},];const sadRating=__exports.sadRating=[{content:"Choose bad Rating",trigger:`.o-livechat-root:shadow img[src*=rating][alt="1"]`,run:"click",},];return __exports;});;

/* /website_livechat/static/tests/tours/website_livechat_no_new_session_with_hide_rule.js */
odoo.define('@website_livechat/../tests/tours/website_livechat_no_new_session_with_hide_rule',['@web/core/registry','@web/../tests/utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{contains,click}=require("@web/../tests/utils");const sendFirstMessageSteps=[{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"edit Hello, I need help!",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"press Enter",},{trigger:".o-livechat-root:shadow .o-mail-Thread:not([data-transient]) .o-mail-Message:contains('Hello, I need help!')",},];registry.category("web_tour.tours").add("website_livechat_no_session_with_hide_rule",{steps:()=>[{trigger:".o-livechat-root:shadow .o-livechat-LivechatButton",run:"click",},...sendFirstMessageSteps,{trigger:".o-livechat-root:shadow [title='Close Chat Window (ESC)']",run:"click",},{trigger:".o-livechat-root:shadow button:contains('Yes, leave conversation')",run:"click",},{trigger:".o-livechat-root:shadow p:contains('Did we correctly answer your question?')",async run(){await click("button",{target:this.anchor.getRootNode(),text:"New Session"});},},...sendFirstMessageSteps,{trigger:"body",run:()=>(window.location="/"),expectUnloadPage:true,},{trigger:".o-livechat-root:shadow [title='Close Chat Window (ESC)']",run:"click",},{trigger:".o-livechat-root:shadow button:contains('Yes, leave conversation')",run:"click",},{trigger:".o-livechat-root:shadow p:contains('Did we correctly answer your question?')",async run(){await contains("button",{target:this.anchor.getRootNode(),text:"Close"});await contains("button",{target:this.anchor.getRootNode(),text:"New Session",count:0,});},},],});return __exports;});;

/* /website_livechat/static/tests/tours/website_livechat_question_selection_overlapping_answers.js */
odoo.define('@website_livechat/../tests/tours/website_livechat_question_selection_overlapping_answers',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("website_livechat.question_selection_overlapping_answers",{steps:()=>[{trigger:".o-livechat-root:shadow .o-livechat-LivechatButton",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-Message:contains(Choose an option)"},{trigger:".o-livechat-root:shadow li button:eq(0)",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-Message:contains(You selected not X)"},{trigger:".o-livechat-root:shadow button[title='Restart Conversation']",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-Message:contains(Choose an option)"},{trigger:".o-livechat-root:shadow li button:eq(1)",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-Message:contains(You selected X)"},{trigger:".o-livechat-root:shadow button[title='Restart Conversation']",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-Message:contains(Choose an option)"},{trigger:".o-livechat-root:shadow li button:eq(2)",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-Message:contains(You selected maybe X)"},{trigger:".o-livechat-root:shadow span:contains(This livechat conversation has ended.)"},{trigger:".o-livechat-root:shadow .o-mail-ChatWindow-header [title*=Close]",run:"click",},{trigger:".o-livechat-root:shadow p:contains(Did we correctly answer your question?)"},],});return __exports;});;

/* /website_livechat/static/tests/tours/website_livechat_rating.js */
odoo.define('@website_livechat/../tests/tours/website_livechat_rating',['@website_livechat/../tests/tours/website_livechat_common','@web/core/registry'],function(require){'use strict';let __exports={};const{start,closeChat,goodRating,okRating,sadRating,feedback,downloadTranscript,emailTranscript,close,confirmnClose,}=require("@website_livechat/../tests/tours/website_livechat_common");const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("website_livechat_complete_flow_tour",{url:"/",steps:()=>[].concat(start,closeChat,confirmnClose,okRating,feedback,downloadTranscript,close),});registry.category("web_tour.tours").add("website_livechat_complete_flow_tour_logged_in",{url:"/",steps:()=>[].concat(start,closeChat,confirmnClose,okRating,feedback,emailTranscript,close),});registry.category("web_tour.tours").add("website_livechat_happy_rating_tour",{url:"/",steps:()=>[].concat(start,closeChat,confirmnClose,goodRating,feedback),});registry.category("web_tour.tours").add("website_livechat_ok_rating_tour",{url:"/",steps:()=>[].concat(start,closeChat,confirmnClose,okRating,feedback),});registry.category("web_tour.tours").add("website_livechat_sad_rating_tour",{url:"/",steps:()=>[].concat(start,closeChat,confirmnClose,sadRating,feedback),});registry.category("web_tour.tours").add("website_livechat_no_rating_tour",{url:"/",steps:()=>[].concat(start,closeChat,confirmnClose,downloadTranscript,close),});registry.category("web_tour.tours").add("website_livechat_no_rating_no_close_tour",{url:"/",steps:()=>[].concat(start),});return __exports;});;

/* /website_livechat/static/tests/tours/website_livechat_request.js */
odoo.define('@website_livechat/../tests/tours/website_livechat_request',['@website_livechat/../tests/tours/website_livechat_common','@web/core/registry'],function(require){'use strict';let __exports={};const{closeChat,okRating,feedback,downloadTranscript,confirmnClose,}=require("@website_livechat/../tests/tours/website_livechat_common");const{registry}=require("@web/core/registry");const chatRequest=[{content:"Answer the chat request!",trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"edit Hi ! What a coincidence! I need your help indeed.",},{content:"Send the message",trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"press Enter",},{content:"Verify your message has been typed",trigger:".o-livechat-root:shadow .o-mail-Message:contains('Hi ! What a coincidence! I need your help indeed.')",run:"click",},{content:"Verify there is no duplicates",trigger:".o-livechat-root:shadow .o-mail-Thread",run({queryAll}){if(queryAll(".o-mail-Message:contains('Hi ! What a coincidence! I need your help indeed.')",{root:this.anchor}).length===1){document.body.classList.add("no_duplicated_message");}},},{content:"Is your message correctly sent ?",trigger:"body.no_duplicated_message",},];registry.category("web_tour.tours").add("website_livechat_chat_request",{url:"/",steps:()=>[].concat(chatRequest,closeChat,confirmnClose,okRating,feedback,downloadTranscript),});return __exports;});;

/* /website_livechat/static/tests/tours/website_livechat_session_user_changes.js */
odoo.define('@website_livechat/../tests/tours/website_livechat_session_user_changes',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("website_livechat_logout_after_chat_start",{url:"/",steps:()=>[{trigger:".o-livechat-root:shadow .o-livechat-LivechatButton",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"edit Hello!",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"press Enter",},{trigger:".o-livechat-root:shadow .o-mail-Thread:not([data-transient]) .o-mail-Message-content:contains('Hello!')",run:"click",},{trigger:"header#top a:contains(Mitchell Admin)",run:"click",},{trigger:"a:contains(Logout)",run:"click",expectUnloadPage:true,},{content:"Livechat button is present since the old livechat session was linked to the logged user, not the public one.",trigger:".o-livechat-root:shadow .o-livechat-LivechatButton",},],});return __exports;});;

/* /website_livechat/static/tests/tours/website_livechat_user_known_after_reload.js */
odoo.define('@website_livechat/../tests/tours/website_livechat_user_known_after_reload',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("website_livechat_user_known_after_reload",{steps:()=>[{trigger:".o-livechat-root:shadow .o-livechat-LivechatButton",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"edit Hello, I need help!",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"press Enter",},{trigger:".o-livechat-root:shadow .o-mail-Thread:not([data-transient]) .o-mail-Message:contains('Hello, I need help!').o-selfAuthored ",run(){window.location.reload();},expectUnloadPage:true,},{trigger:".o-livechat-root:shadow .o-mail-Message:contains('Hello, I need help!').o-selfAuthored ",},],});return __exports;});;

/* /project_todo/static/tests/tours/project_task_activities_split.js */
odoo.define('@project_todo/../tests/tours/project_task_activities_split',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add('project_task_activities_split',{url:'/odoo',steps:()=>[{content:'Open Activity Systray',trigger:'.o-mail-ActivityMenu-counter',run:"click",},{content:'Open Task Activities',trigger:'.o-mail-ActivityGroup:contains("Task")',run:"click",},{content:'Task "New Task!" is listed in the activity view',trigger:'td.o_data_cell:contains("New Task!")',},{trigger:".o_control_panel_navigation button i.fa-sliders",content:"Open embedded actions dropdown",run:"click",},{content:'Click on `Show Sub-Tasks` button to see sub-tasks in the main view',trigger:"span.o-dropdown-item:contains('Show Sub-Tasks')",run:'click',},{content:'Task "New Sub-Task!" is listed in the activity view',trigger:'td.o_data_cell:contains("New Sub-Task!")',run:()=>{const nodes=document.querySelectorAll(".o_activity_record .d-block");for(const node of nodes){if(node.textContent==="New To-do!"){console.error('Private task records with no parent task should not appear in this view');}}},},{content:'Open Activity Systray',trigger:'.o-mail-ActivityMenu-counter',run:"click",},{content:'Open To-Do Activities',trigger:'.o-mail-ActivityGroup:contains("To-Do")',run:"click",},{content:'Record "New To-Do!" is listed in the activity view',trigger:'td.o_data_cell:contains("New To-Do!")',run:()=>{const nodes=document.querySelectorAll(".o_activity_record .d-block");for(const node of nodes){if(node.textContent==="New Task!"||node.textContent==="New Sub-Task!"){console.error('Tasks linked to a project should not appear in this view');}}},}],});return __exports;});;

/* /project_todo/static/tests/tours/project_todo_history.js */
odoo.define('@project_todo/../tests/tours/project_todo_history',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");const baseDescriptionContent="Test project todo history version";const descriptionField=`div.note-editable.odoo-editor-editable div.o-paragraph`;function changeDescriptionContentAndSave(newContent){const newText=`${baseDescriptionContent} ${newContent}`;return[{trigger:"div.note-editable.odoo-editor-editable",run:"click",},{trigger:descriptionField,run:`editor ${newText}`,},{trigger:"button.o_form_button_save",run:"click",},{content:"Wait the form is saved",trigger:".o_form_saved",},];}
registry.category("web_tour.tours").add("project_todo_history_tour",{url:"/odoo?debug=1,tests",steps:()=>[stepUtils.showAppsMenuItem(),{content:"Open the Todo app",trigger:".o_app[data-menu-xmlid='project_todo.menu_todo_todos']",run:"click",},{content:"Open Test Todo",trigger:".o_kanban_view .o_kanban_record:contains(Test History Todo)",run:"click",},...changeDescriptionContentAndSave("0"),...changeDescriptionContentAndSave("1"),...changeDescriptionContentAndSave("2"),...changeDescriptionContentAndSave("3"),{content:"Go back to kanban view of todos. this step is added because it takes some time to save the changes, so it's a sort of timeout to wait a bit for the save",trigger:".o_back_button a",run:"click",},{content:"Open Test Todo",trigger:".o_kanban_view .o_kanban_record:contains(Test History Todo)",run:"click",},{content:"Open History Dialog",trigger:".o_form_view .o_cp_action_menus i.fa-cog",run:"click",},{trigger:".dropdown-menu",},{content:"Open History Dialog",trigger:".o_menu_item i.fa-history",run:"click",},{trigger:".modal .html-history-dialog.html-history-loaded",},{content:"Verify that 5 revisions are displayed (default empty description after the creation of the todo + 3 edits)",trigger:".modal .html-history-dialog .revision-list .btn",run:function(){const items=document.querySelectorAll(".revision-list .btn");if(items.length!==5){throw new Error('Expect 5 Revisions in the history dialog, got '+items.length);}},},{content:"Verify that the active revision (revision 4) is related to the current version",trigger:`.modal .history-container .history-content-view .history-view-inner:contains(${baseDescriptionContent} 3)`,},{content:"Go to the third revision related to the second edit",trigger:".modal .html-history-dialog .revision-list .btn:nth-child(3)",run:"click",},{trigger:".modal .html-history-dialog.html-history-loaded",},{content:"Verify that the active revision is the one clicked in the previous step",trigger:`.modal .history-container .history-content-view .history-view-inner:contains(${baseDescriptionContent} 1)`,},{trigger:'.history-container .history-view-top-bar a:contains(Comparison)',run:"click",},{content:"Verify comparaison text",trigger:".modal .history-container .history-comparison-view",run:function(){const comparaisonHtml=this.anchor.innerHTML;const correctHtml=`<added>${baseDescriptionContent} 3</added><removed>${baseDescriptionContent} 1</removed>`;if(!comparaisonHtml.includes(correctHtml)){console.error(`Expect comparison to be ${correctHtml}, got ${comparaisonHtml}`);}},},{trigger:".modal .html-history-dialog.html-history-loaded",},{content:"Click on Restore History btn to get back to the selected revision in the previous step",trigger:".modal button.btn-primary:enabled",run:"click",},{content:"Verify the confirmation dialog is opened",trigger:".modal button.btn-primary:text(Restore)",run:"click",},{content:"Verify that the description contains the right text after the restore",trigger:descriptionField,run:function(){const p=this.anchor?.innerText;const expected=`${baseDescriptionContent} 1`;if(p!==expected){throw new Error(`Expect description to be ${expected}, got ${p}`);}}},{trigger:"button.o_form_button_save",run:"click",},{content:"Wait the form is saved",trigger:".o_form_saved",},]});return __exports;});;

/* /project_todo/static/tests/tours/project_todo_main_functions.js */
odoo.define('@project_todo/../tests/tours/project_todo_main_functions',['@odoo/owl','@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{markup}=require("@odoo/owl");const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add('project_todo_main_functions',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),{trigger:'.o_app[data-menu-xmlid="project_todo.menu_todo_todos"]',run:"click",},{trigger:".o_project_task_kanban_view .o_column_quick_create.o_quick_create_folded div",content:"Create a personal stage from the To-do kanban view",run:"click",},{trigger:".o_kanban_group",},{trigger:".o_project_task_kanban_view .o_column_quick_create .o_kanban_header input",content:"Create a personal stage from the To-do kanban view",run:"edit Stage 1",},{trigger:".o_project_task_kanban_view .o_column_quick_create .o_kanban_add",content:"Save the personal stage",run:"click",},{trigger:".o_kanban_group",},{trigger:".o_project_task_kanban_view .o_column_quick_create .o_kanban_header input",content:"Create a second personal stage from the To-do kanban view",run:"edit Stage 2",},{trigger:".o_project_task_kanban_view .o_column_quick_create .o_kanban_add",content:"Save the personal stage",run:"click",},{trigger:".o_kanban_group:eq(1)",},{trigger:'.o-kanban-button-new',content:"Create a task in the first stage",run:"click",},{trigger:".o_project_task_kanban_view",},{trigger:'.o_kanban_quick_create div.o_field_char[name=display_name] input',content:"Create a personal task from the To-do kanban view",run:"edit Personal Task 1",},{trigger:".o_project_task_kanban_view",},{trigger:'.o_kanban_quick_create .o_kanban_add',content:"Save the personal task",run:"click",},{trigger:".o_project_task_kanban_view",},{trigger:".o_kanban_record",content:"Drag &amp; drop the card to change the personal task from personal stage.",run:"drag_and_drop(.o_kanban_group:eq(1))",},{trigger:".o_project_task_kanban_view",},{content:"Click on invisible caret. Should hover on card to be visible",trigger:".o_dropdown_kanban .btn.o-no-caret:not(:visible)",run:"click",},{trigger:"a:contains('Set Cover Image')",},{trigger:".o_kanban_record:first",content:"Open the first todo record",run:"click",},{trigger:".o_todo_form_view",},{trigger:".todo_toggle_chatter",content:"Clicking on the chatter button should toggle open the chatter",run:"click",},{trigger:".o-mail-Chatter-topbar button.o-mail-Chatter-sendMessage",content:"A 'send message' button should be present in the chatter",run:"click",},{trigger:".o_todo_form_view",},{trigger:".o-mail-Chatter-topbar button.o-mail-Chatter-logNote",content:"A 'log note' button should be present in the chatter",run:"click",},{trigger:".o_todo_form_view",},{trigger:".o-mail-Chatter-topbar button.o-mail-Chatter-activity",content:"An 'Activities' button should be present in the chatter",run:"click",},{trigger:"button[name=action_schedule_activities]",content:"Schedule an activity",run:"click",},{trigger:".o_todo_form_view",},{trigger:".o_field_widget[name='user_ids'] input",content:"Assign a responsible to your task",run:"fill marc",},{isActive:["auto"],trigger:".ui-autocomplete > li > a:not(:has(i.fa))",run:"click",},{trigger:'.o_field_widget[name="name"] textarea',content:'Edit the name of the personal task',run:"edit New name for the personal task",},{trigger:'.o_todo_done_button',content:'Mark the task as done',run:"click",},{trigger:".o_todo_form_view .o_form_dirty",},{trigger:".o_form_button_save",content:"Save the record",run:"click",},{trigger:'.o_breadcrumb .o_control_panel_breadcrumbs_actions button:enabled',content:"Convert the Todo to a task belonging to a project:enabled",run:"click",},{trigger:'.o_menu_item:contains("Convert to Task")',content:"Click on the action menu 'Convert to task'",run:"click",},{trigger:'.o_todo_conversion_form_view .o_field_many2one[name=project_id] input',content:'Create a new project that will be set to the task',run:"edit Project test 1",},{trigger:'.o_todo_conversion_form_view .o_field_many2one[name=project_id] li.o_m2o_dropdown_option_create a',content:'Create the new project',run:"click",},{trigger:'button[name="action_convert_to_task"]',content:'Convert the todo to a task',run:"click",},{trigger:".o_form_view .breadcrumb-item:nth-child(1)",content:markup`Let's go back to the <b>kanban view</b> to have an overview of your next tasks.`,run:"click",},{trigger:".o_kanban_view",}]});return __exports;});;

/* /hr_skills/static/tests/tours/skills_tour.js */
odoo.define('@hr_skills/../tests/tours/skills_tour',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add("hr_skills_tour",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),{content:"Open Employees app",trigger:".o_app[data-menu-xmlid='hr.menu_hr_root']",run:"click",},{content:"Create a new employee",trigger:".o-kanban-button-new",run:"click",},{content:"Pick a name",trigger:".o_field_widget[name='name'] input",run:"edit Jony McHallyFace",},{content:"Save",trigger:".o_form_button_save",run:"click",},{content:"Add Experience",trigger:".nav-link:contains('Resume')",run:"click",},{content:"Add a new Resume experience",trigger:".o_field_resume_one2many button.btn-secondary",run:"click",},{content:"Enter some company name",trigger:".modal:contains(new resume line) .modal-body .o_field_widget[name='name'] input",run:"edit Mamie Rock",},{trigger:".modal:contains(new resume line) .o_field_widget[name='date_start'] button",content:"open date picker",run:"click",},{content:"Set start date",trigger:".modal:contains(new resume line) .o_field_widget[name='date_start'] input",run:"edit 12/05/2017",},{content:"Give some description",trigger:`.modal:contains(new resume line) .o_field_html[name='description'] div.o-paragraph`,run:"editor Sang some songs and played some music",},{content:"Save it",trigger:".modal:contains(new resume line) .o_form_button_save:contains(save)",run:"click",},{trigger:"body:not(:has(.modal:contains(new resume line)))",},{content:"Edit newly created experience",trigger:".o_resume_line_title:contains(Mamie Rock)",run:"click",},{content:"Change type",trigger:".modal:contains(new resume line) .o_field_widget[name='line_type_id'] .o_selection_badge:contains(Other Experience)",run:"click",},{content:"Save experience change",trigger:".modal:contains(new resume line) .o_form_button_save:contains(save)",run:"click",},{trigger:"body:not(:has(.modal:contains(new resume line)))",},{content:"Add a new Skill",trigger:".o_field_skills_one2many button:contains('Pick a skill from the list')",run:"click",},{content:"Select Music",trigger:".o_field_widget[name='skill_type_id'] span:contains('Best Music')",run:"click",},{content:"Choose the song",trigger:".o_field_widget[name='skill_id'] span:contains('Fortunate Son')",run:"click",},{content:"Choose the level",trigger:".o_field_widget[name='skill_level_id'] span:contains('Level 2')",run:"click",},{content:"Save new skill",trigger:".modal:contains(update skills) .o_form_button_save:contains(save & close)",run:"click",},{content:"Wait the new skill is completely saved. Ensure also the modal is closed before open a new one.",trigger:"body:not(:has(.modal))",},{content:"Check if item is added",trigger:".o_data_row td.o_data_cell:contains('Fortunate Son')",},{content:"Add a new Skill",trigger:".o_field_skills_one2many button:contains('ADD')",run:"click",},{content:"Select Certification",trigger:".o_field_widget[name='skill_type_id'] span:contains('Music Certification')",run:"click",},{content:"Choose the instrument",trigger:".o_field_widget[name='skill_id'] span:contains('Piano')",run:"click",},{content:"Choose the level",trigger:"div[name='valid_from'] button",run:"click",},{content:"Choose the level",trigger:".o_field_widget[name='valid_from'] input",run:"edit 02/03/2025",},{content:"Choose the level",trigger:".o_field_widget[name='valid_to']",run:"click",},{content:"Choose the level",trigger:".o_field_widget[name='valid_to'] input",run:"edit 03/04/2025",},{content:"Save new skill",trigger:".modal:contains(update skills) .o_form_button_save:contains(save & close)",run:"click",},{content:"Wait the new skill is completely saved",trigger:"body:not(:has(.modal))",},{content:"Check if item is added",trigger:".o_data_row td.o_data_cell:contains('Piano')",},...stepUtils.saveForm(),],});return __exports;});;

/* /hr_skills/static/tests/tours/skills_type_tours.js */
odoo.define('@hr_skills/../tests/tours/skills_type_tours',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add("hr_skills_type_tour",{url:"/odoo",steps:()=>[stepUtils.showAppsMenuItem(),{content:"Open Employees app",trigger:".o_app[data-menu-xmlid='hr.menu_hr_root']",run:"click",},{content:"Open skill type menu",trigger:"[data-menu-xmlid='hr.menu_human_resources_configuration']",run:"click",},{content:"Open skill type menu",trigger:"[data-menu-xmlid='hr_skills.hr_skill_type_menu']",run:"click",},{content:"Create a skill type",trigger:".o_list_button_add",run:"click",},{content:"Write skill type name",trigger:".o_field_widget[name='name'] input",run:"edit Cooking Skill",},{trigger:"div[name=skill_ids] .o_field_x2many_list_row_add a",run:"click",},{trigger:"div[name=skill_ids] div[name=name] input",run:"edit Macaroon",},{trigger:"div[name=skill_level_ids] .o_field_x2many_list_row_add a",run:"click",},{trigger:"div[name=skill_level_ids] div[name=name] input",run:"edit Beginner",},{trigger:"div[name=skill_level_ids] div[name=default_level] input[type='checkbox']",run:"click",},{trigger:"div[name=skill_level_ids] .o_field_x2many_list_row_add a",run:"click",},{trigger:"tr:nth-child(2).o_selected_row div[name=name] input",run:"edit Intermediate",},{trigger:"tr:nth-child(2).o_selected_row [name=default_level] input[type='checkbox']",run:"click",},{trigger:"div[name=skill_level_ids] .o_field_x2many_list_row_add a",run:"click",},{trigger:"tr:nth-child(3).o_selected_row div[name=name] input",run:"edit Expert",},{trigger:"tr:nth-child(3).o_selected_row [name=default_level] input[type='checkbox']",run:"click",},{trigger:"tr:nth-child(1) [name=default_level] input[type='checkbox']",run:"click",},{trigger:"tr:nth-child(2) [name=default_level] input[type='checkbox']",run:"click",},...stepUtils.saveForm(),],});return __exports;});;

/* /website_helpdesk/static/tests/tours/helpdesk_search_ticket_steps.js */
odoo.define('@website_helpdesk/../tests/tours/helpdesk_search_ticket_steps',['@helpdesk/../tests/tours/helpdesk_search_ticket_steps','@web/core/utils/patch'],function(require){'use strict';let __exports={};const HelpdeskSearchTicketSteps=require("@helpdesk/../tests/tours/helpdesk_search_ticket_steps")[Symbol.for("default")];const{patch}=require("@web/core/utils/patch");patch(HelpdeskSearchTicketSteps.prototype,{_searchTickets(){return{content:"search Ticket",trigger:".oi-search",run:"click",};},});return __exports;});;

/* /website_helpdesk_livechat/static/tests/tours/support/website_helpdesk_livechat_create_ticket_from_chatbot.js */
odoo.define('@website_helpdesk_livechat/../tests/tours/support/website_helpdesk_livechat_create_ticket_from_chatbot',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("website_helpdesk_livechat.create_ticket_from_chatbot",{steps:()=>[{trigger:".o-livechat-root:shadow .o-livechat-LivechatButton",run:"click",},{trigger:".o-livechat-root:shadow .o-mail-Message:contains(Hello, how can I help you?)",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"edit I'd like to know more about the Helpdesk application.",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"press Enter",},{trigger:".o-livechat-root:shadow .o-mail-Message:contains(Would you mind leaving your email address so that we can reach you back?)",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"edit visitor@example.com",},{trigger:".o-livechat-root:shadow .o-mail-Composer-input",run:"press Enter",},{trigger:".o-livechat-root:shadow .o-mail-Message:contains(Thank you, you should hear back from us very soon!)",},],});return __exports;});;

/* /website_helpdesk_livechat/static/tests/tours/website_helpdesk_livechat_info_panel_tour.js */
odoo.define('@website_helpdesk_livechat/../tests/tours/website_helpdesk_livechat_info_panel_tour',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("helpdesk_livechat_info_panel_tour",{steps:()=>[{trigger:".o-mail-DiscussContent-threadName[title='Parent Partner']",},{trigger:".o-mail-ActionPanel-header:contains(Information)",},{trigger:".o-mail-ActionPanel span:contains(Ticket 1)",},{trigger:".o-mail-ActionPanel span:contains(Ticket 2)",},{trigger:".o-mail-ActionPanel span:not(:contains(Ticket Not Related))",},],});return __exports;});;

/* /sale_external_tax/static/tests/tours/sale_external_optional_products.js */
odoo.define('@sale_external_tax/../tests/tours/sale_external_optional_products',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add("sale_external_optional_products",{url:"/my/quotes",steps:()=>[{content:"open the test SO",trigger:'a:contains("test")',run:"click",expectUnloadPage:true,},{trigger:".o_portal_sidebar_content h2:contains($):contains(10.00)",},{content:"Await communication shadow root to avoid rerenderer just before clicking",trigger:":shadow button:contains(send)",},{content:"increase quantity of optional product",trigger:"tr:contains(optional product) .js_quantity_container .js_update_line_json[title='Add one']",run:"click",expectUnloadPage:true,},{trigger:".o_portal_sidebar_content h2:contains($):contains(11.)",},{content:"Await communication shadow root to avoid rerenderer just before clicking",trigger:":shadow button:contains(send)",},{content:"Check the quantity",trigger:"tr:contains(optional product) input.js_quantity:value(1)",},{content:"decrease quantity of the optional line",trigger:"tr:contains(optional product) .js_quantity_container .js_update_line_json[title='Remove one']",run:"click",expectUnloadPage:true,},{trigger:".o_portal_sidebar_content h2:contains($):contains(10.)",},],});return __exports;});;

/* /auth_passkey/static/tests/passkeys_delete.js */
odoo.define('@auth_passkey/../tests/passkeys_delete',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add('passkeys_tour_delete',{url:'/odoo',steps:()=>[{content:'Open user account menu',trigger:'.o_user_menu .dropdown-toggle',run:'click',},{content:"Open preferences / profile screen",trigger:'[data-menu=preferences]',run:'click',},{content:"Switch to security tab",trigger:'a[role=tab]:contains("Security")',run:'click',},{content:"Ensure there is only one passkey",trigger:'button:contains("Add Passkey")',run:()=>{let amount=document.querySelectorAll("div[name='auth_passkey_key_ids'] article").length;if(amount!=1){throw Error("Amount of Passkeys must be 1");}},},{content:"Open Passkey dropdown",trigger:'[name="auth_passkey_key_ids"] .o_dropdown_kanban .o-dropdown:not(:visible)',run:'click',},{content:"Delete Passkey",trigger:'a[name="action_delete_passkey"]',run:'click',},{content:"Identitycheck: use password",trigger:'button[name="action_use_password"]',run:'click',},{content:"Check that we have to enter enhanced security mode",trigger:".modal div:contains(Enter your current password)",},{content:"Input password",trigger:'.modal [name=password] input',run:"edit admin",},{content:"Confirm",trigger:".modal button:contains(Confirm Password)",run:"click",},{content:'Open user account menu',trigger:'.o_user_menu .dropdown-toggle',run:'click',},{content:"Open preferences / profile screen",trigger:'[data-menu=preferences]',run:'click',},{content:"Make sure the Preferences tab is open",trigger:'label:contains("Email Signature")',},{content:"Switch to security tab",trigger:'a[role=tab]:contains("Security")',run:'click',},{content:"Ensure there are no more passkeys",trigger:'button:contains("Add Passkey")',run:()=>{let amount=document.querySelectorAll("div[name='auth_passkey_key_ids'] article").length;if(amount!=0){throw Error("Amount of Passkeys must be 0");}},}]})
return __exports;});;

/* /auth_passkey/static/tests/passkeys_login.js */
odoo.define('@auth_passkey/../tests/passkeys_login',['@web/core/registry','@web/core/utils/patch','@auth_passkey/../lib/simplewebauthn'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{patch}=require("@web/core/utils/patch");const passkeyLib=require("@auth_passkey/../lib/simplewebauthn");registry.category("web_tour.tours").add('passkeys_tour_login',{url:'/web/login',steps:()=>[{content:"Inject authenticator data",trigger:'body',run:()=>{patch(passkeyLib,{async startAuthentication(){return{"id":"y6aJVJsvvSSkbwTeGZ1FbQP_jCDho7EBPwZq-3lAjQ0","rawId":"y6aJVJsvvSSkbwTeGZ1FbQP_jCDho7EBPwZq-3lAjQ0","response":{"authenticatorData":"SZYN5YgOjGh0NBcPZHZgW4_krrmihjLHmVzzuoMdl2MFAAAAAA","clientDataJSON":"eyJjaGFsbGVuZ2UiOiJMTnBWMGRQSU10bXBTd0dlbklIX2gxVnljUXVBZ0ZnUVJKOVRQS0JvTmF5U2NOQUVyUy1yc25hVTE5bjdfQWFYemVpWVJnM25HSTN5dUgwYWk2VVBYQSIsImNyb3NzT3JpZ2luIjpmYWxzZSwib3JpZ2luIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6ODg4OCIsInR5cGUiOiJ3ZWJhdXRobi5nZXQifQ","signature":"MEYCIQCqkh2NBQQao5uDTaBKyNhiEpnk4jgbH-PjdLAul9-d0gIhAMObtNTbaEMUILdNgCT01BKNN4NHRzkzsGaDN2Ozu0WX","userHandle":"Ng",},"type":"public-key","clientExtensionResults":{},"authenticatorAttachment":"platform",};},});},},{content:'Login with Passkey',trigger:'a:contains("Use a Passkey")',run:'click',expectUnloadPage:true,},{content:'Check if we are logged in',trigger:'.o_user_menu .dropdown-toggle',},]})
return __exports;});;

/* /auth_passkey/static/tests/passkeys_registration.js */
odoo.define('@auth_passkey/../tests/passkeys_registration',['@web/core/registry','@web/core/utils/patch','@auth_passkey/../lib/simplewebauthn'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{patch}=require("@web/core/utils/patch");const passkeyLib=require("@auth_passkey/../lib/simplewebauthn");let unpatchPasskeyRegistration;registry.category("web_tour.tours").add('passkeys_tour_registration',{url:'/odoo',steps:()=>[{content:'Open user account menu',trigger:'.o_user_menu .dropdown-toggle',run:'click',},{content:"Open preferences / profile screen",trigger:'[data-menu=preferences]',run:'click',},{content:"Switch to security tab",trigger:'a[role=tab]:contains("Security")',run:'click',},{content:"Ensure there are no passkeys already",trigger:'button:contains("Add Passkey")',run:()=>{let amount=document.querySelectorAll("div[name='auth_passkey_key_ids'] article").length;if(amount!=0){throw Error("Amount of Passkeys must be 0");}},},{content:"Add a Passkey",trigger:'button:contains("Add Passkey")',run:'click',},{content:"Check that we have to enter enhanced security mode",trigger:".modal div:contains(Enter your current password)",},{content:"Input password",trigger:'.modal [name=password] input',run:"edit admin",},{content:"Confirm",trigger:".modal button:contains(Confirm Password)",run:"click",},{content:"Ready to create Passkey",trigger:".modal div:contains(Create Passkey)",},{content:"Input passkey name",trigger:'.modal .o_field_char input',run:"edit test_passkey_one",},{content:"Override startRegistration",trigger:'body',run:()=>{unpatchPasskeyRegistration=patch(passkeyLib,{async startRegistration(){return{"id":"L2p6jvcWuCMTRmkZHKqqvQbz0Dhk3JbJOx1F8ci99nSNjlfx3Z7nkigMdUACLggB","rawId":"L2p6jvcWuCMTRmkZHKqqvQbz0Dhk3JbJOx1F8ci99nSNjlfx3Z7nkigMdUACLggB","response":{"attestationObject":"o2NmbXRkbm9uZWdhdHRTdG10oGhhdXRoRGF0YVjCSZYN5YgOjGh0NBcPZHZgW4_krrmihjLHmVzzuoMdl2PFAAAAAgAAAAAAAAAAAAAAAAAAAAAAMC9qeo73FrgjE0ZpGRyqqr0G89A4ZNyWyTsdRfHIvfZ0jY5X8d2e55IoDHVAAi4IAaUBAgMmIAEhWCAvanqO9xa4IxNGaRkcMSyBudC-JDZYY9gyMqknP2IkUiJYINqumy9viKCeo_xpFU3XzyssfEReXvMM1_fmZN-wMpDPoWtjcmVkUHJvdGVjdAI","clientDataJSON":"eyJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIiwiY2hhbGxlbmdlIjoiVW9hNk01akVQN0kzVG95SzlRQTB2ZjhJY3NlemZlSmswcmdzMXBMVVdyTWdGOXZkMC03RHY1aVYzeFc3cjcwLVlxa3dlUlhoQUNtRFBtaEhLdEFJZVEiLCJvcmlnaW4iOiJodHRwOi8vbG9jYWxob3N0OjgwNjkiLCJjcm9zc09yaWdpbiI6ZmFsc2V9","transports":["nfc","usb",],"publicKeyAlgorithm":-7,"publicKey":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEL2p6jvcWuCMTRmkZHDEsgbnQviQ2WGPYMjKpJz9iJFLarpsvb4ignqP8aRVN188rLHxEXl7zDNf35mTfsDKQzw","authenticatorData":"SZYN5YgOjGh0NBcPZHZgW4_krrmihjLHmVzzuoMdl2PFAAAAAgAAAAAAAAAAAAAAAAAAAAAAMC9qeo73FrgjE0ZpGRyqqr0G89A4ZNyWyTsdRfHIvfZ0jY5X8d2e55IoDHVAAi4IAaUBAgMmIAEhWCAvanqO9xa4IxNGaRkcMSyBudC-JDZYY9gyMqknP2IkUiJYINqumy9viKCeo_xpFU3XzyssfEReXvMM1_fmZN-wMpDPoWtjcmVkUHJvdGVjdAI",},"type":"public-key","clientExtensionResults":{},"authenticatorAttachment":"cross-platform",};},});},},{content:"Click the Create button",trigger:".modal button:contains(Create)",run:"click",},{content:'Open user account menu',trigger:'.o_user_menu .dropdown-toggle',run:'click',},{content:"Return startRegistration to original state",trigger:'body',run:()=>{unpatchPasskeyRegistration();},},{content:"Open preferences / profile screen",trigger:'[data-menu=preferences]',run:'click',},{content:"Make sure the Preferences tab is open",trigger:'label:contains("Email Signature")',},{content:"Switch to security tab",trigger:'a[role=tab]:contains("Security")',run:'click',},{content:"Ensure there is one passkey",trigger:'button:contains("Add Passkey")',run:()=>{let amount=document.querySelectorAll("div[name='auth_passkey_key_ids'] article").length;if(amount!=1){throw Error("Amount of Passkeys must be 1");}},},]})
return __exports;});;

/* /auth_passkey/static/tests/passkeys_verify.js */
odoo.define('@auth_passkey/../tests/passkeys_verify',['@web/core/registry','@web/core/utils/patch','@auth_passkey/../lib/simplewebauthn'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{patch}=require("@web/core/utils/patch");const passkeyLib=require("@auth_passkey/../lib/simplewebauthn");let unpatchPasskeyVerify;registry.category("web_tour.tours").add('passkeys_tour_verify',{url:'/odoo',steps:()=>[{content:'Open user account menu',trigger:'.o_user_menu .dropdown-toggle',run:'click',},{content:"Open preferences / profile screen",trigger:'[data-menu=preferences]',run:'click',},{content:"Switch to security tab",trigger:'a[role=tab]:contains("Security")',run:'click',},{content:"Ensure there is one passkey",trigger:'button:contains("Add Passkey")',run:()=>{let amount=document.querySelectorAll("div[name='auth_passkey_key_ids'] article").length;if(amount!=1){throw Error("Amount of Passkeys must be 1");}},},{content:"Trigger security prompt",trigger:'button:contains("Add Passkey")',run:'click',},{content:"Override startAuthentication",trigger:'body',run:()=>{unpatchPasskeyVerify=patch(passkeyLib,{async startAuthentication(){return{"id":"L2p6jvcWuCMTRmkZHKqqvQbz0Dhk3JbJOx1F8ci99nSNjlfx3Z7nkigMdUACLggB","rawId":"L2p6jvcWuCMTRmkZHKqqvQbz0Dhk3JbJOx1F8ci99nSNjlfx3Z7nkigMdUACLggB","response":{"authenticatorData":"SZYN5YgOjGh0NBcPZHZgW4_krrmihjLHmVzzuoMdl2MFAAAAAw","clientDataJSON":"eyJ0eXBlIjoid2ViYXV0aG4uZ2V0IiwiY2hhbGxlbmdlIjoiREtydzVJZUZpTDB3X3k1b0IwUkFUUHJxRzFlRk9DMlA3eUVpWENzdEJSdVpZYlNCQmtBV2ZoQUlJbmtNcVdqWUlOOHZiS243SjNQTVhfVGh6bkhwcWciLCJvcmlnaW4iOiJodHRwOi8vbG9jYWxob3N0OjgwNjkiLCJjcm9zc09yaWdpbiI6ZmFsc2V9","signature":"MEUCIQD5iaPp48QMS3amx4PS89kv_EBAo3bBkaWnLzWlSgFSXgIgLWKEv9xR_ZwVXZbw2zx459RKbrQuAcd-UqD4gJw1lWY","userHandle":"Mg",},"type":"public-key","clientExtensionResults":{},"authenticatorAttachment":"cross-platform",};},});},},{content:"Click Use Passkey",trigger:'button:contains("Use Passkey")',run:'click',},{content:"Ready to create Passkey",trigger:".modal div:contains(Create Passkey)",},{content:"Return startAuthentication to original state",trigger:'body',run:()=>{unpatchPasskeyVerify();},}]})
return __exports;});;

/* /auth_passkey_portal/static/tests/tours/test_passkey_portal.js */
odoo.define('@auth_passkey_portal/../tests/tours/test_passkey_portal',['@web/core/registry','@web/core/utils/patch','@auth_passkey/../lib/simplewebauthn'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{patch}=require("@web/core/utils/patch");const passkeyLib=require("@auth_passkey/../lib/simplewebauthn");let unpatchPasskeyRegistrationPortal;registry.category("web_tour.tours").add("passkeys_portal_create",{url:"/my/security",steps:()=>[{content:"Ensure there are no passkeys already",trigger:'button:contains("Add Passkey")',run:()=>{const amount=document.querySelectorAll(".o_passkey_portal_entry").length;if(amount!=0){throw Error("Amount of Passkeys must be 0");}},},{content:"Add a Passkey",trigger:'button:contains("Add Passkey")',run:"click",},{content:"Check that we have to enter enhanced security mode",trigger:"form strong:contains(Please enter your password to confirm you own this account)",},{content:"Input password",trigger:"form input[name=password]",run:"edit passkey_portal",},{content:"Confirm",trigger:".modal-footer button:contains(Confirm Password)",run:"click",},{content:"Ready to create Passkey",trigger:".modal-title:contains(Create Passkey)",},{content:"Input passkey name",trigger:'input[name="keyname"]',run:"edit test_passkey_one",},{content:"Override startRegistration",trigger:"body",run:()=>{unpatchPasskeyRegistrationPortal=patch(passkeyLib,{async startRegistration(){return{"id":"L2p6jvcWuCMTRmkZHKqqvQbz0Dhk3JbJOx1F8ci99nSNjlfx3Z7nkigMdUACLggB","rawId":"L2p6jvcWuCMTRmkZHKqqvQbz0Dhk3JbJOx1F8ci99nSNjlfx3Z7nkigMdUACLggB","response":{"attestationObject":"o2NmbXRkbm9uZWdhdHRTdG10oGhhdXRoRGF0YVjCSZYN5YgOjGh0NBcPZHZgW4_krrmihjLHmVzzuoMdl2PFAAAAAgAAAAAAAAAAAAAAAAAAAAAAMC9qeo73FrgjE0ZpGRyqqr0G89A4ZNyWyTsdRfHIvfZ0jY5X8d2e55IoDHVAAi4IAaUBAgMmIAEhWCAvanqO9xa4IxNGaRkcMSyBudC-JDZYY9gyMqknP2IkUiJYINqumy9viKCeo_xpFU3XzyssfEReXvMM1_fmZN-wMpDPoWtjcmVkUHJvdGVjdAI","clientDataJSON":"eyJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIiwiY2hhbGxlbmdlIjoiVW9hNk01akVQN0kzVG95SzlRQTB2ZjhJY3NlemZlSmswcmdzMXBMVVdyTWdGOXZkMC03RHY1aVYzeFc3cjcwLVlxa3dlUlhoQUNtRFBtaEhLdEFJZVEiLCJvcmlnaW4iOiJodHRwOi8vbG9jYWxob3N0OjgwNjkiLCJjcm9zc09yaWdpbiI6ZmFsc2V9","transports":["nfc","usb",],"publicKeyAlgorithm":-7,"publicKey":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEL2p6jvcWuCMTRmkZHDEsgbnQviQ2WGPYMjKpJz9iJFLarpsvb4ignqP8aRVN188rLHxEXl7zDNf35mTfsDKQzw","authenticatorData":"SZYN5YgOjGh0NBcPZHZgW4_krrmihjLHmVzzuoMdl2PFAAAAAgAAAAAAAAAAAAAAAAAAAAAAMC9qeo73FrgjE0ZpGRyqqr0G89A4ZNyWyTsdRfHIvfZ0jY5X8d2e55IoDHVAAi4IAaUBAgMmIAEhWCAvanqO9xa4IxNGaRkcMSyBudC-JDZYY9gyMqknP2IkUiJYINqumy9viKCeo_xpFU3XzyssfEReXvMM1_fmZN-wMpDPoWtjcmVkUHJvdGVjdAI",},"type":"public-key","clientExtensionResults":{},"authenticatorAttachment":"cross-platform",};},});},},{content:"Click the Create button",trigger:".modal-content button:contains(Create)",run:"click",expectUnloadPage:true,},{content:"Return startRegistration to original state",trigger:"body",run:()=>{if(unpatchPasskeyRegistrationPortal){unpatchPasskeyRegistrationPortal();}},},{content:"Ensure there is one passkey",trigger:".o_passkey_name",run:()=>{const amount=document.querySelectorAll(".o_passkey_portal_entry").length;if(amount!=1){throw Error("Amount of Passkeys must be 1");}},},],});registry.category("web_tour.tours").add("passkeys_portal_rename",{url:"/my/security",steps:()=>[{content:"Ensure there is one passkey",trigger:'button:contains("Add Passkey")',run:()=>{const amount=document.querySelectorAll(".o_passkey_portal_entry").length;if(amount!=1){throw Error("Amount of Passkeys must be 1");}},},{content:"Click rename",trigger:'.o_passkey_portal_rename',run:"click",},{content:"Input passkey name",trigger:'input[name="keyname"]',run:"edit edited_key",},{content:"Confirm the rename",trigger:".modal-content button:contains(Rename)",run:"click",expectUnloadPage:true,},{content:"Ensure the rename occurred",trigger:".o_passkey_name:contains(edited_key)",},],});registry.category("web_tour.tours").add("passkeys_portal_delete",{url:"/my/security",steps:()=>[{content:"Ensure there is one passkey",trigger:'button:contains("Add Passkey")',run:()=>{const amount=document.querySelectorAll(".o_passkey_portal_entry").length;if(amount!=1){throw Error("Amount of Passkeys must be 1");}},},{content:"Click delete",trigger:'.o_passkey_portal_delete',run:"click",},{content:"Check that we have to enter enhanced security mode",trigger:"form strong:contains(Please enter your password to confirm you own this account)",},{content:"Input password",trigger:"form input[name=password]",run:"edit passkey_portal",},{content:"Confirm",trigger:".modal-footer button:contains(Confirm Password)",run:"click",expectUnloadPage:true,},{content:"Ensure there are no more passkeys",trigger:'button:contains("Add Passkey")',run:()=>{const amount=document.querySelectorAll(".o_passkey_portal_entry").length;if(amount!=0){throw Error("Amount of Passkeys must be 0");}},},],});return __exports;});;

/* /auth_totp/static/tests/apikeys_flow.js */
odoo.define('@auth_totp/../tests/apikeys_flow',['@web/core/network/rpc','@web/core/registry'],function(require){'use strict';let __exports={};const{rpc}=require("@web/core/network/rpc");const{registry}=require("@web/core/registry");const openUserPreferenceSecurity=()=>[{content:'Open user account menu',trigger:'.o_user_menu .dropdown-toggle',run:'click',},{content:"Open preferences / profile screen",trigger:'[data-menu=preferences]',run:'click',},{content:"Switch to security tab",trigger:'a[role=tab]:contains("Security")',run:'click',}]
registry.category("web_tour.tours").add('apikeys_tour_setup',{url:'/odoo?debug=1',steps:()=>[...openUserPreferenceSecurity(),{content:"Open API keys wizard",trigger:'button:contains("Add API Key")',run:"click",},{content:"Check that we have to enter enhanced security mode",trigger:".modal div:contains(Enter your current password)",},{content:"Input password",trigger:'.modal [name=password] input',run:"edit test_user",},{content:"Confirm",trigger:".modal button:contains(Confirm Password)",run:"click",},{content:"Check that we're now on the key description dialog",trigger:'.modal p:contains("Enter a description of and purpose for the key.")',},{content:"Enter description",trigger:'.modal [name=name] input',run:"edit my key",},{content:"Confirm key creation",trigger:'.modal button:contains("Generate key")',run:"click",},{content:"Check that we're on the last step & grab key",trigger:'.modal p:contains("Here is your new API key")',run:async()=>{const key=document.querySelector("code [name=key] span").textContent;await rpc('/web/dataset/call_kw',{model:'ir.logging',method:'send_key',args:[key],kwargs:{},});}},{trigger:"button:contains(Done)",run:"click",},...openUserPreferenceSecurity(),{content:"check that our key is present",trigger:'[name=api_key_ids] .o_kanban_record:contains("my key")',}]});registry.category("web_tour.tours").add('apikeys_tour_teardown',{url:'/odoo?debug=1',steps:()=>[{content:'Open preferences',trigger:'.o_user_menu .dropdown-toggle',run:"click",},{trigger:'[data-menu=preferences]',run:"click",},{content:"Switch to security tab",trigger:'a[role=tab]:contains("Security")',run:'click',},{content:"Open kanban dropdown menu of the key",trigger:'[name=api_key_ids] .o_kanban_record:contains("my key") .oe_kanban_action[name="remove"]',run:'click',},{content:"Input password for security mode again",trigger:".modal [name=password] input",run:"edit test_user",},{content:"And confirm",trigger:".modal button:contains(Confirm Password)",run:"click",},{trigger:"body:not(:has(.modal))",},{content:'Re-open preferences again',trigger:'.o_user_menu .dropdown-toggle',run:"click",},{trigger:'[data-menu=preferences]',run:"click",},{content:"Switch to security tab",trigger:'a[role=tab]:contains("Security")',run:'click',},{content:"Check that there's no more keys",trigger:"body:not(:has(.o_notebook [name=api_key_ids]))",}]});return __exports;});;

/* /auth_totp/static/tests/totp_flow.js */
odoo.define('@auth_totp/../tests/totp_flow',['@bus/workers/websocket_worker','@web/core/network/rpc','@web/core/registry','@web_tour/tour_utils','@odoo/owl'],function(require){'use strict';let __exports={};const{WORKER_STATE}=require("@bus/workers/websocket_worker");const{rpc}=require("@web/core/network/rpc");const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");const{whenReady}=require("@odoo/owl");function openRoot(){return[{content:"return to client root to avoid race condition",trigger:'body',run(){document.querySelector("body").classList.add("wait");window.location='/odoo';},expectUnloadPage:true,},{content:"wait for client reload",trigger:'body:not(.wait)',}];}
function openUserPreferencesAtSecurityTab(){return[{content:'Open user account menu',trigger:'.o_user_menu .dropdown-toggle',run:'click',},{content:"Open My Preferences",trigger:'[data-menu=preferences]',run:'click',},{content:"wait for security tab",trigger:'a[role=tab]:contains("Security")',},{content:"Switch to security tab",trigger:'a[role=tab]:contains("Security")',run:'click',}];}
function closePreferencesDialog({content,totp_state}){let trigger;switch(totp_state){case true:trigger='button[name=action_totp_disable]';break;case false:trigger='button[name=action_totp_enable_wizard]';break;case undefined:trigger='div:contains("Two-factor Authentication") + button';break;default:throw new Error(`Invalid totp state ${totp_state}`)}
return[{content,trigger:'a[role=tab]:contains("Security").active',},{trigger,async run(helpers){const modal=document.querySelector(".o_dialog");if(modal){modal.querySelector("button[name=preference_cancel]").click();}}},{trigger:'body:not(:has(.o_dialog))',}];}
registry.category("web_tour.tours").add('totp_tour_setup',{url:'/odoo',steps:()=>[...openUserPreferencesAtSecurityTab(),{content:"Open totp wizard",trigger:'a[role=tab]:contains("Security").active',},{trigger:"button[name=action_totp_enable_wizard]",run:"click",},{trigger:".modal div:contains(Enter your current password)",},{content:"Check that we have to enter enhanced security mode and input password",trigger:'[name=password] input',run:'edit test_user',},{content:"Confirm",trigger:"button:contains(Confirm Password)",run:"click",},{content:"Check the wizard has opened",trigger:'.modal:contains("Two-Factor Authentication Activation")',},{content:"Get secret from collapsed div",trigger:`.modal a:contains("Cannot scan it?")`,async run(helpers){const secret=this.anchor.closest("div").querySelector("[name=secret] span:first-child");const copyBtn=secret.querySelector("button");if(copyBtn){copyBtn.remove();}
const token=await rpc('/totphook',{secret:secret.textContent,offset:0,});await helpers.edit(token,'[name=code] input');}},{trigger:".modal button.btn-primary:contains(Enable Two-Factor Authentication)",run:"click",},{trigger:".o_notification_content:contains(2-Factor authentication is now enabled)",},...openRoot(),...openUserPreferencesAtSecurityTab(),...closePreferencesDialog({content:"Check that the button has changed",totp_state:true,}),]});registry.category("web_tour.tours").add('totp_login_enabled',{url:'/',steps:()=>[{content:"check that we're on the login page or go to it",isActive:["body:not(:has(input#login))"],trigger:"a:contains(Sign in)",run:"click",expectUnloadPage:true,},{content:"input login",trigger:'input#login',run:"edit test_user",},{content:'input password',trigger:'input#password',run:"edit test_user",},{content:"click da button",trigger:'button:contains("Log in")',run:"click",expectUnloadPage:true,},{content:"expect totp screen",trigger:'label:contains(Authentication Code)',run:"click",},{content:"input incorrect code",trigger:'input[name=totp_token]',async run(helpers){await rpc("/totphook",{offset:-2});helpers.edit("123456");}},{trigger:`button:contains("Log in")`,run:"click",expectUnloadPage:true,},{content:"using an incorrect token should fail",trigger:"p.alert.alert-danger:contains(Verification failed, please double-check the 6-digit code)",},{content:"reuse same code",trigger:'input[name=totp_token]',async run(helpers){const token=await rpc("/totphook",{offset:0});helpers.edit(token);}},{trigger:`button:contains("Log in")`,run:"click",expectUnloadPage:true,},{content:"reusing the same token should fail",trigger:"p.alert.alert-danger:contains(Verification failed, please use the latest 6-digit code)",},{content:"input code",trigger:'input[name=totp_token]',async run(helpers){const token=await rpc('/totphook',{offset:1});helpers.edit(token);}},{trigger:`button:contains("Log in")`,run:"click",expectUnloadPage:true,},{content:"check we're logged in",trigger:".o_user_menu .dropdown-toggle",}]});registry.category("web_tour.tours").add('totp_login_device',{url:'/',steps:()=>[{content:"check that we're on the login page or go to it",isActive:["body:not(:has(input#login))"],trigger:"a:contains(Sign in)",run:"click",expectUnloadPage:true,},{content:"input login",trigger:'input#login',run:"edit test_user",},{content:'input password',trigger:'input#password',run:"edit test_user",},{content:"click da button",trigger:'button:contains("Log in")',run:"click",expectUnloadPage:true,},{content:"expect totp screen",trigger:'label:contains(Authentication Code)',run:"click",},{content:"check remember device box",trigger:'label[for=switch-remember]',run:"click",},{content:"input code",trigger:'input[name=totp_token]',async run(helpers){const token=await rpc('/totphook',{offset:2});helpers.edit(token);}},{trigger:"button:contains(Log in)",run:"click",expectUnloadPage:true,},{trigger:".o_web_client .o_navbar",async run(){await whenReady();}},{trigger:".o_web_client .o_navbar",async run(){await new Promise((resolve)=>{const bus=odoo.__WOWL_DEBUG__.root.env.services.bus_service;bus.addEventListener("BUS:CONNECT",resolve,{once:true});if(bus.workerState===WORKER_STATE.CONNECTED){resolve();}});},},{content:"check we're logged in",trigger:".o_user_menu .dropdown-toggle",run:'click',},{content:"click the Log out button",trigger:'.dropdown-item[data-menu=logout]',run:"click",expectUnloadPage:true,},{content:"check that we're back on the login page or go to it",trigger:'input#login, a:contains(Log in)',run:"edit Test",},{content:"input login again",trigger:'input#login',run:"edit test_user",},{content:'input password again',trigger:'input#password',run:"edit test_user",},{content:"click da button again",trigger:'button:contains("Log in")',run:"click",expectUnloadPage:true,},{content:"check we're logged in without 2FA",trigger:".o_user_menu .dropdown-toggle",},...openUserPreferencesAtSecurityTab(),{content:"Open totp wizard",trigger:'a[role=tab]:contains("Security").active',},{trigger:"button[name=action_totp_disable]",run:"click",},{trigger:".modal div:contains(Enter your current password)",},{content:"Check that we have to enter enhanced security mode and input password",trigger:'.modal [name=password] input',run:"edit test_user",},{content:"Confirm",trigger:".modal button:contains(Confirm Password)",run:"click",},{trigger:".o_notification_content:contains(Two-factor authentication disabled)",},...openRoot(),...openUserPreferencesAtSecurityTab(),...closePreferencesDialog({content:"Check that the button has changed",totp_state:false}),]});registry.category("web_tour.tours").add('totp_login_disabled',{url:'/',steps:()=>[{content:"check that we're on the login page or go to it",isActive:["body:not(:has(input#login))"],trigger:"a:contains(Sign in)",run:"click",expectUnloadPage:true,},{content:"input login",trigger:'input#login',run:"edit test_user",},{content:'input password',trigger:'input#password',run:"edit test_user",},{content:"click da button",trigger:'button:contains("Log in")',run:"click",expectUnloadPage:true,},...openUserPreferencesAtSecurityTab(),...closePreferencesDialog({})]});registry.category("web_tour.tours").add('totp_admin_disables',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),{content:'Go to settings',trigger:'[data-menu-xmlid="base.menu_administration"]',run:"click",},{content:'Wait for page',trigger:'.o_menu_brand:contains("Settings")',},{content:"Open Users menu",trigger:'[data-menu-xmlid="base.menu_users"]',run:"click",},{content:"Open Users view",trigger:'[data-menu-xmlid="base.menu_action_res_users"]',run:"click",},{content:"Find test_user User",trigger:'tr:has(td.o_data_cell:contains("test_user")) '+'.o_list_record_selector input[type=checkbox]',run:"click",},{content:"Open Actions menu",trigger:'button.dropdown-toggle:contains("Action")',run:"click",},{content:"Select totp remover",trigger:'span.dropdown-item:contains(Disable two-factor authentication)',run:"click",},{trigger:".modal div:contains(Enter your current password)",},{content:"Check that we have to enter enhanced security mode & input password",trigger:'.modal [name=password] input',run:"edit admin",},{content:"Confirm",trigger:".modal button:contains(Confirm Password)",run:"click",},{content:"Wait for user to be unchecked (~ action done)",trigger:'tr:has(td.o_data_cell:contains(test_user)) '+'.o_list_record_selector input[type=checkbox]:not(:checked)',},{content:"open the user's form",trigger:"td.o_data_cell:contains(test_user)",run:"click",},{content:"wait for Security Tab to appear",trigger:"a.nav-link:contains(Security)",},{content:"go to Security Tab",trigger:"a.nav-link:contains(Security)",run:"click",},{content:"check 2FA button: should be disabled",trigger:'body:not(:has(button[name=action_totp_enable_wizard]))',}]})
return __exports;});;

/* /auth_totp_mail/static/tests/totp_flow.js */
odoo.define('@auth_totp_mail/../tests/totp_flow',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");function openAccountSettingsTab(){return[{content:'Go to settings',trigger:'[data-menu-xmlid="base.menu_administration"]',run:"click",},{content:'Wait for page',trigger:'.o_menu_brand:contains("Settings")',},{content:"Open Users menu",trigger:'[data-menu-xmlid="base.menu_users"]',run:"click",},{content:"Open Users view",trigger:'[data-menu-xmlid="base.menu_action_res_users"]',run:function(helpers){const breadcrumb=document.querySelector('.breadcrumb');if(!breadcrumb||!breadcrumb.textContent.includes("Users")){helpers.click();}else{helpers.click('[data-menu-xmlid="base.menu_users"]');}}}];}
registry.category("web_tour.tours").add('totp_admin_self_invite',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),...openAccountSettingsTab(),{content:"open the user's form",trigger:"td.o_data_cell:contains(admin)",run:"click",},{content:"go to Security Tab",trigger:"a.nav-link:contains(Security)",run:"click",},{content:"check that user cannot invite themselves to use 2FA.",trigger:"body:not(:has(button:contains(Invite to use 2FA)))",}]});registry.category("web_tour.tours").add('totp_admin_invite',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),...openAccountSettingsTab(),{content:"open the user's form",trigger:"td.o_data_cell:contains(test_user)",run:"click",},{content:"go to security Tab",trigger:"a.nav-link:contains(Security)",run:"click",},{content:"check that test_user user can be invited to use 2FA.",trigger:"button:contains(Invite to use 2FA)",}]});return __exports;});;

/* /auth_totp_portal/static/tests/totp_portal.js */
odoo.define('@auth_totp_portal/../tests/totp_portal',['@web/core/registry','@web/core/network/rpc'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{rpc}=require("@web/core/network/rpc");registry.category("web_tour.tours").add('totportal_tour_setup',{url:'/my/security',steps:()=>[{content:"Open totp wizard",trigger:'button#auth_totp_portal_enable',run:"click",},{content:"Check that we have to enter enhanced security mode",trigger:".modal div:contains(enter your password)",},{content:"Input password",trigger:'[name=password]',run:"edit portal",},{content:"Confirm",trigger:"button:contains(Confirm Password)",run:"click",},{content:"Check the wizard has opened",trigger:'.o_auth_totp_enable_2FA',},{content:"Get secret from collapsed div",trigger:'a:contains("Cannot scan it?")',},{trigger:`span[name="secret"]:hidden`,async run(helpers){const secret=this.anchor.textContent;const token=await rpc("/totphook",{secret,offset:0,});await helpers.edit(token,'input[name="code"]');}},{trigger:"button.btn-primary:contains(Activate)",run:"click",expectUnloadPage:true,},{content:"Check that the button has changed",trigger:'button:contains(Disable two-factor authentication)',}]});registry.category("web_tour.tours").add('totportal_login_enabled',{url:'/',steps:()=>[{content:"check that we're on the login page or go to it",isActive:["body:not(:has(input#login))"],trigger:"a:contains(Sign in)",run:"click",expectUnloadPage:true,},{content:"input login",trigger:'input#login',run:"edit portal",},{content:'input password',trigger:'input#password',run:"edit portal",},{content:"click da button",trigger:'button:contains("Log in")',run:"click",expectUnloadPage:true,},{content:"expect totp screen",trigger:'label:contains(Authentication Code)',run:"click",},{content:"input code",trigger:'input[name=totp_token]',run:async function(helpers){const token=await rpc('/totphook',{offset:1});await helpers.edit(token);}},{trigger:"button:contains(Log in)",run:"click",expectUnloadPage:true,},{content:"check we're logged in",trigger:"h3:contains(My account)",},{content:"go back to security",trigger:"a:contains(Security)",run:"click",expectUnloadPage:true,},{content:"Open totp wizard",trigger:'button#auth_totp_portal_disable',run:"click",},{content:"Check that we have to enter enhanced security mode",trigger:".modal div:contains(enter your password)",},{content:"Input password",trigger:'[name=password]',run:"edit portal",},{content:"Confirm",trigger:"button:contains(Confirm Password)",run:"click",expectUnloadPage:true,},{content:"Check that the button has changed",trigger:'button:contains(Enable two-factor authentication)',}]});registry.category("web_tour.tours").add('totportal_login_disabled',{url:'/',steps:()=>[{content:"check that we're on the login page or go to it",isActive:["body:not(:has(input#login))"],trigger:"a:contains(Sign in)",run:"click",expectUnloadPage:true,},{content:"input login",trigger:'input#login',run:"edit portal",},{content:'input password',trigger:'input#password',run:"edit portal",},{content:"click da button",trigger:'button:contains("Log in")',run:"click",expectUnloadPage:true,},{content:"check we're logged in",trigger:"h3:contains(My account)",}]});return __exports;});;

/* /sale_pdf_quote_builder/static/tests/tours/custom_content_kanban_like_tests.js */
odoo.define('@sale_pdf_quote_builder/../tests/tours/custom_content_kanban_like_tests',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add('custom_content_kanban_like_tour',{steps:()=>[{trigger:"ul.nav a:contains(Quote Builder)",run:"click",},{trigger:"label:contains(Header)",run:"click",},{trigger:"h5:contains(custom_1) ~ div textarea",break:true,run:"edit Test",},...stepUtils.saveForm(),]});return __exports;});;

/* /website_appointment/static/tests/tours/sub_templates_config.js */
odoo.define('@website_appointment/../tests/tours/sub_templates_config',['@website/../tests/tours/snippets_all_drag_and_drop'],function(require){'use strict';let __exports={};const{SUB_SNIPPET_TEMPLATES}=require("@website/../tests/tours/snippets_all_drag_and_drop");Object.assign(SUB_SNIPPET_TEMPLATES,{s_appointments_card:"s_appointments",s_appointments_picture:"s_appointments",s_appointments_list:"s_appointments",});return __exports;});;

/* /website_appointment/static/tests/tours/website_appointment_searchbar_snippet_tour.js */
odoo.define('@website_appointment/../tests/tours/website_appointment_searchbar_snippet_tour',['@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{changeOptionInPopover,clickOnSnippet,clickOnSave,insertSnippet,registerWebsitePreviewTour,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("test_searchbar_within_appointments",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_searchbar_input",name:"Search"}),...clickOnSnippet({id:"s_searchbar_input",name:"Search"}),...changeOptionInPopover("Search","Search within","Appointments"),{content:"Limit search to 'Appointments'",trigger:':iframe .s_searchbar_input[action="/appointment"]',},...clickOnSave(),{content:"Enter search term",trigger:":iframe .o_searchbar_form input",run:"edit yoga session",},{content:"Check that the number of results found is correct.",trigger:":iframe .o_searchbar_form .o_dropdown_menu",run:function(){const dropdownItemsEls=this.anchor.querySelectorAll(".dropdown-item");if(dropdownItemsEls.length!==1){throw new Error("Tour failed: More/Less than 1 item is there for given keyword.");}}},]);return __exports;});;

/* /website_appointment/static/tests/tours/website_appointment_tour.js */
odoo.define('@website_appointment/../tests/tours/website_appointment_tour',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add('website_appointment_tour',{url:'/odoo',steps:()=>[stepUtils.showAppsMenuItem(),{content:'Click on appointment app',trigger:'.o_app[data-menu-xmlid="appointment.main_menu_appointments"]',run:"click",},{content:'Click on Create button',trigger:'.o-kanban-button-new',run:"click",},{content:'Select Meeting Template',trigger:'.o_appointment_template_card:contains("Let others book a meeting in your calendar")',run:"click",},{content:'Set name of appointment type',trigger:'#name_0',run:"edit Test",},{content:'Open the options tab',trigger:'a[name="options"]',run:"click",},{content:'Set max scheduled days',trigger:'#max_schedule_days_0',run:"edit 45",},{content:'Checked the allow_guests',trigger:'#allow_guests_0',run:"click",},{content:'Save appointment type',trigger:'.o_form_button_save',run:"click",},{content:'Go to the front end',trigger:"button[name=action_customer_preview]:enabled",run:"click",expectUnloadPage:true,},{content:'Click on first date available',trigger:'.o_slots_list > div > button',run:"click",expectUnloadPage:true,},{content:'Fill tel field',trigger:'input[type="phone"]',run:"edit 0123456789",},{content:'Click on the add guest link',trigger:'button.btn-link',run:"click",},{content:'Enter the emails of the guests',trigger:'#o_appointment_input_guest_emails',run:()=>{document.querySelector('#o_appointment_input_guest_emails').value='test1@gmail.com\r\nportal@example.com\r\naaaa'}},{content:'Click on the add guest button',trigger:'.o_appointment_form_confirm_btn',run:"click",},{content:'Check the error msg',trigger:'.o_appointment_error_text:contains("Invalid Email")',},{content:'Removing the Invalid Email from the text area',trigger:'#o_appointment_input_guest_emails',run:()=>{document.querySelector('#o_appointment_input_guest_emails').value='"Raoul" <hello@gmail.com>\r\ntest1@gmail.com\r\nnew_zeadland2@test.example.com\r\n\r\nportal@example.com\r\napt_manager@test.example.com'}},{content:'Confirm the appointment',trigger:'.o_appointment_form_confirm_btn',run:"click",expectUnloadPage:true,},{trigger:'div:contains("test1@gmail.com")',},{trigger:'div:contains("Portal User")',},{trigger:'div:contains("new_zeadland2@test.example.com")',},{trigger:'div:contains("Raoul")',},{trigger:'.o_appointment_guest_addition_open',content:'Adding the guest at the validation page',run:"click",},{content:'Check the email validation on validation page',trigger:'#o_appointment_input_guest_emails',run:()=>{document.querySelector('#o_appointment_input_guest_emails').value='test2@gmail.com\r\nabc@gmail.com def@gmail.example.com\r\ntest1tttt'}},{content:'Click on the add guest button',trigger:'.o_appointment_guest_add',run:"click",},{content:'Checking the error msg on the validation page',trigger:'.o_appointment_error_text:contains("Invalid Email")',},{content:'Remove the invalid email from the input',trigger:'#o_appointment_input_guest_emails',run:()=>{document.querySelector('#o_appointment_input_guest_emails').value='test2@gmail.com\r\nabc@gmail.com def@gmail.example.com\r\ntest1@gmail.com'},},{content:'Click on the add guest button',trigger:'.o_appointment_guest_add',run:"click",expectUnloadPage:true,},{trigger:'div:contains("test2@gmail.com")',},{trigger:'div:contains("abc@gmail.com")',},{trigger:'div:contains("def@gmail.example.com")',},]});return __exports;});;

/* /website_helpdesk_knowledge/static/tests/tours/helpdesk_knowledge_file_bloc_tour.js */
odoo.define('@website_helpdesk_knowledge/../tests/tours/helpdesk_knowledge_file_bloc_tour',['@web/core/registry','@knowledge/../tests/tours/knowledge_tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{openPowerbox}=require('@knowledge/../tests/tours/knowledge_tour_utils');const createEmbeddedFileSteps=[{trigger:'.odoo-editor-editable p',run:function(){openPowerbox(this.anchor);},},{trigger:'.o-we-command-name:contains("Media")',run:'click',},{trigger:'.o_select_media_dialog .nav-tabs .nav-link:contains("Documents")',run:'click',},{trigger:'.o_existing_attachment_cell .o_button_area:has(+ .o_file_name:contains("Onboarding"))',run:'click',},];registry.category("web_tour.tours").add('helpdesk_pick_file_as_attachment_from_knowledge',{url:'/odoo/action-helpdesk.helpdesk_ticket_action_main_tree',steps:()=>[{trigger:'tr.o_data_row:first-child .o_data_cell[name="name"]',run:'click',},{trigger:'button[title="Search Knowledge Articles"]',run:'click',},{trigger:'.o_command_palette_listbox #o_command_0',run:'click',},{trigger:'.o_knowledge_form_view',},...createEmbeddedFileSteps,{trigger:'[data-embedded="file"] .o_embedded_toolbar_button_text:contains("Attach")',run:'click',},{trigger:'.o-mail-Chatter .o-mail-AttachmentContainer:not(.o-isUploading):contains("Onboarding")',}]});registry.category("web_tour.tours").add('helpdesk_pick_file_as_message_attachment_from_knowledge',{url:'/odoo/action-helpdesk.helpdesk_ticket_action_main_tree',steps:()=>[{trigger:'tr.o_data_row:first-child .o_data_cell[name="name"]',run:'click',},{trigger:'button[title="Search Knowledge Articles"]',run:'click',},{trigger:'.o_command_palette_listbox #o_command_0',run:'click',},{trigger:'.o_knowledge_form_view',},...createEmbeddedFileSteps,{trigger:'[data-embedded="file"] .o_embedded_toolbar_button_text:contains("Send")',run:'click',},{trigger:'.o-mail-Chatter .o-mail-Composer .o-mail-AttachmentContainer:not(.o-isUploading):contains("Onboarding") i.fa-check',}]});return __exports;});;

/* /website_helpdesk_knowledge/static/tests/tours/helpdesk_knowledge_insert_view_link_tour.js */
odoo.define('@website_helpdesk_knowledge/../tests/tours/helpdesk_knowledge_insert_view_link_tour',['@knowledge/../tests/tours/knowledge_tour_utils','@web/core/registry'],function(require){'use strict';let __exports={};const{endKnowledgeTour}=require('@knowledge/../tests/tours/knowledge_tour_utils');const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add('helpdesk_insert_kanban_view_link_in_knowledge',{url:'/odoo/action-helpdesk.helpdesk_ticket_action_main_tree',steps:()=>[{trigger:'button.o_switch_view.o_kanban',run:'click',},{trigger:'.o_kanban_renderer',},{trigger:'.o_control_panel .o_searchview_dropdown_toggler',run:"click",},{trigger:'.o_filter_menu .dropdown-item:contains("My Tickets")',run:"click",},{trigger:'.o_searchview .o_facet_value:contains("My Tickets")',},{trigger:'.o_control_panel .o_cp_action_menus .dropdown-toggle',run:"click",},{trigger:".dropdown-menu .dropdown-toggle:contains(Knowledge)",run:"hover",},{trigger:'.dropdown-menu .dropdown-item:contains("Insert link in article")',run:"click",},{trigger:'.modal-footer button:contains("New")',run:'click',},{trigger:'.o_knowledge_form_view',},{trigger:"[data-embedded='viewLink'] a",run:"click",},{trigger:"div.o_popover > div:nth-child(1) > div:contains('All Tickets')",run:"click",},{trigger:'.o_kanban_renderer',},{trigger:'.o_searchview .o_facet_value:contains("My Tickets")',},{trigger:'.o_control_panel .o_last_breadcrumb_item:contains("Tickets")',},{trigger:'.o_back_button',run:"click",},{trigger:'[data-embedded="viewLink"]',},...endKnowledgeTour()]});return __exports;});;

/* /website_helpdesk_knowledge/static/tests/tours/helpdesk_knowledge_insert_view_tour.js */
odoo.define('@website_helpdesk_knowledge/../tests/tours/helpdesk_knowledge_insert_view_tour',['@knowledge/../tests/tours/knowledge_tour_utils','@web/core/registry'],function(require){'use strict';let __exports={};const{endKnowledgeTour}=require('@knowledge/../tests/tours/knowledge_tour_utils');const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add('helpdesk_insert_graph_view_in_knowledge',{url:'/odoo/action-helpdesk.helpdesk_ticket_analysis_action',steps:()=>[{trigger:'.o_control_panel .o_searchview_dropdown_toggler',run:"click",},{trigger:'.o_filter_menu .dropdown-item:contains("Urgent")',run:"click",},{trigger:'.o_searchview .o_facet_value:contains("Urgent")',run:"click",},{trigger:'.o_control_panel .o_searchview_dropdown_toggler',run:"click",},{trigger:'.o_group_by_menu .dropdown-item:contains("Team")',run:"click",},{trigger:'.o_searchview .o_facet_value:contains("Team")',run:"click",},{trigger:'.o_control_panel .o_cp_action_menus .dropdown-toggle',run:"click",},{trigger:".dropdown-menu .dropdown-toggle:contains(Knowledge)",run:"hover",},{trigger:'.dropdown-menu .dropdown-item:contains("Insert view in article")',run:"click",},{trigger:'.modal-footer button:contains("New")',run:"click",},{trigger:'.o_knowledge_form_view',run:"click",},{trigger:'[data-embedded="view"]',run:function(){this.anchor.scrollIntoView();},},{trigger:'[data-embedded="view"] .o_searchview .o_facet_value:contains("Urgent")',run:"click",},{trigger:'[data-embedded="view"] .o_searchview .o_facet_value:contains("Team")',run:"click",},...endKnowledgeTour()]});return __exports;});;

/* /website_helpdesk_knowledge/static/tests/tours/helpdesk_knowledge_template_bloc_tour.js */
odoo.define('@website_helpdesk_knowledge/../tests/tours/helpdesk_knowledge_template_bloc_tour',['@web/core/registry','@web_tour/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{stepUtils}=require("@web_tour/tour_utils");registry.category("web_tour.tours").add('helpdesk_pick_template_as_message_from_knowledge',{url:'/odoo/action-helpdesk.helpdesk_ticket_action_main_tree',steps:()=>[{trigger:'tr.o_data_row:first-child .o_data_cell[name="name"]',run:'click',},{trigger:'button[title="Search Knowledge Articles"]',run:'click',},{trigger:'.o_command_palette_listbox #o_command_0',run:'click',},{trigger:'.o_knowledge_form_view',},{trigger:'[data-embedded="clipboard"] .o_embedded_toolbar_button_text:contains("Send as Message")',run:'click',},{trigger:'.o_mail_composer_form .o_field_html p:contains("Hello world")',},{trigger:'.o_mail_composer_form .o_field_html .o-signature-container:contains("Mitchell Admin")',},{trigger:'footer button:contains(Discard)',run:'click'}]});registry.category("web_tour.tours").add('helpdesk_pick_template_as_description_from_knowledge',{url:'/odoo/action-helpdesk.helpdesk_ticket_action_main_tree',steps:()=>[{trigger:'tr.o_data_row:first-child .o_data_cell[name="name"]',run:'click',},{trigger:'button[title="Search Knowledge Articles"]',run:'click',},{trigger:'.o_command_palette_listbox #o_command_0',run:'click',},{trigger:'.o_knowledge_form_view',},{trigger:'[data-embedded="clipboard"] .o_embedded_toolbar_button_text:contains("Use as Description")',run:'click',},{trigger:'.o_form_sheet .o_field_html .odoo-editor-editable p:contains("Hello world")',},...stepUtils.discardForm(),]});return __exports;});;

/* /website_helpdesk_knowledge/static/tests/tours/helpdesk_knowledge_tour_portal.js */
odoo.define('@website_helpdesk_knowledge/../tests/tours/helpdesk_knowledge_tour_portal',['@web/core/registry'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");registry.category("web_tour.tours").add('access_helpdesk_article_portal_tour',{steps:()=>[{content:"clik on 'Help'",trigger:'a[role="menuitem"]:contains("Help")',run:"click",expectUnloadPage:true,},{content:"Write 'Article' in the search bar",trigger:'input[name="search"]',run:"edit Article",},{content:"Check that results contain 'Helpdesk Article'",trigger:'.dropdown-item:contains("Helpdesk Article")',},{content:"Check that results contain 'Child Article'",trigger:'.dropdown-item:contains("Child Article")',},{content:"Check that results don't contain 'Other Article'",trigger:'.dropdown-menu:not(:has(.dropdown-item:contains("Other Article")))',}]});return __exports;});;

/* /website_payment/static/tests/tours/donation.js */
odoo.define('@website_payment/../tests/tours/donation',['@web/core/registry','@website/js/tours/tour_utils'],function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{clickOnSave,registerWebsitePreviewTour,insertSnippet,changeOptionInPopover,}=require("@website/js/tours/tour_utils");registerWebsitePreviewTour("donation_snippet_edition",{url:"/",edition:true,},()=>[...insertSnippet({id:"s_donation",name:"Donation",groupName:"Contact & Forms",}),...clickOnSave(),]);registry.category("web_tour.tours").add("donation_snippet_use",{url:"/",steps:()=>[{content:"Enter a custom amount smaller than the minimum, testing the minimum amount",trigger:"#s_donation_amount_input",run:"edit 1",},{content:"Donate with custom amount set",trigger:".s_donation_donate_btn.o_ready_to_donate",run:"click",},{content:"Check if alert-danger element exists",trigger:"p.alert-danger",},{content:"Enter a custom amount",trigger:"#s_donation_amount_input",run:"edit 55",},{content:"Donate with custom amount set",trigger:".s_donation_donate_btn.o_ready_to_donate",run:"click",expectUnloadPage:true,},{content:"Check if custom amount radio input is selected",trigger:"input#other_amount:checked",},{content:"Check if custom amount radio input has value 55",trigger:'input#other_amount[value="55.0"]',},{content:"Select the amount of 25",trigger:"input#amount_1",run:"click",},{content:"Verify that amount_1 is checked",trigger:"input#amount_1:checked",},{content:"Verify that other_amount is not checked",trigger:"input#other_amount:not(:checked)",},{content:"Click on the custom amount radio button",trigger:"input#other_amount",run:"click",},{content:"Submit the donation form",trigger:"button[name='o_payment_submit_button']",run:"click",},{content:"Check if the warning message is displayed",trigger:".o_donation_payment_form:has(small#warning_message_id)",},{content:"Enter an amount less than the minimum value",trigger:"input#other_amount_value",run:"edit 1",},{content:"Verify whether the minimum value warning message is displayed",trigger:"small#warning_min_message_id:contains('The minimum donation amount is $5.')",},{content:"Verify other warning messages remain hidden",trigger:".o_donation_payment_form:has(small#warning_message_id.d-none)",},{content:"Click on the first radio button",trigger:"input[name='o_donation_amount']:first-child",run:"click",},{content:"Ensure the custom amount value is cleared",trigger:"input#other_amount_value:empty",},{content:"Ensure no warning message is displayed",trigger:".o_donation_payment_form:has(#warning_min_message_id.d-none)",},],});registerWebsitePreviewTour("donation_snippet_edition_2",{url:"/",edition:true,},()=>[{content:"Click on 'Custom Amount' button",trigger:":iframe .s_donation_donate_btn",run:"click",},...changeOptionInPopover("Donation Button","Custom Amount","[data-action-param='slider']"),...clickOnSave(),]);registry.category("web_tour.tours").add("donation_snippet_use_2",{url:"/",steps:()=>[{content:"Click on $10 button",trigger:".s_donation_btn_description button",run:"click",},{content:"Donate using the selected amount",trigger:".s_donation_donate_btn.o_ready_to_donate",run:"click",expectUnloadPage:true,},{content:"Click on the 'Amount to donate' input field",trigger:"input#other_amount_value",run:"click",},{content:"Change custom amount to 67",trigger:"input[name='o_donation_amount'][type='number']",run:"edit 67",},{content:"Select the custom amount radio button",trigger:"input#other_amount",run:"click",},{content:"Submit the donation form",trigger:"button[name='o_payment_submit_button']",run:"click",expectUnloadPage:true,},{content:"Verify that the amount displayed is 67",trigger:'body:contains(Your payment has been processed.) span.oe_currency_value:contains("67.00")',expectUnloadPage:true,},{trigger:"[name=o_payment_status_alert]:contains(thank you!)",},],});return __exports;});;

/* /web/static/tests/legacy/ignore_missing_deps_stop.js */
window.__odooIgnoreMissingDependencies=false;