import { IModel , mergeObjects , cloneObject , getProp } from "@esri/hub-common" ; import { _includeListFromItemType } from "./_include-list-from-item-type" ; import { IDraft } from "@esri/hub-common" ; param { * } siteOrPageModel param { * } draft export function applyDraft ( siteOrPageModel , draft ) { if ( ! draft ) return siteOrPageModel ; const includeList = _includeListFromItemType ( siteOrPageModel . item ) ; return mergeObjects ( draft , cloneObject ( siteOrPageModel ) , includeList ) ; }