I need a power point revised
objects.xml
Dropbox 159827 LE 7663 3 7838 7838 6606 IM3003 rubric graded True True True 0 0 False False 637348547068700000 637348547068700000 3 159827 1618899 Dropbox 7663 7663 7838 7838 6606 IM3003 rubric graded True True True False 637348547068700000 637348547068700000
associations.xml
files/159827/IM3003 Assessment Submission (Attempt 1).d2lresource
resource1/1124/d2l/log.txt
stream https://tempolearning.brightspace.com/d2l/lms/dropbox/user/folder_user_view_feedback.d2l?db=1124&grpid=0&isprv=0&bp=0&ou=12454&d2l_body_type=2&isExport=true text \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\index.html stream https://tempolearning.brightspace.com/d2l/common/css/D2L.LP.Web.Core.default.css?v=20.20.8.23830-31 text \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\common\css\1.css stream https://tempolearning.brightspace.com/d2l/common/css/D2L.LE.Dropbox.Integration.Turnitin.Desktop.default.css?v=20.20.8.23830-31 text \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\common\css\2.css stream https://tempolearning.brightspace.com/d2l/common/css/D2L.LP.Web.Controls.Grid.default.css?v=20.20.8.23830-31 text \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\common\css\3.css stream https://tempolearning.brightspace.com/d2l/lms/grades/static/css/score_display_control.css?v=20.20.8.23830-31 text \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\lms\grades\static\css\4.css stream https://tempolearning.brightspace.com/d2l/lms/dropbox/static/include/dropboxuser.css?v=20.20.8.23830-31 text \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\lms\dropbox\static\include\5.css stream https://tempolearning.brightspace.com/d2l/common/js/D2L.LP.Web.Core.default.js?v=20.20.8.23830-31 text \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\common\js\6.js stream https://tempolearning.brightspace.com/d2l/common/js/D2L.LE.Dropbox.Integration.Turnitin.Desktop.default.js?v=20.20.8.23830-31 text \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\common\js\7.js stream https://tempolearning.brightspace.com/d2l/common/js/D2L.LP.Web.Controls.Grid.default.js?v=20.20.8.23830-31 text \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\common\js\8.js stream https://tempolearning.brightspace.com/d2l/lms/grades/static/include/score_display_control.js?v=20.20.8.23830-31 text \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\lms\grades\static\include\9.js stream https://tempolearning.brightspace.com/d2l/img/lp/pixel.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\10.gif stream https://tempolearning.brightspace.com/d2l/common/viewFile.d2lfile/Database/MTU5Mjk4/IM3003_C_Clark.pptx?ou=12454&d2l_body_type=2 binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\common\viewFile.d2lfile\Database\MTU5Mjk4\IM3003_C_Clark.pptx stream https://tempolearning.brightspace.com/d2l/le/dropbox/12454/turnitin/1124/submission/107639/159298/RetrieveOriginalityReport text \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\le\dropbox\12454\turnitin\1124\submission\107639\159298\11 stream https://tempolearning.brightspace.com/d2l/img/0/Images.FileTypeIcons.icnD2LRsrc16x16.png?v=20.20.8.23830-31 binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\0\12.png stream https://tempolearning.brightspace.com/d2l/img/LP/dragDrop/draggable.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\LP\dragDrop\13.gif stream https://tempolearning.brightspace.com/d2l/img/lp/rating/set.png binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\rating\14.png stream https://tempolearning.brightspace.com/d2l/img/lp/rating/notSet.png binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\rating\15.png stream https://tempolearning.brightspace.com/d2l/img/lp/rating/setOver.png binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\rating\16.png stream https://tempolearning.brightspace.com/d2l/img/lp/rating/clear.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\rating\17.gif stream https://tempolearning.brightspace.com/d2l/img/lp/rating/clearOver.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\rating\18.gif stream https://tempolearning.brightspace.com/d2l/img/lp/rating/avUnrated.png binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\rating\19.png stream https://tempolearning.brightspace.com/d2l/img/lp/rating/avRated.png binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\rating\20.png stream https://tempolearning.brightspace.com/d2l/img/lp/progressBar/s.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\progressBar\21.gif stream https://tempolearning.brightspace.com/d2l/img/lp/progressBar/d.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\progressBar\22.gif stream https://tempolearning.brightspace.com/d2l/img/lp/progressBar/c.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\progressBar\23.gif stream https://tempolearning.brightspace.com/d2l/img/lp/progressBar/b.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\progressBar\24.gif stream https://tempolearning.brightspace.com/d2l/img/lp/progressBar/t1.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\progressBar\25.gif stream https://tempolearning.brightspace.com/d2l/img/lp/progressBar/t3.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\progressBar\26.gif stream https://tempolearning.brightspace.com/d2l/img/lp/progressBar/t2.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\progressBar\27.gif stream https://tempolearning.brightspace.com/d2l/img/lp/loading_lg.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\28.gif stream https://tempolearning.brightspace.com/d2l/img/lp/Dialog/loading.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\Dialog\29.gif stream https://tempolearning.brightspace.com/d2l/img/lp/actions/separator.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\actions\30.gif stream https://tempolearning.brightspace.com/d2l/img/lp/instructions/a_r.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\instructions\31.gif stream https://tempolearning.brightspace.com/d2l/img/lp/mobile/loading.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\mobile\32.gif stream https://tempolearning.brightspace.com/d2l/img/lp/imageCheckbox/unchecked.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\imageCheckbox\33.gif stream https://tempolearning.brightspace.com/d2l/img/lp/imageCheckbox/checked.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\imageCheckbox\34.gif stream https://tempolearning.brightspace.com/d2l/img/lp/imageCheckbox/checked_disabled.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\imageCheckbox\35.gif stream https://tempolearning.brightspace.com/d2l/img/lp/imageCheckbox/unchecked_disabled.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\imageCheckbox\36.gif stream https://tempolearning.brightspace.com/d2l/img/lp/imageCheckbox/checked_hover.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\imageCheckbox\37.gif stream https://tempolearning.brightspace.com/d2l/img/lp/imageCheckbox/unchecked_hover.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\imageCheckbox\38.gif stream https://tempolearning.brightspace.com/d2l/img/lp/dialog/x.png binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\dialog\39.png stream https://tempolearning.brightspace.com/d2l/img/lp/upDownVote/updownvote.png binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\upDownVote\40.png stream https://tempolearning.brightspace.com/d2l/img/lp/upDownVote/updownvoteinput.png binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\upDownVote\41.png stream https://tempolearning.brightspace.com/d2l/img/lp/dialog/error_36.png binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\dialog\42.png stream https://tempolearning.brightspace.com/d2l/img/lp/dialog/info_36.png binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\dialog\43.png stream https://tempolearning.brightspace.com/d2l/img/lp/dialog/warning_36.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\dialog\44.gif stream https://tempolearning.brightspace.com/d2l/img/lp/fileDrop/close.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\fileDrop\45.gif stream https://tempolearning.brightspace.com/d2l/img/lp/share/tweet.png binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\share\46.png stream https://tempolearning.brightspace.com/d2l/img/lp/share/tweet_hover.png binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\share\47.png stream https://tempolearning.brightspace.com/d2l/img/lp/xspl/block.png binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\xspl\48.png stream https://tempolearning.brightspace.com/d2l/img/LP/grid/unread.png binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\LP\grid\49.png stream https://tempolearning.brightspace.com/d2l/img/lp/xspl/html_editor_media.png binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\img\lp\xspl\50.png stream https://tempolearning.brightspace.com/d2l/tools/img/up.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\tools\img\51.gif stream https://tempolearning.brightspace.com/d2l/tools/img/down.gif binary \\fs-walden\temp\walden\ep\8eaeab11-0304-4e9e-a331-3d624385cc891124\resource1\1124\d2l\tools\img\52.gif Took 0:3 minutes (3.999 seconds)
resource1/1124/d2l/common/css/1.css
html.dht_iframe div#d_content_r_p { padding: 0; } html.dht_iframe iframe { border: 0px; } body.dbd_frame { overflow-y: auto; } form { margin: 0; } .d2l-hub-areas { max-width: 820px; } .d2l-actions { list-style: none outside none; background: none repeat scroll 0 0 transparent; border: 0 none; font-size: 100%; font-weight: normal; margin: 0; outline: 0 none; padding: 0; vertical-align: baseline; } .d2l-page-actions > ul { list-style: none; margin: 0; padding: 0; } .d2l-page-action { padding-bottom: 0.5em !important; } body.dbd_frame { min-width: 0px; padding: 0px; } .daylight.dbd_frame #d_content { max-width: 100vw; } .dbd_frame .d2l-page-header { margin: 10px 0 0 10px; } .daylight.dbd_frame .d2l-page-header { margin-left: 0; } [dir="rtl"].daylight.dbd_frame .d2l-page-header { margin-right: 0; } .dbd_frame .d2l-action-buttons { padding-left: 0; } [dir="rtl"].dbd_frame .d2l-action-buttons { padding-left: 0; padding-right: 0; } .dbd_frame .d2l-action-buttons.d2l-floating-action-buttons { padding-left: 30px; } [dir="rtl"].dbd_frame .d2l-action-buttons.d2l-floating-action-buttons { padding-left: 0; padding-right: 30px; } .dbd_frame .d2l-page-actions { margin: 0px 10px; } body.dbd_l.daylight div#d_content_r { margin-left: 17em; } body.dbd_lw div#d_content_r { margin-left: 25em; } body.dbd_l div#d_content_r_c1 { margin-left: -17em; width: 100%; float: right; } body.dbd_lw div#d_content_r_c1 { margin-left: -25em; width: 100%; float: right; } body.dbd_l div#d_content_r_c2, body.dbd_lw div#d_content_r_c2 { margin-left: 1px; } .daylight body.dbd_frame div#d_content_r_p { padding: 0px; } div#d_content_l { float: left; width: 15.9em; } div#d_content_lw { float: left; width: 24.9em; overflow-x: auto; overflow-y: hidden; } div#d_content_l, div#d_content_lw { position: relative; } .dbd_dialog .d2l-action-buttons { padding: 10px 0 0 10px; } .dbd_dialog .d2l-action-buttons-list { margin-bottom: 0; } body.dbd_dialog div#d_content_lw { width: 14.8em; } body.dbd_dialog.daylight div#d_content_l { border-right: 1px solid #f1f1f1; box-sizing: border-box; padding-right: 30px; width: 11em; } body.dbd_dialog.daylight[dir="rtl"] div#d_content_l { border-left: 1px solid #f1f1f1; border-right-style: none; padding-left: 30px; padding-right: 0; } body.dbd_dialog.daylight div#d_content_l ~ div#d_content div#d_content_r { margin-left: 12.5em; } body.dbd_dialog.daylight[dir="rtl"] div#d_content_l ~ div#d_content div#d_content_r { margin-left: 0; margin-right: 12.5em; } body.dbd_dialog .d2l-dialog-body { overflow: visible; } .d2l-heading { padding: 0px 0px 6px 0px; } .d2l-heading > .d2l-heading-title { display: inline-block; } div.d_box_c { background-color: #ffffff; border: 1px solid #c0c0c0; border-top: none; border-radius: 0.3em; padding: 0.5em; } div.d_box_c2 { border-top: 1px solid #c0c0c0; border-radius: 0.3em; } .d_box_t { background-position: top right; background-repeat: repeat-y; border-bottom: none; border-radius: 0.3em 0.3em 0 0; border-top-left-radius: 0.3em; border-top-right-radius: 0.3em; color: #ffffff; font-size: 1em; font-weight: bold; padding: 0.4em; margin: 0; } .dco .d_box_t { border-radius: 0; } .d_ua { border: 1px solid #d4d4d4; border-radius: 5px; } .d_ua > .d_ua_h { font-weight: bold; background-color: #efefef; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid transparent; border-bottom: 1px solid #d4d4d4; } .d_ua > .d_ua_h, .d_ua > div { padding: 4px; } div.dba { padding-top: 0.5em; } .d_tabs div.dba { padding-left: 10px; padding-right: 10px; } div.d_bnd { background-position: top right; background-repeat: repeat-y; color: #ffffff; font-weight: bold; padding: 0.4em; margin: 0; text-align: center; } div.d_bnd h1, div.d_bnd h2 { color: #ffffff; font-size: 1em; font-weight: bold; padding: 0; margin: 0; display: inline; } div.d_bnd a, div.d_bnd a:link, div.d_bnd a:visited, div.d_bnd a:hover { color: #ffffff; font-weight: normal; } .dbd_shaded { border: 1px solid #dddddd; background-color: #f8f8f8; padding: 0.4em; } input:focus, select:focus { outline-width: 1px; outline-color: #B6BDD2; outline-style: solid; } textarea { margin-top: 1px; margin-right: 1px; vertical-align: middle; } select { vertical-align: middle; margin-top: 2px; margin-bottom: 2px; margin-right: 5px; } table { border-collapse: collapse; } .daylight hr.D2LSeparator { border-top: solid 1px #cdd5dc; } hr.D2LSeparator { height: 1px; width: 100%; border-bottom: none; border-left: none; border-right: none; margin: 0.5em 0em 0.5em 0em; } .D2LModified { background-color: #E6EFF2; } img { border: none; } #d_content img, #d_content_l img { vertical-align: middle; } img.D2LImg { margin-right: .5em; } span.D2LImgText { margin: 0px .4em 0px 0px; vertical-align: middle; } a.D2LImgLink, a.D2LImgLink:link, a.D2LImgLink:visited, a.D2LImgLink:hover { color: #494c4e; font-weight: bold; text-decoration: none; } a.D2LImgLink label { cursor: pointer; } .dsr, .d2l-offscreen { position: absolute; left: -10000px; width: 1000px; overflow: hidden; width: 1px; height: 1px; } .clear, .d2l-clear { clear: both !important; font-size: 1px !important; height: 0 !important; margin: 0 !important; padding: 0 !important; visibility: hidden !important; width: 1px !important; display: block; } div.d2l_loading { padding: 0.5em; color: #666666; font-weight: bold; font-size: 1.25em; } div.d2l_loading img { padding-right: 0.5em; } .no_disp { display: none; } .inline_disp { display: inline; } .block_disp { display: block; } a.noFocusOutline:focus, a.noFocusOutline:active { outline: none; } .draggable { background:url('../../../d2l/img/LP/dragDrop/13.gif') no-repeat 2px 2px; } .float_l { float: left; } .float_r { float: right; } .talign_l { text-align: left; } .talign_r { text-align: right; } .d2l-page-bg-full { position: fixed; width: 100%; height: 100%; z-index: -100; } .d2l-page-bg-full > div { position: relative; width: 100%; height: 100%; } .d2l-rowshadeonhover:hover { background: #E7E7E7; cursor: pointer; } .d2l-rowshadeonhover-selected { background: #E8F2FC; } .d2l-rowshadeonhover-selected:hover { background: #D3E7FA; cursor: pointer; } .d2l-rowshadeonhover label:hover { cursor: pointer; } .d2l-rowshadeonhover-selected label:hover { cursor: pointer; } div.dab_c { padding: 0px 3px 0px 3px; } div.dab_cl { padding: 2px 3px 0px 2px; } span.dab_i { float: left; } span.dab_s { padding-left: 9px; } span.dab_disabled > a { text-decoration: none; } span.dab_disabled > a > img { opacity: 0.5; zoom: 1; } span.dab_disabled > a > span { color: #7CB8C7; } span.dab_i a, span.dab_i a:link, span.dab_i a:visited, span.dab_i a:hover { font-weight: bold; display: block; padding: 5px 4px; } span.dab_i a:focus { outline: none; } span.dab_i img { padding: 2px 6px 2px 0px; } div.dab_c ul { margin: 0px; padding: 0px; white-space: nowrap; } div.dab_c li { display: inline-block; list-style-type: none; padding: 0; margin-right: 10px; } ul.dab_rl { float:right; } ul.dab_ll { float:left; } li.dab_il { float:left; } li.dab_ir { float: right; }.d2l-action-buttons-list { list-style: none outside none; margin: 0px; margin-bottom:10px; padding: 0px; } .d2l-action-buttons-list > .d2l-action-buttons-item { display: inline-block; } .d2l-action-buttons-list > .d2l-action-buttons-menu > .dco_f { display: inline-block !important; width: auto !important; min-width: 190px !important; } [dir="rtl"] .d2l-action-buttons-list > .d2l-action-buttons-menu > a { margin-left: 0.3em; margin-right: 0; } .d2l-action-buttons-list > .d2l-action-buttons-menu > a > img { margin-top: -0.2em; } div.dbvr { background-color: #cccccc; border: 1px dashed #666666; position: absolute; } div#d_breadcrumbs { font-weight: bold; padding: 1em 1em 0em 1em; } div.ddial_o { left: -2000px; position: absolute; top: -2000px; } .ddial_h a { cursor: move; } .daylight .ddial_t { margin-bottom: 5px; } .daylight .ddial_h { padding: 0; } div.ddial_c { cursor: default; overflow: hidden; padding: 0; -webkit-overflow-scrolling:touch; } .daylight .ddial_c p { margin-top: 10px !important; margin-bottom: 10px !important; } div.ddial_l { color: #999999; font-weight: bold; font-size: 1.5em; text-align: center; } div.ddial_l img { padding-right: 10px; } [dir='rtl'] div.ddial_l img { padding-right: auto; padding-left: 10px; } .dpopup_t, .dpopup_f { margin-top: -20px; padding-top: 20px; } .ddial_h { cursor: move; width: 100%; } .ddial_close { position: relative; } .ddial_i > table.d2l-dialog-buttons { overflow: auto; width: 100%; } table.d2l-dialog-buttons td { white-space: nowrap; } body.daylight.dbd_dialog, .daylight.dbd_dialog .d2l-page-main { background-color: transparent !important; } .daylight.dbd_dialog .d2l-page-main.d2l-dialog-width { position: absolute; width: 100%; height: 100%; overflow:auto; } .ddial_c_frame { width: 100% !important; height: 100% !important; overflow: hidden; } .d2l-edit.d2l-edit-legacy { margin-right: 0; width: auto; } [dir="rtl"] .d2l-edit.d2l-edit-legacy { margin-left: 0; } table.d_FG { margin: 0 0 0 0; border-style: none; width: 100%; } .daylight table.d_FG .d2l-field-label-empty { display: none; } table.d_FG td.fl_n, table.d_FG td.fl_w { padding-right: 3px; text-align: right; vertical-align: top; width: 1%; white-space: normal; } [dir="rtl"] table.d_FG td.fl_n, [dir="rtl"] table.d_FG td.fl_w { padding-right: 0; padding-left: 3px; text-align: left; } .daylight table.d_FG td.fl_n { padding-top: 7px; } table.d_FG td.fl_n { white-space: nowrap; } .fl_left > .vui-label { margin-bottom: 0; } .d_fgh { padding-bottom: 10px; } table.d_FG td.fcl_w, table.d_FG td.fct_w { padding: 0 3px 3px 0; text-align: left; vertical-align: top; white-space: normal; } [dir="rtl"] table.d_FG td.fcl_w, [dir="rtl"] table.d_FG td.fct_w { padding-left: 3px; padding-right: 0; text-align: right; } table.d_FG td.fcl_w textarea, table.d_FG td.fct_w textarea { vertical-align: top; } .daylight table.d_FG td.fct_w, .daylight table.d_FG td.dh_fg { padding-bottom: 1.5rem; } .daylight table.d_FG .d2l-select-container .d2l-select { width: 100%; } .fgskip { font-size: 1px; height: 1px; } .d2l-iterator-legacy { color: #494c4e; } .d2l-iterator-legacy.d2l-iterator-disabled { opacity: 0.5; } .d2l-link:hover .d2l-iterator-legacy:not(.d2l-iterator-disabled), .d2l-link:focus .d2l-iterator-legacy:not(.d2l-iterator-disabled) { color: #006fbf; text-decoration: underline; } div.drt { display: inline; line-height: normal; padding: 0; margin: 0; } div.drt.d2l-drt-untrusted { overflow: hidden; position: relative; } table.dsearch { width:100%; margin:0; border:0px; } table.dsearch td.dsearch_suggested { border: none; text-align:left; padding: 6px 20px 6px 10px; width: 100%; white-space: nowrap; font-size: 1.2em; color:Red; } [dir="rtl"] table.dsearch td.dsearch_suggested { text-align: right; padding-left: 20px; padding-right: 10px; } table.dsearch td.fl_n { white-space:nowrap; text-align:right; vertical-align:top; } [dir="rtl"] table.dsearch td.fl_n { text-align: left; } .daylight table.dsearch .d2l-msg-container { margin-bottom: 10px; } .daylight table.dsearch .d2l-msg-container .d2l-msg-container-text { padding: 10px 20px; } .dsearch_header { margin-bottom: 10px; } .d2l-search-simple-wc { margin-right: 5px; } [dir="rtl"] .d2l-search-simple-wc { margin-left: 5px; margin-right: 0; } .d2l-search-simple-wc d2l-input-search { max-width: 16.5rem; } ul.dl { padding: 0 0 0 32px; margin: 0; } [dir='rtl'] ul.dl { padding: 0 32px 0 0; margin: 0; } ul.dl_ci { list-style-type: circle; } ul.dl_sq { list-style-type: square; } ul.dl_di { list-style-type: disc; } ul.dl_no { list-style-position: outside; list-style-type: none; padding-left: 0; text-indent: 0; } [dir='rtl'] ul.dl_no { padding-right: 0; } ul.dl_fl { padding-left: 0; } [dir='rtl'] ul.dl_fl { padding-right: 0; } ul.dl_fl li { padding-top: 0 !important; padding-bottom: 0 !important; display: inline; } ul.dl li { padding: 0.3em 0; font-weight: normal; text-align: left; } [dir='rtl'] ul.dl li { text-align: right; } span.dl_p { vertical-align:top; display: inline-block; }.d2l-longedit-legacy { width: auto; } ul.drat_ul { list-style: none; margin: 0px; padding: 0px; position: relative; } ul.drat_ul li { padding: 0px; margin: 0px; float: left; } ul.drat_ul li a { display: block; width: 16px; height: 16px; text-decoration: none; text-indent: -9000px; z-index: 20; position: absolute; padding: 0px; background-image: none; } ul.drat_ul li.drat_cr { background:url('../../../d2l/img/lp/rating/14.png') repeat-x top left; height: 16px; position: absolute; display: block; text-indent: -9000px; z-index: 1; } ul.drat_bge { background:url('../../../d2l/img/lp/rating/15.png') no-repeat top left; height: 16px; } ul.drat_bgd { background:url('../../../d2l/img/lp/rating/15.png') no-repeat top left; } ul.drat_ce { height: 16px; width: 103px; background-position: 23px 0px; } ul.drat_cd { height: 16px; width: 80px; background-position: 0px 0px; } ul.drat_ul li.drat_st a:hover { background:url('../../../d2l/img/lp/rating/16.png') repeat-x top left; z-index: 1; } a.drat_stl { background:url('../../../d2l/img/lp/rating/16.png') repeat-x top left !important; z-index: 1 !important; } ul.drat_ul li.drat_cl { background:url('../../../d2l/img/lp/rating/17.gif') no-repeat top left; width: 23px; height: 16px; left: 0px; } ul.drat_ul li.drat_cl a:hover { background:url('../../../d2l/img/lp/rating/18.gif') no-repeat top left; } a.drat_claf { background:url('../../../d2l/img/lp/rating/18.gif') no-repeat top left !important; } a.drat_claf:focus { outline: none; } span.drat_s { background:url('../../../d2l/img/lp/rating/19.png') repeat-x top left; display: inline-block; height: 18px; white-space: nowrap; } span.drat_c { background:url('../../../d2l/img/lp/rating/20.png') repeat-x top left; display: inline-block; height: 18px; } span.drat_h { position: absolute; left: -9000px; } li.drat_st a { outline: none; } table.dcs { text-align: left; padding: 0.2em; } td.dcs_c { padding: 0.2em; text-decoration: none; white-space: normal; } .daylight td.dcs_cf { padding-left:0; } .daylight tr.dcs_r { border: none; } .daylight tr.dcs_r ~ tr.dcs_r { border-top: 1px solid #cdd5dc; color: #494c4e; } tr.dcs_rnl, tr.dcs_rnl td.dcs_c { border-top: none !important; } img.dcs_a { padding-left: 0.3em; } img.dcs_ad { cursor: default !important; } tr.dcs_rd td { text-decoration: line-through; } .daylight tr.dcs_rd td { color: #6E7376; } table.dcs_d td { color: #999999; } tr.dcs_rd a, tr.dcs_rd a:link, tr.dcs_rd a:visited, tr.dcs_rd a:hover { color: #aaaaaa; cursor: default !important; text-decoration: line-through; } table.dcs_d a, table.dcs_d a:link, table.dcs_d a:visited, table.dcs_d a:hover { color: #aaaaaa; cursor: default !important; text-decoration: none; } table.d_t { } table.d_t td.d_tl { text-align: left; } table.d_t td.d_tc { text-align: center; } table.d_t td.d_tr { text-align: right; } table.d_t td.d_tt { vertical-align: top; } table.d_t td.d_tm { vertical-align: middle; } table.d_t td.d_tb { vertical-align: bottom; } td.d_tl, td.d_tc, td.d_tr { padding: 3px; } table.d_t td.d_tn { white-space: nowrap; } table.d_t td.d_tw { white-space: normal; } div.d_tabs > div.d_tabs { margin: 0 -10px; } div.d_tabs { display: inline-block; min-width: 100%; } div.d_tabs_container div.d_tabs { margin: 0; } div.d_tabs_container { border: solid 1px #cdd5dc; margin: 0; padding: 0; } .d_tabs_container > .d_ma { padding-top: 10px; } div.d_tabs_tab { display: none; } div.d_tabs_tabcontent { padding: 10px; } div.d_tabs_header { padding-top: 20px; position: relative; top: 1px; z-index: 1; } div.d_tabs_header table { border-collapse: separate; } .d_tabs_header td { border-color: #cdd5dc; border-radius: 6px 6px 0 0; border-style: solid; border-width: 1px; color: #494c4e; font-size: 16px; line-height: 19px; padding: 2px; vertical-align: top; } .d_tabs_header .d_tabs_c { background: white; border-color: white; border-bottom: solid 1px #cdd5dc; } .d_tabs_header td.d_tabs_c_s { border-bottom: solid 1px white; } .d_tabs_link, .d_tabs_link:link, .d_tabs_link:visited, .d_tabs_link:hover, .d_tabs_link:focus { color: #494c4e; display: block; font-weight: normal; padding: 12px 28px 4px 28px; outline: none; text-decoration: none; } .d_tabs_link:hover, .d_tabs_link:focus { color: #006fbf; } .d_tabs_link:focus { text-decoration: underline; } .d_tabs_c_s .d_tabs_link:focus { text-decoration: none; } .d_tabs_text { display: block; padding-bottom: 8px; position: relative; } .d_tabs_highlight_outer, .d_tabs_highlight { background-color: transparent; bottom: 0; display: block; position: absolute; } .d_tabs_highlight_outer { border-top-left-radius: 6px; border-top-right-radius: 6px; height: 6px; left: -2px; transition: background-color 0.2s; width: calc(100% + 4px); } .d_tabs_highlight { border-top-left-radius: 4px; border-top-right-radius: 4px; height: 4px; left: 0; transition: background-color 0.2s, box-shadow 0.2s; width: 100%; } .d_tabs_c_s .d_tabs_highlight, .d_tabs_c_s .d_tabs_link:focus .d_tabs_highlight { background-color: #006fbf; } .d_tabs_c_s .d_tabs_link:focus .d_tabs_highlight_outer { background-color: #006fbf; } .d_tabs_c_s .d_tabs_link:focus .d_tabs_highlight { box-shadow: 0 0 0 1px #ffffff; } div.dtb_c { padding: 0.4em; } ul.dtb_ul, ul.datb_ul { list-style:none; margin: 0; padding: 0; } ul.dtb_ul li, ul.datb_ul li { display:block; } ul.dtb_ul li { padding-left: 0.1em; padding-right:0.75em; padding-top:0.2em; padding-bottom: 0.2em; } ul.dtb_ul li { font-weight: bold; } ul.dtb_ul li { float:left; } ul.dtb_ul > li > a, ul.datb_ul > li > a, div.dtbi_sel, div.dtbi_dis { display:block; border: 1px solid transparent; text-decoration: none; } .daylight ul.datb_ul > li > a { border-left-style: none; border-right-style: none; border-bottom: 1px solid #f1f5fb; border-top: 1px solid transparent; color: #494c4e; padding: 0.65rem 0.25rem; } ul.dtb_ul > li > a, div.dtbi_sel, div.dtbi_dis { padding: 6px; } .daylight ul.dtb_ul > li > a.dtbi_sel, .daylight ul.dtb_ul > li > div.dtbi_sel, .daylight ul.datb_ul > li > a.dtbi_sel, .daylight ul.datb_ul > li > div.dtbi_sel { background-color: #e8f8ff; border-color: #29a6ff; color: #006fbf; } div.dtbi_dis { color: #aaaaaa; } .daylight ul.dtb_ul li a:hover, .daylight ul.datb_ul li a:hover, .daylight ul.dtb_ul li a:active, .daylight ul.datb_ul li a:active, .daylight ul.dtb_ul li a:focus, .daylight ul.datb_ul li a:focus { background-color: #e8f8ff; text-decoration: none; } ul.dtb_ul li a:active, ul.datb_ul li a:active, ul.dtb_ul li a:focus, ul.datb_ul li a:focus { outline: none !important; } ul.dtb_ul li img, ul.datb_ul li img { float: left; } .daylight ul.dtb_ul li img { padding-top: 6px; } .daylight ul.datb_ul li img { padding-top: 2px; } span.dtbi_txt { display:block; margin-left: 0.5em; } .d2l-tool-actions { max-width: 100%; } .daylight .d2l-page-header { display: -ms-flexbox; display: -webkit-flex; display: flex; -ms-flex-wrap: wrap; -webkit-flex-wrap: wrap; flex-wrap: wrap; } .daylight .d2l-page-header .d2l-page-actions-container { -ms-flex-order: 1; -webkit-order: 1; order: 1; float: none; margin-left: auto; } [dir='rtl'].daylight .d2l-page-header .d2l-page-actions-container { margin-left: 0; margin-right: auto; } .daylight .d2l-page-header .d2l-tool-actions { -ms-flex: 1 0 200px; -webkit-flex: 1 0 200px; flex: 1 0 200px; float: none; min-width: 200px; padding-top: 5px; } .daylight .d2l-page-header .d2l-tool-actions .wrapper.d2l-scroll-wrapper::-webkit-scrollbar { display:none; } .daylight .d2l-page-header .d2l-page-header-name { width: 100%; display: -ms-flexbox; display: -webkit-flex; display: flex; padding-bottom: 20px; } @media(max-width: 544px) { .daylight .d2l-page-header .d2l-tool-actions { padding-top: 9px; } } span.dps_c {} span.dps_c label { padding-right: 0.5em; } span.dps_c_d label { color: #999999; } a.dcp_c { font-size: 18px; padding: 2px 6px 2px 2px; text-decoration: none; vertical-align: top; white-space: nowrap; line-height:1.5em; } a.dcp_cu { background-color: #f8f7ef; border: 1px solid #9d9d92; padding: 1px 5px 1px 1px; } a.dcp_ch { background-color: #fefefd; border: 1px solid #7a98af; padding: 1px 5px 1px 1px; } a.dcp_ch:focus, a.dcp_c:focus, a.dcp_ce:focus { outline: none; } a.dcp_ce { background-color: #f8f7ef; border: 1px solid #9d9d92; padding: 1px 5px 1px 1px; } span.dcp_cb { background-color: #ffffff; background-repeat: repeat; border: 1px solid #999999; font-size: 16px; margin-right: 5px; } div.dcp_ct { background-color: #f8f7ef; } div.dcp_ct table { border-collapse: separate; } div.dcp_ct a, div.dcp_ct a:link, div.dcp_ct a:hover, div.dcp_ct a:visited { color: #000000; text-decoration: none; }.daylight .d2l-condition-actions-container { display: inline-block; margin-bottom: -0.375rem; margin-top: -0.375rem; } .daylight .d2l-condition-actions-container button { margin-top: 0.375rem; margin-bottom: 0.375rem; } .d2l-condition-set-delete { display: inline-block; margin-top: 0.5rem; } div.dsel_c { padding: 0; } .dsel_lh, .dsel_lv { list-style-type: none; margin: 0; padding: 0; } .dsel_lh li { float: left; display: inline; padding: 0em; margin-right: 3px; margin-bottom: 3px; } [dir='rtl'] .dsel_lh li { float:right; margin-left:3px; margin-right: 0; } .dsel_lv li { padding: 0; } .dsel_lh li.f, .dsel_lv li.f { margin-left: 0; } [dir='rtl'] .dsel_lh li.f, .dsel_lv li.f { margin-right:0px; } .dsel_lh li.l, .dsel_lv li.l { margin-right: 0; } [dir='rtl'] .dsel_lh li.l, .dsel_lv li.l { margin-left:0px; } .dsel_c a { border-bottom: 1px solid #f1f5fb; border-top: 1px solid transparent; display: block; line-height: 1.2rem; padding: 0.65rem 0.25rem; white-space: normal; zoom: 1; } .dsel_c a, .dsel_c a:link, .dsel_c a:visited { text-decoration: none; color: #494c4e; outline-style: none; } .dsel_c a:focus, .dsel_c a:active, .dsel_c a:hover { background-color: #e8f8ff; color: #006fbf; outline-style: none; } .dsel_c a.s { background-color: #e8f8ff; border-color: #29a6ff; color: #006fbf; } .dsel_it, .dsel_id { white-space:normal; } .dsel_id { color: Gray; } .dsel_c img { margin: 0; padding: 2px 4px 2px 0; vertical-align: middle; } [dir='rtl'] .dsel_c img { padding-left: 4px; padding-right: 0; } .dsel_c span { padding: 0; } div.dsh_c { padding: 2px; } div.dsh_c_f { background-color: #fff4de; border: 1px solid #ffba76; padding: 1px; } div.dsh_c_h { background-color: #fffcf6; border: 1px dotted #cccccc; padding: 1px; } div.dsh_c_e { background-color: #fff7e7; border: 1px dotted #cccccc; padding: 1px; } span.dpb_c { } span.dpb_cd { } span.dpb_c span.dpb_s { display: none; } span.dpb_s img.dpb_p, span.dpb_s img.dpb_d { background-repeat: repeat-x; margin: 2px 0px 0px 2px; position: absolute; width: 1px; height: 15px; } span.dpb_c span.dpb_s img.dpb_p { background-image:url('../../../d2l/img/lp/progressBar/21.gif'); } span.dpb_cd span.dpb_s img.dpb_p { background-image:url('../../../d2l/img/lp/progressBar/22.gif'); } span.dpb_cc span.dpb_s img.dpb_p { background-image:url('../../../d2l/img/lp/progressBar/23.gif'); } span.dpb_c span.dpb_s img.dpb_b { background-image:url('../../../d2l/img/lp/progressBar/24.gif'); background-repeat: repeat-x; border: 1px solid #999999; width: 197px; height: 17px; } ul.dpb_sl { display: none; list-style-type: none; margin-left: 20px; padding-left: 0; } ul.dpb_sl li { color: #999999; list-style-image:url('../../../d2l/img/lp/progressBar/25.gif'); margin: 0.2em; } span.dpb_c ul.dpb_sl li.dbp_sip { color: #333333; list-style-image:url('../../../d2l/img/lp/progressBar/26.gif'); font-weight: bold; } span.dpb_cd ul.dpb_sl li.dbp_sip { color: #999999; list-style-image:url('../../../d2l/img/lp/progressBar/25.gif'); } span.dpb_c ul.dpb_sl li.dbp_sc { color: #333333; list-style-image:url('../../../d2l/img/lp/progressBar/27.gif'); } span.dpb_cd ul.dpb_sl li.dbp_sc { color: #999999; list-style-image:url('../../../d2l/img/lp/progressBar/25.gif'); } .dpb_merr { padding-left: 0.5em; } div.dta_wc ul{ margin: 0px; } span.dta_c, span.dta_h, span.dta_p { padding-left: 0.1em; padding-bottom: 0.25em; white-space: nowrap; line-height: 1.8em; display: inline-block; } span.dta_h a:focus, span.dta_c a:focus, span.dta_p a:focus { outline: none !important; } span.dta_r { white-space: nowrap; } span.dta_c, span.dta_p { margin: 1px; } span.dta_h { border: 1px solid #D1E0B4; background: #DBEFB7 url(/d2l/img/lp/autoComplete/bgItem.gif) repeat-x top left; } span.dta_p { background-color: #E6EFF2; } span.dta_t, span.dta_td { vertical-align: middle; height: 1.5em; } span.dta_td { color: #a9a9a9; text-decoration: line-through; } img.dta_i { padding-left: 0.2em; margin: 1px; vertical-align:middle; } div.dlay { } div.dlay_autofill { } td.dlay_l, td.dlay_m, td.dlay_r { vertical-align: middle; white-space: nowrap; } td.dlay_l { text-align:left; } td.dlay_m { text-align: center !important; } td.dlay_r { text-align: right !important; } td.dlay_w { white-space: normal; } table.dlay { width: 100%; } table.dlay tr.fgskip { font-size: 0px; height: 0px; } table.dlay tr.fgskip td { border: none; font-size: 0px; padding: 0px; } table.dlay td.dlay_lc { vertical-align: top; } table.dlay_e div.dlay_p { margin: 0.2em; padding: 0.25em 0.25em 0 0.25em; background-color: #eeeeee; border: 1px solid #999999; } table.dlay_e div.dlay_pnc { margin: 0.2em; padding: 0; background-color: #ffffff; border: none; } table.dlay_v div.dlay_p { background-color: #ffffff; } table.dlay_v div.dlay_pnc { padding: 0; } .dlay_pt { color: #494c4e; cursor: default; float: left; font-size: 1em; font-weight: bold; margin: 0 0 0.2em 0; } table.dlay_e div.dlay_c { margin-bottom: 0.5em; } table.dlay_v div.dlay_c { } .dlay_ct { cursor: default; font-size: 1em; font-weight: bold; float: left; margin: 0; padding: 0px 0px 3px 0px; } table.dlay_e div.dlay_cc { background-color: #ffffff; border-left: 1px solid #999999; border-right: 1px solid #999999; padding: 0px 4px; } table.dlay_e div.dlay_cl div.dlay_cc { border: 1px solid #999999; padding: 4px; } table.dlay_e b.dlay_r * { display: block; height: 1px; overflow: hidden; font-size: 1px; border-style: solid; border-width: 0 1px; background-color: #ffffff; border-color: #999999; } table.dlay_v b.dlay_r, div.dlay_cl b.dlay_r { display: none; } div.dlay_c b.dlay_c1 { border-width: 1px 0 0; height: 0px !important; height : 1px; margin-left: 5px; margin-right: 5px; } div.dlay_c b.dlay_c2 { border-left-width: 2px; border-right-width: 2px; margin-left: 3px; margin-right: 3px; } div.dlay_c b.dlay_c3 { margin-left: 2px; margin-right: 2px; } div.dlay_c b.dlay_c4 { margin-left: 1px; margin-right: 1px; height: 2px; } ul.dlay_tb_ec { border: 1px solid #999999; list-style: none; height: 375px; margin: 15px 0 0 0; overflow: scroll; padding: 0; width: 300px; } ul.dlay_tb_ec li { border-bottom: 1px solid #cccccc; min-height: 50px; } li.dlay_tb_ea { background-color: #fafafa; } li.dlay_tb_eh { background-color: #fcfcec; } li.dlay_tb_es { background-color: #fefecc; } ul.dlay_tb_ec a, ul.dlay_tb_ec a:link, ul.dlay_tb_ec a:hover, ul.dlay_tb_ec a:visited { background-position: 7px 7px; background-repeat: no-repeat; color: #000000; display: block; line-height: 1.7em; padding: 7px 7px 7px 50px; text-decoration: none; } ul.dlay_tb_ec a:focus { outline: none; } div.dco, div.dco_f { text-align: left; } div.dco_f { left: -1000px; position: absolute; overflow: visible; top: -1000px; } div.dco_f:focus { outline: none; } div.dco div.dco_c, div.dco_f div.dco_c { padding: 0em; } div.dco_t { background-color: #fafafa; color: #494c4e; padding: 0.5em; text-align: left; zoom: 1; } div.dco_t h1, div.dco_t h2, div.dco_t h3, div.dco_t h4, div.dco_t h5, div.dco_t h6 { cursor: default; font-size: 1.1em; font-weight: bold; margin: 0; padding: 0px 0px 3px 0px; } .dco_t_h { padding-right: 20px !important; } div.dco_t_hc { float:left; width: 100%; margin-right: -20px; } .daylight iframe.d2l-navbar-margin { margin-top: 4px; height: -webkit-fill-available; height: 100vh; } h1, h2, h3, h4, h5, h6 { font-size: 1em; font-weight: normal; margin: 0; padding: 0; } .drt h1, .drt h2, .drt h3, .drt h4, .drt h5, .drt h6 { display: block; font-weight: bold; } .drt h1 { font-size: 2em; margin: .67em 0; } .drt h2 { font-size: 1.5em; margin: .83em 0; } .drt h3 { font-size: 1.17em; margin: 1em 0; } .drt h4 { margin: 1.33em 0; } .drt h5 { font-size: 0.83em; margin: 1.67em 0; } .drt h6 { font-size: 0.67em; margin: 2.33em 0; } h2.dhdg_1, h3.dhdg_1, h4.dhdg_1, h5.dhdg_1, h6.dhdg_1 { margin: 10px 0; padding-bottom: 0; } h2.dhdg_2, h3.dhdg_2, h4.dhdg_2, h5.dhdg_2, h6.dhdg_2 { padding: 5px 0 8px 0; } .dhdg_f { float: left; } div.dhdg_1 { padding-bottom: 15px; } div.dhdg_2 { padding-bottom: 8px; } div.dhdg_1 h2.dhdg_1, div.dhdg_1 h3.dhdg_1, div.dhdg_1 h4.dhdg_1, div.dhdg_1 h5.dhdg_1, div.dhdg_1 h6.dhdg_1 { padding-bottom: 0; } div.dhdg_2 h2.dhdg_2, div.dhdg_2 h3.dhdg_2, div.dhdg_2 h4.dhdg_2, div.dhdg_2 h5.dhdg_2, div.dhdg_2 h6.dhdg_2 { padding-bottom: 0; } td.dhdg_fg { text-align:left; width:100% } img.di_i { margin-right: 6px; outline: none; } [dir="rtl"] img.di_i { margin-left: 6px; margin-right: 0; } img.di_in { margin: 0; } span.di_t { margin-right: 18px; } [dir="rtl"] span.di_t { margin-left: 18px; margin-right: 0px; } .daylight a.di_l { text-decoration: none; } .daylight a.di_l img.di_i { margin-right: 0; } .daylight[dir="rtl"] a.di_l img.di_i { margin-left: 0; } .daylight a.di_l span.di_s { -webkit-align-items: center; -moz-align-items: center; align-items: center; border: 1px solid transparent; border-radius: 0.3rem; display: -webkit-inline-box; display: -webkit-inline-flex; display: -moz-inline-flex; display: -ms-inline-flexbox; display: inline-flex; -webkit-justify-content: center; -moz-justify-content: center; justify-content: center; margin-right: 5px; padding: 0.3rem; vertical-align: middle; } .daylight .d2l-grid-wrapper .d2l-badge-userprofile { max-height: 42px; max-width: 42px; } .daylight[dir="rtl"] a.di_l span.di_s { margin-right: 0; margin-left: 5px; } .daylight a.di_l:hover span.di_s, .daylight a.di_l:focus span.di_s { border-color: #b5bdc2; } .daylight a.di_l:hover span.di_s.di_s_icon, .daylight a.di_l:focus span.di_s.di_s_icon { border-color: transparent; } .daylight a.di_l:hover d2l-icon, .daylight a.di_l:focus d2l-icon { color: #004489; } .daylight a.di_l d2l-icon, .daylight a.di_l d2l-icon { transition: color 0.3s ease; } a.di_l_d, a.di_l_d:link, a.di_l_d:visited, a.di_l_d:hover, span.di_t_d { color: #999; cursor: default; } a.di_l label { cursor: pointer; } img.dit { background-image:url('../../../d2l/img/lp/28.gif'); background-repeat: no-repeat; background-position: center center; } a.dil, a.dil:link, a.dil:visited, a.dil:hover { margin-right: 0.5em; text-decoration: none; } a.dlk_d, a.dlk_d:link, a.dlk_d:visited, a.dlk_d:hover { color: #999999; } .dlk_heading { display: inline-block; } .d2l-link-inline { display: inline; } .daylight div.d_ma { height: 0; overflow: hidden; } .daylight .d_ma_ve { margin: 10px; } .daylight .d_ma_ve.d2l-msg-container { border: 1px solid #CD2026; background-color: rgba(205, 32, 38, 0.05); padding: 40px; } .daylight .d2l-msg-container-inner > p.d_ma_vel { margin: 0; } .daylight .d_ma_vel { margin: 0; } .daylight .d_ma_ve_list { list-style-type: square; margin-top: 0; margin-bottom: 0; } [dir='rtl'] .daylight .d_ma_ve_list { padding-left: 0; } .d_ma_ve_list > li { margin: 0.5em 0; } .daylight .d_ma_ve_list > li > a { color: #006FBF; } .daylight .d_ma_ve_list > li > a :hover, .daylight .d_ma_ve_list > li > a :focus { color: #004489; } div.d_ma_s_c { position: fixed; width: 100%; text-align: center; bottom: -6em; z-index: 10000; } div.d_ma_s { background-color: #ffffff; border: 1px solid #999; position: relative; display: inline-block; box-shadow: 0 3px 5px rgba(50, 50, 50, 0.18); border-radius: 5px; max-width: 640px; } div.d_ma_s > div { padding: 20px 42px 20px 0; font-size: 1.3em; font-weight: normal; white-space: normal; width: -moz-calc(100%+20px); overflow: hidden; text-align: left; text-overflow: ellipsis; } [dir='rtl'] div.d_ma_s > div { padding: 20px 0 20px 42px; } div.d_ma_s > div > img { padding: 0 15px; height: 16px; width: 16px; } div.d_ma_s > img { float: right; right: 0; margin: 10px 12px; position: absolute; } [dir='rtl'] div.d_ma_s > img { float: left; right: auto; left: 0; } div.d_vb { cursor: default; } .daylight div.d_vb { position: relative; } div.d_ma_al { left: -999em; position: absolute; width: 1em; } [dir='rtl'] div.d_ma_al { left: auto; right: -999px; } [dir='rtl'] div.d_ma_ve.d2l-msg-container > .d2l-msg-container-inner { background-position: 99% 1em; } [dir='rtl'] div.d_ma_ve.d2l-msg-container .d2l-msg-container { padding-right: 0; margin-right: 1em; } .daylight span.dfl { font-weight: 300; white-space: nowrap; } span.dfl_s { font-size: 0.85em; display: block; } .daylight span.dfl_s { color: #494c4e; } .daylight tr.dcs_rd span.dfl_s { color: #cdd5dc; } .daylight span.dfl_b { font-weight: 700; } .daylight span.dfl a, .daylight span.dfl a:focus { text-decoration: none; color: #004489; } span.dfl a span { text-decoration: underline; } span.dfl img { padding-right: 0.3em; } span.dh_sd { color: #d3d3d3; } span.dh_sd a.d2l-popuphelp { color: #93c6ac !important; } td.dh_fg { text-align: left; width: 100% } [dir="rtl"] td.dh_fg { text-align: right; } .daylight b, .daylight strong { font-weight: 700; } i, em { font-style: italic; } u { text-decoration: underline; } .daylight .ds_a { color: #CD2026; } .daylight .ds_b { color: #494c4e; } .daylight .ds_c { color: #004489; } .ds_d { text-decoration: underline; } .daylight .ds_e, .daylight .ds_m, .daylight .ds_i { font-size: 0.95rem; font-weight: 400; } .daylight .ds_f { font-size: 1.5em; font-weight: 400; } .daylight .ds_g { font-size: .8rem; } .daylight .ds_h { font-size: .7rem; } .daylight .ds_i { font-weight: 400; text-decoration: none; } .daylight label .ds_i { color: #494c4e; } div.ddial_shim { background-image:url('../../../d2l/img/lp/10.gif'); background-repeat: no-repeat; background-position: 50% 50%; height: 100%; left: 0px; position: fixed; top: 0px; width: 100%; } div.ddial_shim_loading { background-image:url('../../../d2l/img/lp/Dialog/29.gif'); width: 100%; height: 100%; } ul.da_a { line-height: 1em; list-style-type: none; margin: 0; padding: 0; } li.da_ais { background-image:url('../../../d2l/img/lp/actions/30.gif'); background-position: right center; background-repeat: no-repeat; padding-right: 6px; } li.da_ai a, li.da_ai a:visited { border-radius: 3px; color: #333333; cursor: pointer; float: left; line-height: 1.231; margin-right: 0em; padding: 4px 8px; text-decoration: none; } li.da_ai span { background-repeat: no-repeat; display: block; min-height: 12px; padding: 2px 2px 3px 19px; } span.da_aisl { background-image:url('../../../d2l/img/lp/actions/30.gif'); background-position: left center; background-repeat: no-repeat; float: left; padding: 0px 0px 0px 6px !important; } li.da_aid a { color: #666666; } li.da_ai a:hover, li.da_ai a:focus { background: #fdfdfd; background: linear-gradient(to bottom, #fdfdfd 0%,#fafafa 100%); border: 1px solid #bbbbbb; padding: 3px 7px; outline: none; } li.da_aid a:hover, li.da_aid a:focus { background: #fdfdfd; background: linear-gradient(to bottom, #fdfdfd 0%,#f2f2f2 100%); border: 1px solid #cccccc; } li.da_ai img { padding: 2px 0 3px 0; } div.dmb { background: #f1f1f1; background: linear-gradient(to bottom, #f1f1f1 0%,#e4e4e4 100%); border: 1px solid #cccccc; padding: 2px; } ul.dinst_ul { margin-bottom:0px; margin-right:10px; margin-top:10px; margin-left:20px; padding-left:0px; list-style-image:url('../../../d2l/img/lp/instructions/31.gif'); } div.duload_add { padding-left: 1em; }.daylight .d2l-graphbars { display: -ms-flexbox; display: -webkit-flex; display: inline-flex; -ms-flex-wrap: nowrap; -webkit-flex-wrap: nowrap; flex-wrap: nowrap; border: 1px solid #cdd5dc; border-radius: 5px; padding: 4px; height: 100%; max-width: 380px; width: 70%; margin-right: 15px; box-sizing: border-box; align-items: center; } .daylight .d2l-graphbars div { border-radius: 4px; } div.dgraphbar2_container { width: 185px; text-align: center; margin: 0 auto; } div.dgraphbar2_bar { border-radius: 15px; background: #e7e7e7; border: 1px solid #cccccc; width: 185px; height: 8px; margin-bottom: 4px; background: linear-gradient(#dedede,#e7e7e7); } div.dgraphbar2_fill { border-radius: 15px; background: #fff; height: 100%; border-right: 1px solid #d9d9d9; } .d2l-editable-richedit .d2l-editable { background-color: white; border-color: #CCCCCC; padding-left: 5px; padding-right: 0; min-height: 75px; } .d2l-editable-richedit .d2l-editable:hover{ border-color: #999999; } .d2l-editable-richedit .d2l-editable-focus { border-color: #94ccda; box-shadow: 0 1px 1px 0px #f2f2f2 inset, 0 0 5px 0 #94ccda; outline-width: 0px; }fieldset.d2l-updownvote-input { margin: 0; padding: 0; border: 0px none; outline: 0px none; background: none repeat scroll 0% 0% transparent; }.d2l-invisible { display: inline-block; text-indent: -9999px; visibility: hidden; }.d2l-inline { display: inline-block; zoom: 1 !ie; display: inline !ie; vertical-align: middle; max-width: 100%; } .d2l-container-icon, .d2l-container-icon-inner { background-repeat: no-repeat; }.d2l-field-slim { margin-bottom: 0; } .d2l-fieldgroup-horizontal > div.d2l-field-slim { padding-bottom: 0; } .daylight .d2l-fieldgroup-horizontal { display: -webkit-flex; display: flex; -webkit-flex-direction: row; flex-direction: row; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-flex-wrap: wrap; flex-wrap: wrap; padding: 10px 0; } .daylight .d2l-fieldgroup-horizontal > div { padding-bottom: 10px; } .d2l-fieldgroup-horizontal > div { padding-right: 20px; } [dir="rtl"] .d2l-fieldgroup-horizontal > div { padding-right: 0; padding-left: 20px; } .d2l-fieldgroup > div, .d2l-fieldgroup-horizontal > div { clear: both; min-height: 13px; } .d2l-fieldgroup-horizontal > div > label { white-space: nowrap; } .d2l-fieldgroup > div > .d2l-fieldgroup-horizontal > div { padding-bottom: 0; }.d2l-image { vertical-align:middle; } .d2l-image-cls { line-height: 0; } .d2l-image-zoom-16 { transform: scale(1.125,1.125); } .d2l-imagelink { display: inline-block; } .daylight .d2l-imagelink { -webkit-align-items: center; -moz-align-items: center; align-items: center; border: 1px solid transparent; border-radius: 0.3rem; display: -webkit-inline-box; display: -webkit-inline-flex; display: -moz-inline-flex; display: -ms-inline-flexbox; display: inline-flex; height: 1.5rem; -webkit-justify-content: center; -moz-justify-content: center; justify-content: center; vertical-align: middle; width: 1.5rem; } .daylight .d2l-imagelink:hover, .daylight .d2l-imagelink:focus { border-color: #b5bdc2; } .d2l-imagelink-disabled { opacity: 0.5; cursor: default; } .d2l-imagelink-disabled:focus { outline: none !important; } .daylight .d2l-msg-container { border-radius: 8px; background-color: #f9fbff; border: 1px solid #e3e9f1; color: #494c4e; } .daylight .d2l-msg-container .d2l-msg-container-text { padding: 40px; } .daylight .d2l-msg-container .d2l-msg-container-inner { padding: 0; } .daylight .d2l-login-portal-login .d2l-msg-container .d2l-msg-container-text { padding: 20px; } .daylight .d2l-login-portal-login .d2l-msg-container .d2l-msg-container-text > p { margin: 0; } .d2l-msg-container-image { display: inline-block; margin-right: 8px; } .d2l-msg-container-none, .d2l-msg-container-none > .d2l-msg-container-inner { padding: 0; border: none; background-color: transparent; } .d2l-panel .d2l-msg-container { border: none; } .d2l-msg-container-normal { margin-bottom: 1em; } .d2l-msg-container-half { margin-bottom: 0.5em; }.d2l-partial-render-shim1 { position: absolute; z-index: 1002; background: white; opacity: 0.01; } .d2l-partial-render-shim2 { opacity: 0.5; } .d2l-partial-render-shimbg1 { position: absolute; z-index: 1003; } .d2l-partial-render-shimbg2, .d2l-dialog-loading, .d2l-actionsheet-loading { background-image:url('../../../d2l/img/lp/mobile/32.gif'); background-position: center center; background-repeat: no-repeat; } .d2l-partial-render-animation-vertical-slider-opener, .d2l-partial-render-animation-horizontal-slider-opener { position: relative; width: 0px; height: 0px; overflow: visible; } .d2l-partial-render-animation-vertical-slider-window, .d2l-partial-render-animation-horizontal-slider-window { background-color: #fafafa; overflow: hidden; position: absolute; z-index: 10004; } .d2l-partial-render-animation-horizontal-slider { position: relative; transition: left 0.4s cubic-bezier(0, 0.7, .50, 1); } .d2l-partial-render-animation-vertical-slider { position: relative; transition: top 0.4s cubic-bezier(0, 0.7, .50, 1); } .d2l-partial-render-animation-horizontal-slider-separator, .d2l-partial-render-animation-horizontal-slider-prev, .d2l-partial-render-animation-horizontal-slider-next { float: left; } .d2l-partial-render-animation-vertical-slider-separator, .d2l-partial-render-animation-vertical-slider-prev, .d2l-partial-render-animation-vertical-slider-next, .d2l-partial-render-animation-horizontal-slider-separator, .d2l-partial-render-animation-horizontal-slider-prev, .d2l-partial-render-animation-horizontal-slider-next { transition: opacity 0.4s linear; } .d2l-partial-render-animation-container { position: relative; } .d2l-partial-render-animation-container[change-image-loading], .d2l-partial-render-animation-container[change-image-success] { pointer-events: none; } .d2l-partial-render-animation-container d2l-loading-spinner { bottom: 0; display: none; left: 0; margin: auto; position: absolute; right: 0; top: 0; z-index: 4; } .d2l-partial-render-animation-container[change-image-loading] d2l-loading-spinner { display: flex; } .d2l-partial-render-animation-container[change-image-success] d2l-loading-spinner { display: flex; opacity: 0; } .d2l-partial-render-animation-checkmark-container { display: none; } .d2l-partial-render-animation-container[change-image-loading] .d2l-partial-render-animation-checkmark-container, .d2l-partial-render-animation-container[change-image-success] .d2l-partial-render-animation-checkmark-container { align-items: center; background-color: white; border-radius: 100px; border-style: none; bottom: 0; display: flex; justify-content: center; left: 0; margin: auto; overflow: hidden; position: absolute; right: 0; top: 0; z-index: 4; } .d2l-partial-render-animation-checkmark-container-small { height: 40px; width: 40px; } .d2l-partial-render-animation-checkmark-container-large { height: 80px; width: 80px; } .d2l-partial-render-animation-container .d2l-partial-render-animation-checkmark { color: #46a661; display: none; } .d2l-partial-render-animation-container[change-image-success] .d2l-partial-render-animation-checkmark { display: flex; } @keyframes inner-small { 0% { transform: scale(0.5); } 15% { transform: scale(0.9); } 20% { transform: scale(0.75); } 100% { transform: scale(0.75); } } @keyframes container-small { 0% { height: 40px; width: 40px; } 70% { height: 40px; width: 40px; opacity: 1; } 90% { height: 50px; width: 50px; opacity: 0.4 } 100% { height: 10px; width: 10px; opacity: 0; } } @keyframes inner-large { 0% { transform: scale(1); } 15% { transform: scale(1.8); } 20% { transform: scale(1.5); } 100% { transform: scale(1.5); } } @keyframes container-large { 0% { height: 80px; width: 80px; } 70% { height: 80px; width: 80px; opacity: 1; } 90% { height: 100px; width: 100px; opacity: 0.4 } 100% { height: 20px; width: 20px; opacity: 0; } } .d2l-partial-render-animation-container[change-image-success] .d2l-partial-render-animation-checkmark-container-small .d2l-partial-render-animation-checkmark { animation-name: inner-small; animation-duration: 1s; animation-fill-mode: forwards; } .d2l-partial-render-animation-container[change-image-success] .d2l-partial-render-animation-checkmark-container-small { animation-name: container-small; animation-duration: 1s; animation-fill-mode: forwards; } .d2l-partial-render-animation-container[change-image-success] .d2l-partial-render-animation-checkmark-container-large .d2l-partial-render-animation-checkmark { animation-name: inner-large; animation-duration: 1s; animation-fill-mode: forwards; } .d2l-partial-render-animation-container[change-image-success] .d2l-partial-render-animation-checkmark-container-large { animation-name: container-large; animation-duration: 1s; animation-fill-mode: forwards; } .d2l-partial-render-animation-overlay { background-color: rgba(0, 0, 0, 0.4); position: absolute; z-index: 3; } .d2l-icon-custom { display: inline-block; font-size: 0; line-height: 0; margin: 0; vertical-align: text-top; } .d2l-button > .d2l-icon-custom { margin-right: 0.5rem; } [dir='rtl'] .d2l-button > .d2l-icon-custom { margin-right: 0; margin-left: 0.5rem; } .d2l-button-text-hidden > .d2l-icon-custom { margin-right: 0; } [dir='rtl'] .d2l-button-text-hidden > .d2l-icon-custom { margin-left: 0; } [dir='rtl'] .vui-offscreen { left: 0; right: -10000px; } .d2l-colourselector-button { background-image: linear-gradient(-179deg, #F8F8F8 0%, #F2F2F2 100%); border: 1px solid #CCCCCC; border-radius: 3px; box-shadow: inset 0px 2px 0px 0px #FFFFFF; color: #4A4A4A; cursor: pointer; display: inline-block; line-height: 1.231; margin: 0.15em 0.3em 0.15em 0; padding: 5px 10px; text-align: center; vertical-align: middle; white-space: nowrap; } .d2l-colourselector-button, .d2l-colourselector-button:visited, .d2l-colourselector-button:link { outline: none; text-decoration: none; } .d2l-colourselector-button:hover, .d2l-colourselector-button:focus { background-image: linear-gradient(-179deg, #FDFDFD 0%, #FAFAFA 100%); border: 1px solid #AEAEAE; border-radius: 3px; box-shadow: inset 0px 2px 0px 0px #FFFFFF; color: #4A4A4A; } .d2l-button-nml, .d2l-button-nml.d2l-button-disabled:hover, .d2l-button-nml.d2l-button-disabled:focus { background: #f8f8f8; background: linear-gradient(to bottom, #f8f8f8 0%,#f2f2f2 100%); border-color: #cccccc; box-shadow: inset 0 1px 0 0 #ffffff; color: #000000; filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f8f8f8', endColorstr='#f2f2f2',GradientType=0 ); } .d2l-button-nml, .d2l-button-nml:visited, .d2l-button-nml:hover, .d2l-button-nml:focus, .d2l-button-nml:link { color: #000000; } .d2l-button-nml:hover, .d2l-button-nml:focus { background-image: linear-gradient(-179deg, #FDFDFD 0%, #FAFAFA 100%); border: 1px solid #AEAEAE; border-radius: 3px; box-shadow: inset 0px 2px 0px 0px #FFFFFF; color: #4A4A4A; } .daylight d2l-dropdown.d2l-button-menu-dropdown { margin: 0 0.75rem 0 0; } .daylight div.d2l-buttonmenu-content { display: flex; } .daylight span.d2l-buttonmenu-text { padding-right: calc(1.4rem - 18px); } .daylight d2l-button[primary] d2l-icon.d2l-buttonmenu-dropdown-icon { color: white; } .daylight d2l-dropdown.d2l-button-menu-notext .d2l-buttonmenu-old-icon { padding-right: 10px; } .daylight .d2l-buttonmenu-icon + .d2l-buttonmenu-text, .daylight .d2l-buttonmenu-icon + .d2l-offscreen + .d2l-buttonmenu-dropdown-icon { padding-left: 10px; } .daylight .d2l-button-menu-icon div.d2l-buttonmenu-content > span:not(.d2l-buttonmenu-text) { background-repeat: no-repeat; display: inline-block; min-height: 7px; } .daylight .d2l-button-menu-icon div.d2l-buttonmenu-content > span:not(.d2l-buttonmenu-text) > span.d2l-buttonmenu-text { padding-left: 28px; } .daylight d2l-dropdown.d2l-button-menu-notext:not(.d2l-button-menu-icon) d2l-icon.d2l-buttonmenu-dropdown-icon { width: 42px; } .d2l-button-menu-notext.d2l-button-menu > span { background-position: center; } .d2l-button-menu-notext.d2l-button-menu-icon.d2l-button-menu > span { background-position: right center; } .d2l-button-menu-icon > span > span { background-position: left center; background-repeat: no-repeat; padding-left: 22px; display: inline-block; } .daylight .d2l-button-menu-icon > span > span { padding-left: 28px; } .d2l-button-menu-notext.d2l-button-menu-icon > span > span { padding-left: 13px; } .daylight .d2l-button-menu-notext.d2l-button-menu-icon > span > span { padding-left: 0; }.d2l-calendar-mini { border-radius: 4px; } .d2l-calendar-mini-title { border-top-left-radius: 4px; border-top-right-radius: 4px; text-align: center; } .daylight .d2l-calendar-mini-title .d2l-heading-4 { margin: 0.25rem 0 1.25rem 0; } .daylight .d2l-calendar-mini-prevmonth, .daylight .d2l-calendar-mini-nextmonth { margin: 0 0.5rem 0 0.5rem; } .d2l-calendar-mini table { border-spacing: 0; width: 100%; table-layout: fixed; } .daylight .d2l-calendar-mini table { border-collapse: separate; } .daylight .d2l-calendar-mini th[role="columnheader"] { padding: 0.45rem 0; } .d2l-calendar-mini th > abbr { display: block; text-align: center; } .daylight .d2l-calendar-mini th > abbr { color: #6e7376; font-size: 0.8rem; font-weight: normal; text-decoration: none; } .d2l-calendar-mini-day { text-align: center; cursor: pointer; } .daylight .d2l-calendar-mini-day { border: 1px solid transparent; font-size: 0.8rem; padding: 0.45rem 0; position: relative; } .d2l-calendar-mini-day:hover, .d2l-calendar-mini-day:focus { outline: none; } .daylight .d2l-calendar-mini-day:hover, .daylight .d2l-calendar-mini-day:focus { color: #006FBF; } .daylight .d2l-calendar-mini-today { color: #006FBF; font-weight: 700; } .daylight .d2l-calendar-mini-selected { background-color: #006FBF; border-radius: 0.3rem; color: #FFFFFF; font-weight: 400; } .daylight .d2l-calendar-mini-selected:focus { color: #FFFFFF; border-color: #004489; box-shadow: 0 0 0 4px rgba(0, 111, 191, 0.3); } .daylight .d2l-calendar-mini-selected:hover { color: #FFFFFF; background-color: #004489; } .daylight .d2l-calendar-mini-event::after { background-color: #006FBF; border-radius: 3px; bottom: 5px; content: ''; display: inline-block; height: 6px; left: calc(50% - 3px); position: absolute; width: 6px; } .daylight .d2l-calendar-mini-selected.d2l-calendar-mini-event::after { background-color: #FFFFFF; } .daylight .d2l-calendar-mini-other { color: #6e7376; } .d2l-calendar-mini th > abbr { border:none; height:20px; font-weight: normal; } .d2l-calendar-mini td { height:20px; }.d2l-column-side .d2l-calendar-mini { border-color: #ffffff; } .d2l-column-side .d2l-calendar-mini-title { background-color: #F4F5ED; border-bottom-color: #ffffff; } .d2l-column-side .d2l-calendar-mini-title > .d2l-heading { color: #404040; }.d2l-checkbox-image-checkmark + label { cursor: default; display: inline-block; min-height: 16px; } .d2l-imagecheckbox-container { display: inline-block; padding: 2px 6px 3px 0; position: relative; vertical-align: middle; } [dir='rtl'] .d2l-imagecheckbox-container { padding-right: 0; padding-left: 6px; } .d2l-checkbox-image-checkmark { margin: 0 3px 0 0; vertical-align: middle; } [dir='rtl'] .d2l-checkbox-image-checkmark { margin-left: 3px; margin-right: 0; } .d2l-imagecheckbox-container label { padding-left: 2px; vertical-align: middle; } [dir='rtl'] .d2l-imagecheckbox-container label { padding-left: 0px; padding-right: 2px; } .d2l-checkbox-image-checkmark + label > .d2l-checkbox-image-placeholder { background-position: center center; background-repeat: no-repeat; min-width: 17px; min-height: 17px; margin-right: 3px; display: inline-block; vertical-align:middle; padding: 1px; } [dir='rtl'] .d2l-checkbox-image-checkmark + label > .d2l-checkbox-image-placeholder { margin-right: 0px; margin-left: 3px; } .d2l-checkbox-image-checkmark + label > .d2l-checkbox-image-placeholder { background-image:url('../../../d2l/img/lp/imageCheckbox/33.gif'); } .d2l-checkbox-image-checkmark:checked + label > .d2l-checkbox-image-placeholder { background-image:url('../../../d2l/img/lp/imageCheckbox/34.gif'); } .d2l-checkbox-image-checkmark:disabled:checked + label > .d2l-checkbox-image-placeholder { background-image:url('../../../d2l/img/lp/imageCheckbox/35.gif'); } .d2l-checkbox-image-checkmark:disabled + label > .d2l-checkbox-image-placeholder { background-image:url('../../../d2l/img/lp/imageCheckbox/36.gif'); } .d2l-checkbox-image-checkmark:checked:focus + label > .d2l-checkbox-image-placeholder, .d2l-checkbox-image-checkmark:checked:enabled + label:hover > .d2l-checkbox-image-placeholder { background-image:url('../../../d2l/img/lp/imageCheckbox/37.gif'); } .d2l-checkbox-image-checkmark:focus + label > .d2l-checkbox-image-placeholder, .d2l-checkbox-image-checkmark:enabled + label:hover > .d2l-checkbox-image-placeholder { background-image:url('../../../d2l/img/lp/imageCheckbox/38.gif'); } .d2l-collapsible-section-toggle { color: inherit; display: block; } .d2l-collapsible-section d2l-icon { margin: 0 0.6rem; transition: transform 400ms cubic-bezier(0, 0.7, 0.5, 1); } .d2l-collapsible-section-toggle[aria-expanded="true"] d2l-icon { transform: rotateZ(90deg); } .d2l-collapsible-section-toggle:hover, .d2l-collapsible-section-toggle:focus { background-color: #f6f6f6; color: inherit; text-decoration: none; } .d2l-collapsible-section-changed.d2l-collapsible-section-toggle[aria-expanded="false"], .d2l-collapsible-section-changed.d2l-collapsible-section-toggle[aria-expanded="false"]:hover, .d2l-collapsible-section-changed.d2l-collapsible-section-toggle[aria-expanded="false"]:focus { background-color: #e8f8ff; } .d2l-contextmenu-ondemand-ph { display: none; } d2l-menu-item.d2l-first-visible-item { border-top-left-radius: 0.4rem; border-top-right-radius: 0.4rem; } d2l-menu-item.d2l-last-visible-item { border-bottom-left-radius: 0.4rem; border-bottom-right-radius: 0.4rem; } d2l-dropdown.d2l-contextmenu-ph-dropdown { position: static; } .d2l-contextmenu-ph-dropdown d2l-dropdown-menu.d2l-dropdown-menu-contextmenu[opened] { display: block; } .d2l-contextmenu-ph-dropdown d2l-dropdown-menu.d2l-dropdown-menu-contextmenu { left: inherit; top: inherit; padding-top: 0.6rem; right: inherit; width: inherit; } .d2l-contextmenu-ph-dropdown d2l-dropdown-menu.d2l-dropdown-menu-contextmenu[opened-above] { bottom: inherit; margin-top: -2.9rem; padding-top: 0; } .d2l-contextmenu-ph { margin-left: 0.25rem; margin-right: 0.25rem; }.d2l-page-main-padding > .d2l-datalist-style1, .d2l-page-main-padding > .d2l-placeholder > .d2l-datalist-style1, .d2l-page-main-padding > form > .d2l-datalist-style1, .d2l-datalist-outdent { margin: 0 -10px; } .d2l-page-main-padding > .d2l-datalist-style1 > .d2l-datalist .d2l-datalist-item-content, .d2l-page-main-padding > .d2l-placeholder > .d2l-datalist-style1 > .d2l-datalist .d2l-datalist-item-content, .d2l-page-main-padding > form > .d2l-datalist-style1 > .d2l-datalist .d2l-datalist-item-content, .d2l-datalist-outdent > .d2l-datalist .d2l-datalist-item-content { padding-left: 10px; padding-right: 10px; } .d2l-page-main-padding > .d2l-datalist-style1 > .d2l-msg-container, .d2l-page-main-padding > .d2l-placeholder > .d2l-datalist-style1 > .d2l-msg-container, .d2l-page-main-padding > form > .d2l-datalist-style1 > .d2l-msg-container, .d2l-datalist-outdent > .d2l-msg-container { margin-left: 10px; margin-right: 10px; } .d2l-datalist-empty .d2l-msg-container-text { padding: 25px 30px; } .d2l-datalist.vui-list > .d2l-datalist-item { padding: 0; } .d2l-datalist-checkboxitem, .d2l-datalist-radioitem { zoom:1 !ie; } .d2l-datalist-item-placeholder { display:none; } .d2l-datalist-checkboxitem > div:first-child, .d2l-datalist-radioitem > div:first-child { float: left; padding: 0.75rem 0.1rem 0.1rem 0.5rem; } [dir='rtl'] .d2l-datalist-checkboxitem > div:first-child, [dir='rtl'] .d2l-datalist-radioitem > div:first-child { float: right; padding-right: 0.5rem; padding-left: 0.1rem; } .d2l-datalist-checkboxitem > .d2l-datalist-item-content, .d2l-datalist-radioitem > .d2l-datalist-item-content { display: block; margin-left: 52px; } .d2l-page-main-padding .d2l-datalist-checkboxitem > .d2l-datalist-item-content, .d2l-page-main-padding .d2l-datalist-radioitem > .d2l-datalist-item-content { margin-left: 42px; } [dir='rtl'] .d2l-datalist-checkboxitem > .d2l-datalist-item-content, [dir='rtl'] .d2l-datalist-radioitem > .d2l-datalist-item-content { margin-left: 0; margin-right: 52px; } [dir='rtl'] .d2l-page-main-padding .d2l-datalist-checkboxitem > .d2l-datalist-item-content, [dir='rtl'] .d2l-page-main-padding .d2l-datalist-radioitem > .d2l-datalist-item-content { margin-left: 0; margin-right: 42px; } .d2l-page-main-padding .d2l-datalist-radioitem-itemstyle > .d2l-datalist-item-content, .d2l-datalist-radioitem-itemstyle > .d2l-datalist-item-content { margin-left: 0; padding-left: 20px; } [dir='rtl'] .d2l-page-main-padding .d2l-datalist-radioitem-itemstyle > .d2l-datalist-item-content, [dir='rtl'] .d2l-datalist-radioitem-itemstyle > .d2l-datalist-item-content { margin-right: 0; padding-left: 0; padding-right: 20px; } .d2l-datalist-item-actionable > .d2l-datalist-item-content:hover { cursor:pointer; } .d2l-datalist-item-actioncontrol:hover, .d2l-datalist-item-actioncontrol:focus { text-decoration: none !important; } .d2l-checkbox-readonly-container { display: none; padding: 2px 6px 3px 0; position: relative; vertical-align: middle; } [dir='rtl'] .d2l-checkbox-readonly-container { padding-left: 6px; padding-right: 0; } .d2l-datalist-container.d2l-readonly .d2l-checkbox-readonly-container { display: inline-block; } .d2l-datalist-container.d2l-readonly .d2l-checkbox-container { display: none; } .d2l-datalist-style1 > .d2l-datalist .d2l-datalist-item-content { padding-top: 0.75rem; padding-bottom: 0.75rem; } .d2l-datalist-summary { border-top: 1px solid #cdd5dc; border-bottom: 1px solid #e3e9f1; padding-top: 0.75rem; padding-bottom: 0.75rem; } .d2l-datalist-style1 > .d2l-datalist { padding-bottom: 0.75rem; } .d2l-datalist-style1 > .d2l-datalist-no-padding { padding-bottom: 0; } .d2l-datalist-slim > .d2l-datalist .d2l-datalist-item-content { padding-top: 0; padding-bottom: 0; } .d2l-datalist-block > .d2l-datalist .d2l-datalist-item-content { padding-top: 1.5rem; padding-bottom: 1.5rem; } .d2l-datalist-block > .d2l-datalist > .d2l-datalist-item:first-child .d2l-datalist-item-content { padding-top: 0; } .d2l-datalist-block .d2l-datalist-item-content .d2l-htmlblock > p:last-child { margin-bottom: 0; } .d2l-datalist-item-content > div { zoom:1 !ie; } .d2l-datalist-empty-drop > .d2l-textblock { padding: 10px; } .d2l-datalist-item.d2l-datalist-item-hide-separators, .d2l-datalist-item.d2l-datalist-item-hide-separators + .d2l-datalist-item { border-top-color: transparent; } .d2l-datalist-item-highlight-transition > .d2l-datalist-item-content { transition: background-color 1.5s ease-in; } .d2l-datalist-item-highlight-transition { transition: background-color 1.5s ease-in; } .d2l-datalist-item-highlight-transition.vui-active > .d2l-datalist-item-content, .d2l-datalist-item-highlight-transition-color > .d2l-datalist-item-content { background-color: #E6EFF2 !important; } .d2l-datalist-item-highlight-transition.vui-active, .d2l-datalist-item-highlight-transition-color { background-color: #E6EFF2 !important; } .d2l-datalist-item-highlight-transition.vui-active.vui-selected > .d2l-datalist-item-content, .d2l-datalist-item-highlight-transition-color > .d2l-datalist-item-content { background-color: #d5dfe4 !important; } .d2l-datalist-item-highlight-transition.vui-active.vui-selected, .d2l-datalist-item-highlight-transition-color { background-color: #d5dfe4 !important; } .d2l-datetime-selector-date { display: inline-block; margin: 0.1em 0.3em 0.1em 0; white-space: nowrap; width: 100px; padding-right: 1em !ie; } .daylight .d2l-datetime-selector-date { width: 8rem; } .daylight .d2l-datetime-selector-date .d2l-calendar-mini { margin: 1.25rem 0.5rem 0.5rem 0.5rem; } .d2l-datetime-selector-date .d2l-datetime-selector-calendar-link { margin-left: -22px; zoom: 1 !ie; } .d2l-datetime-selector-date .d2l-datetime-selector-calendar-link > a { vertical-align: top; margin-top: 0.5em; } .d2l-datetime-selector { line-height: 1.5em; }.d2l-edit { margin-right: 6px; } [dir='rtl'] .d2l-edit { margin-right: 0; margin-left: 6px; } .d2l-edit ~ .vui-validation-bubble { display: none; } .d2l-edit:focus ~ .vui-validation-bubble { display: block; } .d2l-editable { border-radius: 3px; border: 1px solid transparent; background-position: center right; background-repeat: no-repeat; cursor: pointer; overflow: hidden; white-space: normal; max-width: 100%; } .daylight .d2l-editable-changed, .daylight .d2l-editable.d2l-editable-changed:hover, .daylight .d2l-editable-focus.d2l-editable-changed, .daylight .d2l-editable-focus { background-color: #f9fbff; } .daylight .d2l-editable:hover { background-color: #f1f5fb; } .d2l-editable-padding { min-height: 1em; } .d2l-editable-inline { display: inline-block; } .daylight .d2l-editable-placeholder { background-color: #f9fbff; border: 1px solid #cdd5dc; color: #494c4e; padding: 5px; } .daylight .d2l-editable-focus { border-radius: 0.3rem; box-shadow: 0 0 0 2px #006fbf; } .d2l-editable, .d2l-editable:hover, .d2l-editable-focus { transition: background-color .2s ease-in; } .d2l-editable-changed { transition: background-color 1.5s ease-in; } .d2l-editable-target > .d2l-edit, .d2l-editable-target > .d2l-longedit { margin: 0; } .d2l-editable-large { font-size: 1.7em; } .d2l-editable-url { float: left; padding-right: 5px; } .d2l-emoticon-selector-emoticon { display: inline-block; height: 40px; width: 40px; } .d2l-emoticon-selector-emoticon-a { display: inline-block; height: 40px; width: 40px; } .d2l-emoticon-selector-emoticon-img { display: block; height: 30px; margin: 5px auto; } .d2l-emoticon-selector-emoticon-active { background-color: #D3E7FA; }.d2l-field-beside { display: table; } .d2l-field-beside .d2l-field { float: left; color: #666666; display: table-cell; font-size: 14px; text-transform: capitalize; padding-right: 15px; } [dir="rtl"] .d2l-field-beside .d2l-field { float: right; } .d2l-field-beside .d2l-field-content { display: table-cell; vertical-align: top; width: 100%; } .d2l-field-beside-label { vertical-align: top; padding: 0px; padding-right: 10px; min-width: 50px; max-width: 210px; overflow: hidden; text-overflow: ellipsis; word-wrap: break-word; } [dir="rtl"] .d2l-field-beside-label { padding-left: 10px; } .d2l-field-beside-label > label, .d2l-field-beside-label > span { white-space: pre; word-wrap:break-word; text-overflow: ellipsis; } .d2l-field-beside-content { width: 100%; vertical-align: top; } .d2l-fieldgroup-right .d2l-field { text-align: right; } [dir="rtl"] .d2l-fieldgroup-right .d2l-field { text-align: left; }.d2l-fieldgroup-horizontal { padding: 0; } .d2l-fieldgroup-horizontal .d2l-invisible { display: block; margin-bottom: 9px; }.d2l-fileinput { border: 2px dashed transparent; border-radius: 0.3rem; box-sizing: border-box; padding-right: 18px; margin-right: 6px; } [dir="rtl"] .d2l-fileinput { margin-left: 6px; margin-right: 0px; padding-left: 18px; padding-right: 0px; } .d2l-fileinput-add { border: 2px dashed #cdd5dc; background-color: #ffffff; margin: 0 6px 10px 0px; padding: 1rem; } [dir="rtl"] .d2l-fileinput-add { margin: 0 0px 10px 6px; } .d2l-fileinput-drop-msg, .d2l-fileinput-errors { padding-bottom: 5px; } .d2l-fileinput-drop-msg { display: none; color: #6e7376; } .d2l-fileinput-input { display: none; visibility: hidden; } .d2l-fileinput-errors { color: #CD2026; } .d2l-fileinput-add > .d2l-fileinput-drop-msg { display: block; } .d2l-filedrop-add.d2l-filedrop-drag > .d2l-fileinput-drop-msg { color: #6e7376; } .d2l-fileinput-addbuttons { display: none; } .d2l-fileinput-add > .d2l-fileinput-addbuttons { display: block; } .d2l-fileinput-addbuttons > .d2l-button, .d2l-fileinput-addbuttons > .d2l-button-menu { margin-bottom: 0.75rem; vertical-align: baseline; } .d2l-fileinput-addbuttons > .d2l-button-menu-dropdown { margin-bottom: 0.75rem; } .d2l-fileinput-upload-progress { margin-top: 15px; width: 275px; } .d2l-fileinput-upload-progress-bar > .d2l-imagelink { margin-top: 0.4em; margin-left: -20px; position: relative; z-index: 2; } [dir="rtl"] .d2l-fileinput-upload-progress-bar > .d2l-imagelink { margin-left: 0; margin-right: -20px; } .d2l-fileinput-upload-progress-bar { border: 1px solid #cdd5dc; border-radius: 2px; position: relative; } .d2l-fileinput-upload-progress-bar-text { color: #46A661; padding:1px 4px 1px 4px; display: inline-block; float: left; overflow:hidden; white-space:nowrap; width: 240px; text-overflow: ellipsis; position: relative; z-index: 2; } .d2l-fileinput-upload-progress-bar-inner { background-color: #e7ffe3; color: #46A661; padding:1px 4px 1px 4px; display: inline-block; float: left; overflow:visible; white-space:nowrap; width: 0px; z-index: 1; position: absolute; left: 0; height: 91%; } [dir="rtl"] .d2l-fileinput-upload-progress-bar-inner { float: right; } .d2l-fileinput-placeholder { display: none; } .d2l-fileinput-filelist { margin: 0; padding: 0; } .d2l-fileinput-filelist > li { list-style: none; margin-top: 5px; } .d2l-fileinput-filelist > li, .d2l-fileinput-filelist > li.include-warning > .input-file-info { align-items: center; display: flex; } .d2l-fileinput-filelist > li.include-warning { flex-wrap: wrap; } .d2l-fileinput-filelist > li.include-warning > .input-file-warning { width: 100% } .d2l-fileinput-filelist > li > .d2l-image, .d2l-fileinput-filelist > li.include-warning > .input-file-info > .d2l-image { flex: none; } .d2l-fileinput-filelist > li > span, .d2l-fileinput-filelist > li.include-warning > .input-file-info > span { flex: none; margin-right: 4px; } [dir="rtl"] .d2l-fileinput-filelist > li > span, [dir="rtl"] .d2l-fileinput-filelist > li.include-warning > .input-file-info > span { margin-right: 0; margin-left: 4px; } .d2l-fileinput-filelist > li > .d2l-imagelink .d2l-fileinput-filelist > li.include-warning > .input-file-info > .d2l-imagelink { flex: none; } .d2l-fileinput-filelist > li > .d2l-link, .d2l-fileinput-filelist > li.include-warning > .input-file-info > .d2l-link { flex: none; margin-right: 5px; margin-left: 5px; max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.2em; } .d2l-flash-message-container { position: fixed; right: 50%; opacity: 0; visibility: hidden; min-height: 20px; transition: opacity 2s ease-in, visibility 2s ease-in; } .d2l-flash-message { background-repeat: no-repeat; background-position: 15px 20px; color: #494c4e; width: 95%; font-size: 1.3em; font-weight: normal; text-align: left; padding: 20px 0 20px 42px; margin-top: 0px; margin-right: 42px; white-space: normal; } .d2l-flash-message-text { text-overflow: ellipsis; overflow: hidden; } .d2l-flash-message-noicon { padding-left: 15px; } .d2l-flash-message-show { opacity: 1; visibility: visible; transition: opacity 0.3s ease-in, visibility 0.3s ease-in; } .d2l-floating-container { display: inline-block; position: absolute; } .d2l-floating-container-close { background-image:url('../../../d2l/img/lp/dialog/39.png'); background-repeat: no-repeat; width: 16px; height: 16px; float: right; display: inline-block; } .d2l-floating-container-titlebar { zoom: 1 !ie; } .d2l-floating-container-titlebar .d2l-heading { float: left; } [dir='rtl'] .d2l-floating-container-close { float: left; } [dir='rtl'] .d2l-floating-container-titlebar .d2l-heading { float: right; } .daylight .d2l-heading.vui-heading-1 ~ .d2l-contextmenu-ph { margin-top: calc((3rem - 30px) / 2); } .daylight .d2l-heading.vui-heading-2 ~ .d2l-contextmenu-ph { margin-top: calc((2.25rem - 30px) / 2); } .daylight .d2l-heading.vui-heading-3 ~ .d2l-contextmenu-ph, .daylight .d2l-heading.vui-heading-4 ~ .d2l-contextmenu-ph { margin-top: calc((1.5rem - 30px) / 2); } .daylight .d2l-heading.bsi-set-solid ~ .d2l-contextmenu-ph { line-height: normal; margin-top: 0; margin-bottom: 0; }.d2l-htmlblock { word-wrap: break-word; } .d2l-htmleditor-texteditor { box-sizing: border-box; padding: 3px; } .d2l-htmleditor-texteditor > .d2l-htmleditor-textarea { padding: 0; border-style: none; width: 100%; resize: none; } .d2l-htmleditor-noeditor { border-style: none; } d2l-dropdown.d2l-htmleditor-menuflyout.d2l-menuflyout-dropdown .d2l-menuflyout-subtle-opener, d2l-dropdown.d2l-htmleditor-menuflyout.d2l-menuflyout-dropdown .d2l-menuflyout-subtle-opener:hover, d2l-dropdown.d2l-htmleditor-menuflyout.d2l-menuflyout-dropdown .d2l-menuflyout-subtle-opener:focus { height: 2rem; overflow: hidden; padding: 0; } d2l-dropdown.d2l-htmleditor-menuflyout.d2l-menuflyout-dropdown .d2l-menuflyout-subtle-opener d2l-icon { color: #494c4e; } d2l-dropdown.d2l-htmleditor-menuflyout.d2l-menuflyout-dropdown .d2l-menuflyout-subtle-opener:hover, d2l-dropdown.d2l-htmleditor-menuflyout.d2l-menuflyout-dropdown .d2l-menuflyout-subtle-opener:focus, d2l-dropdown.d2l-htmleditor-menuflyout.d2l-menuflyout-dropdown .d2l-menuflyout-subtle-opener[active]{ background-color: #e3e9f1; }.d2l-htmleditor-split-button { cursor: pointer; display: inline-block; float: left; line-height: 1px; padding: 0.45em; border: 0; } [dir="rtl"] .d2l-htmleditor-split-button { float: right; } .d2l-htmleditor-split-button-active { background-color: #E8F2FC; } .d2l-htmleditor-split-button-disabled { opacity: 0.5; cursor: default; } .d2l-htmleditor-split-button:hover, .d2l-htmleditor-split-button:focus { background-color: #FFF; } .d2l-htmleditor-footer .d2l-htmleditor-split-button { border-top: 1px solid transparent; border-bottom: 1px solid transparent; border: 1px solid transparent; border-radius: 3px; } .d2l-htmleditor-footer .d2l-htmleditor-split-button:hover, .d2l-htmleditor-footer .d2l-htmleditor-split-button:focus { border-color: #DFDFDF; } .d2l-htmleditor-footer .d2l-htmleditor-toolbar-item:first-child .d2l-htmleditor-split-button:hover, .d2l-htmleditor-footer .d2l-htmleditor-toolbar-item:first-child .d2l-htmleditor-split-button:focus { border-color: #DFDFDF; } .d2l-htmleditor-footer .d2l-htmleditor-toolbar-item:last-child .d2l-htmleditor-split-button:hover, .d2l-htmleditor-footer .d2l-htmleditor-toolbar-item:last-child .d2l-htmleditor-split-button:focus { border-color: #DFDFDF; } .d2l-htmleditor-split-button.d2l-htmleditor-split-button-disabled:hover, .d2l-htmleditor-split-button.d2l-htmleditor-split-button-disabled:focus { background: transparent; } .d2l-htmleditor-code-wrap { padding: 4px 0 8px 5px; } [dir="rtl"] .d2l-htmleditor-code-wrap { padding-left: 0; padding-right: 5px; } .d2l-htmleditor-dialog-textarea.d2l-longedit { height: 200px; }.d2l-htmleditor-fullscreen { position: fixed; left: 0; top: 0; z-index: 1001; } .d2l-htmleditor-symbol { margin-right: 9em; } [dir="rtl"] .d2l-htmleditor-symbol { margin-left: 9em; margin-right: 0; } .d2l-htmleditor-symbol-preview-container { float: right; } [dir="rtl"] .d2l-htmleditor-symbol-preview-container { float: left; } .d2l-htmleditor-symbol-preview { margin-right: -9em; margin-bottom: 10px; } [dir="rtl"] .d2l-htmleditor-symbol-preview { margin-left: -9em; margin-right: 0; } .d2l-htmleditor-symbol-symbol { border: 1px solid #D4D4D4; background-color: #FFF; height: 9em; text-align: center; } .d2l-htmleditor-symbol-symbol-text { font-size: 3em; line-height: 3em; } .d2l-htmleditor-symbol-edit { margin: 0; width: 9em; text-align: center; margin-top: 4px; } .d2l-htmleditor-symbol-htmlcode-text { padding: 0.5em; margin-top: 4px; line-height: 1.4em; text-align: center; border: 1px solid #D4D4D4; border-radius: 3px; } .d2l-htmleditor-symbol-list { font-size: 1.2em; margin: 0; padding: 0; list-style: none outside none; color: #494c4e; } .d2l-htmleditor-symbol-char-item { text-align: center; display: inline-block; margin-bottom: 3px; } .d2l-htmleditor-symbol-char { cursor: pointer; border: 1px solid #CCC; border-radius: 3px; display: inline-block; padding: 0.2em 0; width: 1.6em; color: #494c4e; background-color: #EEE; } .d2l-htmleditor-symbol-char:hover, .d2l-htmleditor-symbol-char:focus { background-color: #FFF; } .d2l-htmleditor-symbol-char-selected { background-color: #E8F2FC; } .d2l-htmleditor-symbol-char-selected.d2l-htmleditor-symbol-char:hover, .d2l-htmleditor-symbol-char-selected.d2l-htmleditor-symbol-char:focus { background-color: #D3E7FA; } .d2l-htmleditor-symbol-symbol-invalid { background-color: transparent; } .d2l-table-builder { padding: 2px; } .d2l-table-builder-row { line-height: 0; margin-bottom: 2px; width: 318px; } .d2l-table-builder-row:last-child { margin-bottom: 0; } .d2l-table-builder-size { background: transparent; border: solid 1px #cccccc; height: 28px; width: 28px; display: inline-block; margin-right: 2px; } .d2l-table-builder-size:last-child { margin-right: 0; } .d2l-table-builder-size:hover { cursor: pointer; } .d2l-table-builder-size-included { background-color: #E8F2FC; } .d2l-table-builder-size-active { background-color: #D3E7FA; } .d2l-table-builder-cols-by-rows { text-align: center; }d2l-navigation-immersive div[class="d2l-navigation-link-back-responsive"] { display: none; } d2l-navigation-immersive div[slot="left"] { margin: 0 0 0 -0.5rem; } d2l-navigation-immersive div[class="d2l-navigation-immersive-left"] { padding-left: 0; } d2l-navigation-immersive div[slot="middle"] { white-space: nowrap; overflow: hidden; display: flex; align-items: center; } d2l-navigation-immersive div[slot="middle"] > p { margin: 0; line-height: 100%; overflow: hidden; text-overflow: ellipsis; } d2l-navigation-iterator { margin: 0 -1.85rem 0 -1.2rem; width: 20rem; } @media (max-width: 929px) { d2l-navigation-immersive div[class="d2l-navigation-iterator-middle"] { margin: 0 1.2rem; } d2l-navigation-iterator { width: 14rem; } } @media (max-width: 767px) { d2l-navigation-immersive div[slot="left"] { margin: 0 0 0 -0.2rem; } d2l-navigation-immersive div[class="d2l-navigation-iterator-middle"] { margin: 0 0.9rem; } d2l-navigation-iterator { margin: 0 -1.5rem 0 -1.2rem; width: 12rem; } } @media (max-width: 615px) { d2l-navigation-immersive div[slot="left"] { margin: 0 0 0 -0.5rem; } d2l-navigation-immersive div[class="d2l-navigation-link-back-responsive"] { display: block; } d2l-navigation-immersive div[class="d2l-navigation-link-back-default"] { display: none; } d2l-navigation-immersive div[class="d2l-navigation-iterator-middle"] { display: none; margin: 0 0.9rem; } d2l-navigation-iterator { margin: 0 -1.85rem 0 -1.2rem; width: 7rem; } }.d2l-iterator { display: inline-block; vertical-align: middle; white-space: nowrap; } .d2l-iterator-button { border-width: 1px; border-style: solid; border-radius: 0.3rem; box-sizing: border-box; display: inline-block; font-family: inherit; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02rem; line-height: 1rem; margin: 0; min-height: -webkit-calc(2rem + 2px); min-height: calc(2rem + 2px); outline: none; padding: 0.5rem 1.5rem; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; text-decoration: none; user-select: none; vertical-align: middle; white-space: nowrap; width: auto; } .d2l-iterator-button, .d2l-iterator-button.d2l-iterator-button-disabled:hover, .d2l-iterator-button.d2l-iterator-button-disabled:focus { background-color: #f1f5fb; border-color: #cdd5dc; color: #494c4e; } .d2l-iterator-button.d2l-iterator-button-notext { padding-left: 0.5rem; padding-right: 0.5rem; } [dir="rtl"].d2l-iterator-button.d2l-iterator-button-prev, .d2l-iterator-button.d2l-iterator-button-next { border-radius: 0.3rem; border-top-left-radius: 0; border-bottom-left-radius: 0; } [dir="rtl"].d2l-iterator-button.d2l-iterator-button-next, .d2l-iterator-button.d2l-iterator-button-prev { border-radius: 0.3rem; border-top-right-radius: 0; border-bottom-right-radius: 0; } .d2l-iterator-button:hover, .d2l-iterator-button:focus { border-color: #006fbf; } .d2l-iterator-button.d2l-iterator-button-selected { background-color: #6e7376; border-color: #cdd5dc; color: #ffffff; } .d2l-iterator-button.d2l-iterator-button-selected d2l-icon { color: #ffffff; } .d2l-iterator-button.d2l-iterator-button-disabled { opacity: 0.5; cursor: default; } .d2l-iterator-button-next > .d2l-image { margin-left: 0.5rem; } [dir="rtl"] .d2l-iterator-button-next > .d2l-image { margin-left: 0; margin-right: 0.5rem; } .d2l-iterator-button-prev > .d2l-image { margin-right: 0.5rem; } [dir="rtl"] .d2l-iterator-button-prev > .d2l-image { margin-left: 0.5rem; margin-right: 0; } .d2l-iterator-button.d2l-iterator-button-notext > .d2l-image { margin: 0; } .d2l-box-layout { width: 100%; display: table; } .d2l-box-v { display: block; } .d2l-box-h { display: table-cell; } .d2l-list > li { list-style: none; } .d2l-list { margin: 0; padding: 0; } .d2l-list-disc > li { list-style: disc; margin-left: 40px; } .d2l-list-circle > li { list-style: circle; margin-left: 40px; } .d2l-list-square > li { list-style: square; margin-left: 40px; } .d2l-loadmore-pager { display: block; font-weight: normal !important; }.d2l-menuflyout-handle-additional-icon { padding-right: 10px; } [dir='rtl'] .d2l-menuflyout-handle-additional-icon { padding-left: 10px; padding-right: 0; } .d2l-menuflyout-custom-content { line-height: 1.4rem; } .d2l-menuflyout-handle-content { align-items: center; color: #006fbf; display: flex; } .d2l-menuflyout-handle-content d2l-icon { color: #006fbf; } .d2l-menuflyout-handle-text { padding-right: calc(1.4rem - 18px); } [dir='rtl'] .d2l-menuflyout-handle-text { padding-left: calc(1.4rem - 18px); padding-right: 0; } .d2l-menuflyout-arrow { display: inline-block; margin-right: 3px; vertical-align: middle; } [dir='rtl'] .d2l-menuflyout-arrow { margin-left: 3px; margin-right: 0; } .d2l-menuflyout .d2l-menuflyout-opener { display: block; padding: 1px 0px 1px 2px; z-index: 100; } .daylight .d2l-menuflyout-dark .d2l-menuflyout-opener:hover, .daylight .d2l-menuflyout-dark .d2l-menuflyout-opener:focus, .daylight .d2l-menuflyout-dark .d2l-menuflyout-link-hover:hover, .daylight .d2l-menuflyout-dark.d2l-menuflyout-link-focus .d2l-menuflyout-link-hover { background-color: #FFFFFF; } .d2l-menuflyout-light .d2l-menuflyout-opener:hover, .d2l-menuflyout-light .d2l-menuflyout-opener:focus, .d2l-menuflyout-light .d2l-menuflyout-link-hover:hover, .d2l-menuflyout-light.d2l-menuflyout-link-focus .d2l-menuflyout-link-hover { background-color: rgba( 255, 255, 255, 0.2 ); border-color: #ffffff; border-color: rgba( 255, 255, 255, 0.7 ); } .d2l-menuflyout-text { display: inline-block; padding: 3px 5px 3px 1px; vertical-align: middle; white-space: nowrap; } [dir='rtl'] .d2l-menuflyout-text { padding-left: 5px; padding-right: 1px; } .d2l-menuflyout-dark .d2l-menuflyout-text, .d2l-menuflyout-dark .d2l-menuflyout-link-link, .d2l-menuflyout-dark .d2l-menuflyout-link-link:link, .d2l-menuflyout-dark .d2l-menuflyout-link-link:hover, .d2l-menuflyout-dark .d2l-menuflyout-link-link:visited { color: #494c4e; } .daylight .d2l-menuflyout-dark .d2l-menuflyout-text:focus, .daylight .d2l-menuflyout-dark .d2l-menuflyout-text:hover { color: #004489; } .d2l-menuflyout-light .d2l-menuflyout-text, .d2l-menuflyout-light .d2l-menuflyout-link-link, .d2l-menuflyout-light .d2l-menuflyout-link-link:link, .d2l-menuflyout-light .d2l-menuflyout-link-link:hover, .d2l-menuflyout-light .d2l-menuflyout-link-link:visited { color: #ffffff; color: rgba( 255, 255, 255, 0.9 ); } .d2l-menuflyout-spacer { display: inline-block; padding: 3px 0; margin-left: -1px; vertical-align: middle; width: 1px; } [dir='rtl'] .d2l-menuflyout-spacer { margin-left: 0; margin-right: -1px; } .d2l-menuflyout .d2l-menuflyout-opener, .d2l-menuflyout .d2l-menuflyout-opener:link, .d2l-menuflyout .d2l-menuflyout-opener:visited, .d2l-menuflyout .d2l-menuflyout-opener:hover, .d2l-menuflyout .d2l-menuflyout-opener:focus { text-decoration: none; } .d2l-menuflyout-opener:focus { outline: none; } .d2l-menuflyout-link-link, .d2l-menuflyout-link-link:link, .d2l-menuflyout-link-link:visited { text-decoration: none; outline: none; } .d2l-menuflyout-link-link:hover, .d2l-menuflyout-link-link:focus { text-decoration: underline; }.d2l-partial-render-shim { background-color: #ffffff; } .d2l-loading { text-align: center; }.d2l-searchclear { } .d2l-select-container { display: inline-block; margin-right: 6px; } [dir='rtl'] .d2l-select-container { margin-right: 0; margin-left: 6px; } .d2l-select-container .select-hide-validation ~ .vui-validation-bubble { display: none; } .d2l-shim { left: 0; top: 0; width: 100%; z-index: 1000; } .d2l-textblock { word-wrap: break-word; margin-bottom: 0; } .daylight .d2l-textblock-secondary { color: #494c4e; } .daylight .d2l-two-columns-side .d2l-textblock-secondary { font-size: 0.8rem; color: #494c4e; } .daylight .d2l-textblock-strong { font-weight: 700; } .d2l-textblock-disabled { color: #a0a0a0; } .daylight .d2l-textblock:focus { outline: 2px solid #e8f8ff; margin-left: 2px; } .d2l-textblock-line-through { text-decoration: line-through; }.d2l-time-selector { display: inline-block; display: inline !ie; margin: 0.1em 0.3em 0.1em 0; vertical-align: top; white-space: nowrap; width: 100px; zoom: 1 !ie; } .d2l-time-selector .d2l-edit { width: auto !ie; } .daylight .d2l-time-selector { width: 8rem; } .d2l-time-selector-tz { color: #888888; font-style: italic; padding-top: 0.1em; } ul.d2l-time-selector-list { cursor: default; list-style: none outside none; text-align: left; } ul.d2l-time-selector-list > li { white-space: nowrap; padding: 0.2em 0.4em; } ul.d2l-time-selector-list > li:hover { background-color: #e0eefd; } ul.d2l-time-selector-list > li.d2l-time-selector-listitem-selected { background-color: #3399ff; color: #ffffff; } .d2l-time-selector-list { padding:0px; margin:0px; }.d2l-imagelink { background-repeat: no-repeat; }.d2l-updownvote-readonly { min-width: 48px; } .d2l-updownvote-readonly.d2l-updownvote-both { overflow: hidden; width: 48px; } .d2l-updownvote-readonly .d2l-updownvote-up, .d2l-updownvote-readonly .d2l-updownvote-down { background-image:url('../../../d2l/img/lp/upDownVote/40.png'); background-position: 0 0; background-repeat: no-repeat; height: 24px; margin-left: 12px; } .d2l-updownvote-readonly .d2l-updownvote-down { background-position: 0 -24px; } .d2l-updownvote-readonly.d2l-updownvote-uponly .d2l-updownvote-up { float: left; width: 24px; } .daylight .d2l-updownvote-readonly.d2l-updownvote-uponly { width: 48px; } .d2l-updownvote-readonly .d2l-updownvote-votes { text-align: center; } .d2l-updownvote-readonly.d2l-updownvote-uponly .d2l-updownvote-votes { padding-top: 2px; } .daylight .d2l-updownvote-readonly.d2l-updownvote-uponly .d2l-updownvote-votes { display: block; padding-left: 2px; } .d2l-updownvote-readonly .d2l-updownvote-votes > span { color: #666; font-size: 1.1em; font-weight: bold; text-align: center; }.d2l-updownvote-input { width: 48px; min-width: 48px; } .d2l-updownvote-input > legend { height: 1px; text-indent: -999em; } .d2l-updownvote-input .d2l-updownvote-none { display: inline-block; height: 1px; left: -999em; position: absolute; } .d2l-updownvote-input .d2l-updownvote-up, .d2l-updownvote-input .d2l-updownvote-down { cursor: pointer; display: block; height: 24px; overflow: hidden; position: relative; text-indent: -999em; } .d2l-updownvote-input .d2l-updownvote-up > img, .d2l-updownvote-input .d2l-updownvote-down > img { background-image:url('../../../d2l/img/lp/upDownVote/41.png'); background-position: 0 0; background-repeat: no-repeat; height: 24px; left: 12px; position: absolute; top: 0; width: 24px; } .d2l-updownvote-input .d2l-updownvote-up:hover > img { background-position: 0 -24px; } .d2l-updownvote-input .d2l-updownvote-up.d2l-updownvote-active > img { background-position: 0 -48px; } .d2l-updownvote-input .d2l-updownvote-up.d2l-updownvote-active:hover > img { background-position: 0 -72px; } .d2l-updownvote-input .d2l-updownvote-down > img { background-position: -24px 0; } .d2l-updownvote-input .d2l-updownvote-down:hover > img { background-position: -24px -24px; } .d2l-updownvote-input .d2l-updownvote-down.d2l-updownvote-active > img { background-position: -24px -48px; } .d2l-updownvote-input .d2l-updownvote-down.d2l-updownvote-active:hover > img { background-position: -24px -72px; } .d2l-updownvote-input .d2l-updownvote-votes { text-align: center; } .d2l-updownvote-input .d2l-updownvote-votes > span { color: #666; font-size: 1.1em; font-weight: bold; text-align: center; } .d2l-updownvote-input.d2l-updownvote-uponly { width: 100%; } .d2l-updownvote-input.d2l-updownvote-uponly .d2l-updownvote-up { display: inline-block; margin-right: 12px; overflow: visible; width: 24px; } .daylight .d2l-updownvote-input.d2l-updownvote-uponly .d2l-updownvote-votes { display: block; padding-left: 2px; }.d2l-updownvoteprint-uponly { float: left; margin-left: 12px; } .d2l-updownvoteprint-both { display: block; margin-left: 12px; } .d2l-updownvote-readonly.d2l-updownvote-uponly .d2l-updownvoteprint-votes { padding: 3px 0 0 4px; } [dir='RTL'] .d2l-updownvoteprint-uponly { float: right; margin-left: 0; margin-right: 12px; } [dir='RTL'] .d2l-updownvoteprint-both { margin-left: 0; margin-right: 12px; } [dir='RTL'] .d2l-updownvote-readonly.d2l-updownvote-uponly .d2l-updownvoteprint-votes { padding: 3px 4px 0 0; } .d2l-dialog-inline-body { background-position: 0 1em; background-repeat: no-repeat; box-sizing: border-box; display: block; min-height: 4em; overflow: auto; } [dir='rtl'] .d2l-dialog-inline-body { background-position: 100% 1rem; } .d2l-dialog-mvc.d2l-dialog-inline, .d2l-dialog-inline { height: auto; } .d2l-dialog-inline > .d2l-dialog-inner { max-height: inherit; } .d2l-dialog-inline-body > p { margin: 0; } .d2l-dialog-inline-body-icon { padding-bottom: 1rem; padding-right: 0; padding-top: 1rem; } .d2l-dialog-inline-body-noicon { padding-top: 1rem; } .d2l-dialog-inline-body-nopadding { padding-top: 0; } .d2l-dialog-inline-body-alert, .d2l-dialog-inline-body-info, .d2l-dialog-inline-body-warning { padding-left: 66px; } [dir='rtl'] .d2l-dialog-inline-body-alert, [dir='rtl'] .d2l-dialog-inline-body-info, [dir='rtl'] .d2l-dialog-inline-body-warning { padding-right: 66px; padding-left: 0; } .d2l-dialog-inline-body-alert { background-image:url('../../../d2l/img/lp/dialog/42.png'); } .d2l-dialog-inline-body-info { background-image:url('../../../d2l/img/lp/dialog/43.png'); } .d2l-dialog-inline-body-warning { background-image:url('../../../d2l/img/lp/dialog/44.gif'); } .d2l-dialog-inline-primary-message { font-weight: bold; }.d2l-page-actions { margin-left: 10px; margin-right: 1.2rem; white-space: nowrap; } [dir='rtl'] .d2l-page-actions { margin-right: 10px; margin-left: 1.2rem; } .d2l-button-subtle-group { display: inline-block; line-height: 0; margin-right: -1.2rem; } .d2l-page-actions d2l-button-subtle { margin-right: 0.25rem; } [dir='rtl'] .d2l-page-actions d2l-button-subtle { margin-left: 0.25rem; margin-right: 0; } @media(min-width:544px) { .daylight d2l-dropdown.page-action-group { display: none; } } @media(max-width: 544px) { .daylight .d2l-page-actions-responsive { display: none; } .daylight d2l-dropdown.page-action-group { display: inline-block; margin-left: 30px; } [dir='rtl'].daylight d2l-dropdown.page-action-group { margin-left: 0; margin-right: 30px; } }.d_tabs_container d2l-floating-buttons { margin-left: 10px; margin-right: 10px; } .daylight d2l-floating-buttons d2l-button-group d2l-dropdown-button { margin-right: 0; } [dir="rtl"].daylight d2l-floating-buttons d2l-button-group d2l-dropdown-button { margin-left: 0; } .d2l-page-message-container { width: 100%; text-align: center; bottom: 40px; position: fixed; pointer-events: none; z-index: 2001; } .d2l-page-message { pointer-events: all; display: inline-block; background-color: #ffffff; border: 1px solid #999; opacity: 0; max-width: 640px; text-align: left; box-shadow: 0px 3px 5px rgba(50, 50, 50, 0.18); border-radius: 5px; transition: bottom 0.8s ease, opacity 1s ease; } .d2l-page-message, .d2l-page-message .vui-heading-2 { color: #494c4e; } .d2l-page-message-shake { -webkit-animation: d2lPageMessageShakeStart 50ms linear, d2lPageMessageShake2 180ms ease-out 50ms 1, d2lPageMessageShake3 140ms ease-in-out 230ms 1, d2lPageMessageShake4 120ms ease-in-out 370ms 1, d2lPageMessageShake5 100ms ease-in-out 490ms 1; animation: d2lPageMessageShakeStart 50ms linear, d2lPageMessageShake2 180ms ease-out 50ms 1, d2lPageMessageShake3 140ms ease-in-out 230ms 1, d2lPageMessageShake4 120ms ease-in-out 370ms 1, d2lPageMessageShake5 100ms ease-in-out 490ms 1; } .d2l-page-message-close { margin: 10px 12px; overflow: hidden; } @keyframes d2lPageMessageShakeStart { 100% { transform:translateX(-16px); } } @-webkit-keyframes d2lPageMessageShakeStart { 100% {-webkit-transform:translateX(-16px);} } @keyframes d2lPageMessageShake2 { 0% {transform:translateX(-16px);} 50% {transform:translateX(12px);} 100% {transform:translateX(-8px);} } @-webkit-keyframes d2lPageMessageShake2 { 0% {-webkit-transform:translateX(-16px);} 50% {-webkit-transform:translateX(12px);} 100% {-webkit-transform:translateX(-8px);} } @keyframes d2lPageMessageShake3 { 0% {transform:translateX(-8px);} 50% {transform:translateX(6px);} 100% {transform:translateX(-4px);} } @-webkit-keyframes d2lPageMessageShake3 { 0% {-webkit-transform:translateX(-8px);} 50% {-webkit-transform:translateX(6px);} 100% {-webkit-transform:translateX(-4px);} } @keyframes d2lPageMessageShake4 { 0% {transform:translateX(-4px);} 50% {transform:translateX(2px);} 100% {transform:translateX(-1px);} } @-webkit-keyframes d2lPageMessageShake4 { 0% {-webkit-transform:translateX(-4px);} 50% {-webkit-transform:translateX(2px);} 100% {-webkit-transform:translateX(-1px);} } @keyframes d2lPageMessageShake5 { 0% {transform:translateX(-1px);} 100% {transform:translateX(0px);} } @-webkit-keyframes d2lPageMessageShake5 { 0% {-webkit-transform:translateX(-1px);} 100% {-webkit-transform:translateX(0px);} }.d2l-tool-areas { padding-bottom: 8px; position: relative; } .d2l-tool-areas-list { margin: 0; padding: 0; } .d2l-tool-areas-item { display: inline-block; } .d2l-tool-areas-link, .d2l-tool-areas-link:visited, .d2l-tool-areas-link:link, .d2l-tool-areas-link:hover, .d2l-tool-areas-link:focus { color: #017795; display: inline-block; padding: 0 15px; text-decoration: none; } .daylight .d2l-tool-areas-link, .daylight .d2l-tool-areas-link:visited, .daylight .d2l-tool-areas-link:link, .daylight .d2l-tool-areas-link:hover, .daylight .d2l-tool-areas-link:focus { color: #494c4e; } .d2l-tool-areas-item:first-child .d2l-tool-areas-link { padding-left: 0; } .d2l-tool-areas-item-selected > .d2l-tool-areas-link, .d2l-tool-areas-item-selected > .d2l-tool-areas-link:visited, .d2l-tool-areas-item-selected > .d2l-tool-areas-link:link, .d2l-tool-areas-item-selected > .d2l-tool-areas-link:hover, .d2l-tool-areas-item-selected > .d2l-tool-areas-link:focus { color: #333333; font-weight: bold; } .daylight .d2l-tool-areas-item-selected > .d2l-tool-areas-link, .daylight .d2l-tool-areas-item-selected > .d2l-tool-areas-link:visited, .daylight .d2l-tool-areas-item-selected > .d2l-tool-areas-link:link, .daylight .d2l-tool-areas-item-selected > .d2l-tool-areas-link:hover, .daylight .d2l-tool-areas-item-selected > .d2l-tool-areas-link:focus { color: #006fbf; } .d2l-tool-areas-bar { border-top: 3px solid #017795; bottom: 1px; display: none; position: absolute; width: 0px; } .daylight .d2l-tool-areas-bar { border-top: 3px solid #006fbf; } [dir='rtl'] .d2l-tool-areas-item:first-child .d2l-tool-areas-link { padding-right: 0; padding-left: 15px; } .daylight .d2l-tool-areas { padding-bottom: 0; } .daylight .d2l-tool-areas-list { padding-bottom: 8px; border-bottom: 1px solid #cdd5dc; display: inline-block; min-width: 100%; } .daylight .d2l-tool-areas { white-space: nowrap; } .daylight .d2l-tool-areas-list-container { position: relative; } .daylight .d2l-tool-areas[h-scrollbar]::before, .daylight .d2l-tool-areas[h-scrollbar]::after { content: " "; width: 10px; height: 100%; position: absolute; z-index: 1; top: 0; } [dir=rtl].daylight .d2l-tool-areas[h-scrollbar]::after, .daylight .d2l-tool-areas[h-scrollbar]::before { right: auto; left: -1px; background: linear-gradient(to left, rgba(0, 0, 0, 0) 0, rgba(251, 251, 251, 1) 100%); } [dir=rtl].daylight .d2l-tool-areas[h-scrollbar]::before, .daylight .d2l-tool-areas[h-scrollbar]::after { left: auto; right: -1px; background: linear-gradient(to right, rgba(0, 0, 0, 0) 0, rgba(251, 251, 251, 1) 100%); } .daylight .d2l-tool-areas[h-scrollbar][scrollbar-left]::before, .daylight .d2l-tool-areas[h-scrollbar][scrollbar-right]::after { display: none; }.d2l-left { float: left; } .d2l-right { float: right; }.d2l-hidden { display: none !important; }.d2l-dragdrop-shadow { background-color: #cccccc; border: 1px dashed #666666; cursor: move; opacity: 0.3; position: absolute; list-style: none; } .d2l-dragdrop-clone-shadow { position: absolute; opacity: 0.3; cursor: move; display: inline-block; list-style: none; } .d2l-dragdrop-draggable { cursor: move; -webkit-user-drag:element; -ms-touch-action: none; } .d2l-dragdrop-droppable-hover { border: 1px solid #cccccc; }.d2l-friledrop-default-style.d2l-filedrop { border-radius: 3px; border: 2px dashed transparent; } .daylight .d2l-filedropstyle-container, .daylight .d2l-filedrop-default-style.d2l-filedrop-add { border: 2px dashed #cdd5dc; } .daylight .d2l-filedropstyle-container-dragover, .daylight .d2l-filedrop-default-style.d2l-filedrop-add.d2l-filedrop-drag { border: 2px dashed #006FBF !important; background-color: #e8f8ff; } .d2l-filedrop-status-container { position: fixed; z-index: 1002; top: 40%; left: 40%; margin-left: -125px; width: 300px; height:50%; } .d2l-filedrop-status-container-hidden { display:none; } .d2l-filedrop-status-errors { border-radius: 3px; padding: 10px; margin-top: 8px; display: block; text-align: left; width:90%; } .daylight .d2l-filedrop-status-errors { border: 1px solid #CD2026; background-color: #FFFFFF; box-shadow: 2px 2px 2px 0px #6e7376; } .d2l-filedrop-status-errors-close { background-image:url('../../../d2l/img/lp/fileDrop/45.gif'); display: inline-block; float: right; height: 12px; margin: -6px -6px 7px 8px; width: 12px; } .d2l-filedrop-status-errors-hidden { display: none; } .d2l-filedrop-status-progress { border-radius: 3px; padding: 10px; margin-top: 8px; text-align: left; display: block; max-height:90%; width:90%; position:absolute; overflow:auto; } .daylight .d2l-filedrop-status-progress { border: 1px solid #cdd5dc; background-color: #FFFFFF; box-shadow: 2px 2px 2px 0px #6e7376; } .d2l-filedrop-status-progress-hidden { display: none; } .d2l-filedrop-status-file { visibility: visible; } .d2l-filedrop-status-file-hidden { display: none; } .d2l-quicklinkselector-icon { display: inline-block; margin-right: 8px; margin-left: 0; flex-shrink: 0; } [dir="rtl"] .d2l-quicklinkselector-icon { margin-right: 0; margin-left: 8px; } .d2l-quicklinkselector-add > .d2l-button { display: block; } .d2l-quicklinkselector-header { margin: 0px -10px 10px -10px; padding: 5px 10px; border-bottom: 1px solid #cccccc; box-shadow: 0 1px 1px 0 #f1f1f1; background: #f8f8f8; background: linear-gradient(to bottom, #f8f8f8 0%,#f2f2f2 100%); } .d2l-quicklinkselector-header-nomargin { margin-bottom: 0px; } .d2l-quicklinkselector-list-header { margin: 0px -10px 0 -10px; padding: 10px; border-bottom: 1px solid #cccccc; } .d2l-quicklinkselector-iframe { } .d2l-quicklinkselector-add { padding-top: 10px; } .d2l-quicklinkselector-item { display: flex; } .d2l-quicklinkselector-item-simple { flex-grow: 1; overflow: hidden; } .d2l-quicklinkselector-icon-line { display: flex; } .d2l-documentviewer-legacy-fullscreen { position: absolute; left: 0; top: 0; z-index: 1001; width: 100%; height: 100%; }.d2l-sharebutton-facebook { border: none; height: 21px; overflow: hidden; width: 90px; } .d2l-gplusone { margin-left: 10px; }.d2l-twitter { background-image:url('../../../d2l/img/lp/share/46.png'); background-repeat: no-repeat; float: none; height: 20px; margin: 0 37px 0 0; text-indent: -10000px; width: 55px; vertical-align: top; display: inline-block; } .d2l-twitter:hover, .d2l-twitter:focus { background-image:url('../../../d2l/img/lp/share/47.png'); outline: none; }.daylight #courseSelectorId .d2l-datalist { margin-top: 0; margin-bottom: 0; } .daylight .d2l-course-selector-item { align-items: center; display: flex; padding: calc(1.25rem - 16px) calc(1rem - 10px); } .daylight .d2l-course-selector-item-name { flex: auto; overflow: hidden; } .daylight .d2l-course-selector-item-name > .d2l-link { max-width: 100%; word-wrap: break-word; overflow-wrap: break-word; } .daylight .d2l-course-selector-item > .d2l-toggle { flex: none; } .d2l-courseselector-wrapper { overflow: hidden; } .d2l-personaltools-text { display: inline-block; padding: 3px 5px 3px 1px; vertical-align: middle; white-space: nowrap; } .d2l-minibar-activity .d2l-menuflyout-opener { padding: 1px 0; } .d2l-minibar-activity { margin-right: 18px; display: inline-block; vertical-align: middle; } .d2l-minibar-activity .d2l-minibar-activity-buckethandle { padding: 0 4px; position: relative; } .d2l-minibar-menu-separator { border: none; border-bottom: 1px dotted #d0d0d0; margin: 0; } .d2l-minibar-activity-message-image { margin-right: 5px; } .d2l-minibar-activity-buckethandle img { margin: 2px 0; vertical-align: middle; } .d2l-minibar-activity .d2l-msg-container-none { padding: 5px 10px; } .d2l-minibar-activity-message-content span, .d2l-minibar-activity-message-content img { vertical-align: middle; } .d2l-minibar-activity-message-wrapper { padding: 5px 0; } .d2l-minibar-activity-message-content a, .d2l-minibar-activity-message-content a:visited, .d2l-minibar-activity-message-content a:hover { display: inline; } .d2l-minibar-activity-message-new { width: 7px; height: 7px; border-radius: 250px; font-size: 50px; color: #FFF; line-height: 500px; text-align: center; background: #F00; border: solid 1px #FFF; right: 0; top: 2px; position: absolute; } .daylight .d2l-messagebucket-button-container { display: -ms-flexbox; display: -webkit-flex; display: flex; -ms-flex-flow: row wrap; -webkit-flex-flow: row wrap; flex-flow: row wrap; -webkit-justify-content: space-around; justify-content: space-around; border-bottom: 1px solid #cdd5dc; margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-bottom: 0.5rem; } .daylight .d2l-messagebucket-button-container d2l-icon { margin-right: 5px; } .daylight .d2l-messagebucket-button-container + #AB_DL_PH_Messages { margin-left: -10px; margin-right: -10px; } .daylight .d2l-messagebucket-button-container + #AB_DL_PH_Messages .d2l-datalist-container { background: linear-gradient(to bottom,#f9fbff 0,rgba(249,251,255,0) 100%); padding-top: 20px; padding-bottom: calc(20px - .3rem); } .daylight .d2l-messagebucket-button-container + #AB_DL_PH_Messages ul { padding-left: 10px; padding-right:10px; } .daylight .d2l-messagebucket-button-container + #AB_DL_PH_Messages .d2l-msg-container-none { margin-left: 20px; margin-right: 20px; } .daylight .d2l-admin-tools { padding: 20px; } .d2l-admin-tools-column { float: left; width: 200px; } .daylight .d2l-admin-tools-column { margin-left: 20px; } .d2l-admin-tools-column:first-child { margin-left: 0; } [dir='rtl'] .d2l-admin-tools-column { float: right; } .daylight[dir='rtl'] .d2l-admin-tools-column { margin-left: 0; margin-right: 20px; } [dir='rtl'] .d2l-admin-tools-column:first-child { margin-right: 0; } .d2l-admin-tools-column > .d2l-heading { padding-bottom: 3px; } .daylight .d2l-admin-tools-column > .d2l-heading { padding-top: 20px; } .d2l-admin-tools-column > .d2l-heading:first-child { padding-top: 0; } .d2l-admin-tools-column > .d2l-list { margin-bottom: 8px; } .daylight .d2l-admin-tools-column > .d2l-list > li { padding: 0.25rem 0; } .d2l-navbar-container { zoom: 1; } .d2l-navbar img { border: none; } .d2l-navbar-edit, .d2l-navbar-manage { position: absolute; left: -10000px; } body.dbd_noNav .d2l-navbar { display: none; } .d2l-navbar-area { width: 100%; } .d2l-navbar-area img { vertical-align: middle; } .d2l-navbar-logo-link, .d2l-navbar-logo { display: block; } .d2l-navbar-image { max-width: 800px; } ul.d2l-navbar-area-list { list-style: none; margin: 0; padding: 0; } ul.d2l-navbar-area-list > li { display: inline-block; padding: 0; text-align: left; } .d2l-navbar-sep { background-position: center left; background-repeat: no-repeat; cursor: default; display: inline-block; min-height: 22px; vertical-align: middle; } ul.d2l-navbar-area-list > .d2l-navbar-area-list-item-last .d2l-navbar-sep { display: none; } .d2l-navbar-item { display: inline-block; white-space: normal; } .d2l-navbar-link, .d2l-navbar-link:link, .d2l-navbar-link:visited { border: none; border-radius: 0.25em; cursor: pointer; display: block; min-height: 16px; padding: 3px 4px; text-decoration: none; } .d2l-navbar-link:focus { outline-style: none; } .d2l-navbar-link span { display:inline-block; vertical-align:middle; } span.d2l-navbar-text { cursor: default; display: block; min-height: 16px; padding: 3px 4px; } .d2l-navbar-text span { display:inline-block; vertical-align:middle; } .d2l-navbar-item img { margin: 0px 4px 0px 0px; padding: 0; vertical-align: middle; } img.d_nb_s { width: 1px; height: 16px; margin: 0 !important; } div.d_nb_c3 tr.d_nb_ir td { vertical-align: middle; } td.d_nb_ir_t { width: 100%; } img.d_nb_mi { vertical-align: middle; } .d2l-navbar-group > .d2l-menuflyout { display: inline-block; padding: 0px; vertical-align:middle; } .d2l-navbar-group > .d2l-menuflyout > .d2l-menuflyout-opener { min-height: 0; padding: 3px 4px; } .d2l-navbar-group > .d2l-menuflyout > .d2l-menuflyout-opener:focus { outline-style: none; } .d2l-navbar-group > .d2l-menuflyout > .d2l-menuflyout-opener > .d2l-menuflyout-text { padding-left: 0px; padding-right: 0px; } .d2l-navbar-group > .d2l-menuflyout > .d2l-menuflyout-opener > .d2l-menuflyout-arrow { margin: 0px 3px; } .d2l-navbar-group .d2l-menuflyout .d2l-menuflyout-contents { border: none; } .d2l-navbar-group .d2l-menuflyout .d2l-menuflyout-contents .d2l-menuflyout-group-container { border: 1px solid #999; } ul.d2l-navbar-group-inner { padding: 10px; } ul.d2l-navbar-group-inner > li { display:block; } .d2l-navbar-group-inner .d2l-link { cursor: pointer; white-space: nowrap; } div.d_nb_l { background-color: #ffffff; line-height: 15px; overflow: hidden; } div.d_nb_l table { border-collapse: separate; } div.d_nb_l td { font-family: Verdana; font-size: 11px; white-space: nowrap; vertical-align: top; } div.d_nb_l img { vertical-align: middle; } div.d_nb_l a.default, div.d_nb_l a.default:visited { color: #3366cc; font-family: Verdana; font-size: 11px; text-decoration: underline; } div.d_nb_l a.default:active, div.d_nb_l a.default:hover { color: #003399; } div.d_nb_l a.wnu, div.d_nb_l a.wnu:visited { color: #ffffff; font-size: 10px; font-family: Verdana; text-decoration: none; } div.d_nb_l a.wnu:active, div.d_nb_l a.wnu:hover { color: #ff0000; } div.d_nb_l a.topwnu, div.d_nb_l a.topwnu:visited { color: #ffffff; font-size: 10px; font-family: Verdana; text-decoration: none; } div.d_nb_l a.topwnu:active, div.d_nb_l a.topwnu:hover { color: #dddddd; } div.d_nb_l a.curLink, div.d_nb_l a.curLink:visited, div.d_nb_l a.curLink:active { color: #cc0000; font-family: Verdana; font-size: 11px; text-decoration: underline; } div.d_nb_adv_m { background-color:#fafafa; color:#333333; padding:5px; } .d_nb_l .d2l-navbar-logo-link { display: inline; }.d2l-skipnav { left: -1000px; overflow: hidden; position: absolute; width: 1px; } [dir="rtl"] .d2l-skipnav { left: auto; right: -10000px; } .d2l-skipnav:active, .d2l-skipnav:focus { background-color: rgba( 0, 0, 0, 0.7 ); border: 1px solid rgba( 0, 0, 0, 0.8 ); box-sizing: content-box; padding: 0.3em; outline: none; line-height: 1.4rem; letter-spacing: 0.01rem; font-size: inherit; font-family: inherit; font-weight: bold; color: #ffffff; text-align: center; text-decoration: none; display: block; left: 25%; width: 50%; top: 0; z-index: 10000; vertical-align: middle; cursor: pointer; } [dir="rtl"] .d2l-skipnav:active, [dir="rtl"] .d2l-skipnav:focus { right: 25%; }.d2l-minibar, .d2l-navbar { line-height: 1.5em; } .d2l-minibar .d2l-datalist-style1 > .d2l-datalist { list-style: none; padding: 0; } .d2l-minibar .d2l-list { list-style: none; } .d2l-minibar p { margin: 0; } .d2l-minibar input:focus, .d2l-minibar select:focus { outline: none; } #d2l-ie-warning-banner { background-color: #ffede8; border-bottom: 1px solid #cd2026; border-top: 1px solid #cd2026; min-width: 320px; } .d2l-ie-warning-banner-content { align-items: center; display: flex; margin: auto; max-width: 1170px; min-height: 7.5rem; padding: 0 3.2rem; } .d2l-ie-warning-banner-content:after { content: ''; min-height: inherit; font-size: 0; } @media (max-width: 1000px) { .d2l-ie-warning-banner-content { padding: 0 2.4rem; } } @media (max-width: 800px) { .d2l-ie-warning-banner-content { padding: 0 2rem; } } .d2l-ie-warning-banner-image { background-image:url('data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 105 103.157'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23bd3430;%7D.cls-2%7Bfill:%23b5bdc2;%7D.cls-3%7Bfill:%23ff6b70;%7D.cls-4%7Bfill:%23f1f5fb;%7D.cls-5%7Bfill:%23fff;%7D.cls-6,.cls-9%7Bfill:none;%7D.cls-7%7Bfill:%23e3e9f1;%7D.cls-8%7Bfill:%23fff9d6;%7D.cls-9%7Bstroke:%23b5bdc2;stroke-linecap:round;stroke-linejoin:round;%7D.cls-10%7Bfill:%23868c8f;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3EAsset 5%3C/title%3E%3Cg id='Layer_2' data-name='Layer 2'%3E%3Cg id='artwork'%3E%3Cpath class='cls-1' d='M100.568,0H4.432A4.432,4.432,0,0,0,0,4.432v56.1a4.432,4.432,0,0,0,4.432,4.432h96.136A4.432,4.432,0,0,0,105,60.529V4.432A4.432,4.432,0,0,0,100.568,0ZM87.7,50.754H21.51V19.261H87.7Z'/%3E%3Cpath class='cls-2' d='M81.719,65.1l-1.03-1.431C73.422,68.9,74.124,74.953,75.77,80.18a7.953,7.953,0,0,1-1.439,7.591,5.049,5.049,0,0,1-4.57,1.883c-3.263-.557-3.682-4.216-3.848-8.24a20.074,20.074,0,0,0-.16-2.185,5.993,5.993,0,0,0-5.24-5.043c-2.6-.231-4.766,1.414-5.812,4.4-1.284,3.667-3.171,7.771-5.667,9.882a16.248,16.248,0,0,0-.37-5.1c-.874-3.516-2.951-5.509-5.578-5.315-2.44.175-4.293,2.064-4.721,4.814a7.563,7.563,0,0,0,4.566,8.257,7.348,7.348,0,0,0,2.057.508q.3.027.6.027a6.3,6.3,0,0,0,1.125-.1,12.926,12.926,0,0,1-6.983,8.767c-3.64,1.606-8.577,1.746-11.516-2.68-1.874-2.822-1.863-6.3.025-8.079,4.9-4.631,7.1-10.158,6.519-16.427-.82-8.9-11.849-10.568-12.318-10.634l-.248,1.746c.1.014,10.118,1.54,10.81,9.049.533,5.783-1.421,10.684-5.974,14.985-2.545,2.4-2.664,6.75-.283,10.336a9.937,9.937,0,0,0,8.359,4.538,13.225,13.225,0,0,0,5.338-1.22,14.26,14.26,0,0,0,7.482-8.358,18.55,18.55,0,0,0,.774-2.73c2.93-1.585,5.5-5.492,7.666-11.681.774-2.207,2.232-3.382,3.991-3.226a4.21,4.21,0,0,1,3.656,3.567,19.116,19.116,0,0,1,.139,1.978c.14,3.389.374,9.062,5.313,9.905a6.789,6.789,0,0,0,6.2-2.462,9.723,9.723,0,0,0,1.793-9.279C75.922,74.792,75.38,69.667,81.719,65.1ZM45.148,89.875a5.607,5.607,0,0,1-1.562-.39,5.8,5.8,0,0,1-3.478-6.348,3.574,3.574,0,0,1,3.1-3.326c2.433-.182,3.428,2.726,3.74,3.982a15.23,15.23,0,0,1,.171,5.819A4.546,4.546,0,0,1,45.148,89.875Z'/%3E%3Cpath class='cls-3' d='M100.568.882H4.432A4.432,4.432,0,0,0,0,5.314v56.1a4.432,4.432,0,0,0,4.432,4.432h96.136A4.432,4.432,0,0,0,105,61.411V5.314A4.432,4.432,0,0,0,100.568.882ZM75.211,29.689a4.619,4.619,0,0,1-.978,2.363l-.87-.87-.729.728.87.87a4.613,4.613,0,0,1-2.363.979V32.531H70.109v1.228a4.614,4.614,0,0,1-2.362-.979l.87-.87-.729-.728-.87.87a4.621,4.621,0,0,1-.979-2.363h1.229V28.657H66.039a4.6,4.6,0,0,1,.979-2.36l.87.867.729-.729-.87-.867a4.591,4.591,0,0,1,2.362-.981v1.231h1.032V24.587a4.591,4.591,0,0,1,2.363.981l-.87.867.729.729.87-.867a4.6,4.6,0,0,1,.978,2.36H73.983v1.032ZM43.325,32.757a.876.876,0,0,1-.03-.235V27a1.006,1.006,0,0,1,.141-.518,1.027,1.027,0,0,1,.888-.511h2.727v-.009l-.009-.035a.043.043,0,0,0-.006-.021c-.017-.076-.038-.152-.061-.229q-.066-.238-.141-.473H58.166q-.075.234-.141.473c-.024.077-.044.153-.062.229a.043.043,0,0,0-.006.021l-.009.035v.009h2.725a1.024,1.024,0,0,1,.887.511A1.006,1.006,0,0,1,61.7,27v5.522a.875.875,0,0,1-.029.235l0,.006v0l0,.006a.744.744,0,0,1-.085.235,1.033,1.033,0,0,1-.461.44.989.989,0,0,1-.447.1H44.324a1.036,1.036,0,0,1-.908-.543.965.965,0,0,1-.091-.244Zm-4.367-3.068a4.57,4.57,0,0,1-.979,2.363l-.867-.87-.729.728.867.87a4.593,4.593,0,0,1-2.36.979V32.531H33.859v1.228A4.613,4.613,0,0,1,31.5,32.78l.87-.87-.729-.728-.87.87a4.6,4.6,0,0,1-.979-2.363h1.229V28.657H29.788a4.571,4.571,0,0,1,.979-2.36l.87.867.729-.729-.87-.867a4.591,4.591,0,0,1,2.363-.981v1.231H34.89V24.587a4.57,4.57,0,0,1,2.36.981l-.867.867.729.729.867-.867a4.571,4.571,0,0,1,.979,2.36H37.729v1.032Z'/%3E%3Cpath class='cls-2' d='M95.463,8.987H9.534a1.9,1.9,0,0,0-1.9,1.9V39.954a1.9,1.9,0,0,0,1.9,1.9H95.463a1.9,1.9,0,0,0,1.9-1.9V10.892A1.9,1.9,0,0,0,95.463,8.987ZM29.788,28.657a4.571,4.571,0,0,1,.979-2.36l.87.867.729-.729-.87-.867a4.591,4.591,0,0,1,2.363-.981v1.231H34.89V24.587a4.57,4.57,0,0,1,2.36.981l-.867.867.729.729.867-.867a4.571,4.571,0,0,1,.979,2.36H37.729v1.032h1.229a4.57,4.57,0,0,1-.979,2.363l-.867-.87-.729.728.867.87a4.593,4.593,0,0,1-2.36.979V32.531H33.859v1.228A4.613,4.613,0,0,1,31.5,32.78l.87-.87-.729-.728-.87.87a4.6,4.6,0,0,1-.979-2.363h1.229V28.657Zm13.537,4.1a.876.876,0,0,1-.03-.235V27a1.006,1.006,0,0,1,.141-.518,1.027,1.027,0,0,1,.888-.511h2.727v-.009l-.009-.035a.043.043,0,0,0-.006-.021c-.017-.076-.038-.152-.061-.229q-.066-.238-.141-.473H58.166q-.075.234-.141.473c-.024.077-.044.153-.062.229a.043.043,0,0,0-.006.021l-.009.035v.009h2.725a1.024,1.024,0,0,1,.887.511A1.006,1.006,0,0,1,61.7,27v5.522a.875.875,0,0,1-.029.235l0,.006v0l0,.006a.744.744,0,0,1-.085.235,1.033,1.033,0,0,1-.461.44.989.989,0,0,1-.447.1H44.324a1.036,1.036,0,0,1-.908-.543.965.965,0,0,1-.091-.244Zm27.816-6.939V24.587a4.591,4.591,0,0,1,2.363.981l-.87.867.729.729.87-.867a4.6,4.6,0,0,1,.978,2.36H73.983v1.032h1.228a4.619,4.619,0,0,1-.978,2.363l-.87-.87-.729.728.87.87a4.613,4.613,0,0,1-2.363.979V32.531H70.109v1.228a4.614,4.614,0,0,1-2.362-.979l.87-.87-.729-.728-.87.87a4.621,4.621,0,0,1-.979-2.363h1.229V28.657H66.039a4.6,4.6,0,0,1,.979-2.36l.87.867.729-.729-.87-.867a4.591,4.591,0,0,1,2.362-.981v1.231Z'/%3E%3Cpath class='cls-4' d='M95.463,8.188H9.534a1.9,1.9,0,0,0-1.9,1.9V39.152a1.9,1.9,0,0,0,1.9,1.9H95.463a1.9,1.9,0,0,0,1.9-1.9V10.089A1.9,1.9,0,0,0,95.463,8.188Zm-20.252,21.5a4.619,4.619,0,0,1-.978,2.363l-.87-.87-.729.728.87.87a4.613,4.613,0,0,1-2.363.979V32.531H70.109v1.228a4.614,4.614,0,0,1-2.362-.979l.87-.87-.729-.728-.87.87a4.621,4.621,0,0,1-.979-2.363h1.229V28.657H66.039a4.6,4.6,0,0,1,.979-2.36l.87.867.729-.729-.87-.867a4.591,4.591,0,0,1,2.362-.981v1.231h1.032V24.587a4.591,4.591,0,0,1,2.363.981l-.87.867.729.729.87-.867a4.6,4.6,0,0,1,.978,2.36H73.983v1.032ZM43.325,32.757a.876.876,0,0,1-.03-.235V27a1.006,1.006,0,0,1,.141-.518,1.027,1.027,0,0,1,.888-.511h2.727v-.009l-.009-.035a.043.043,0,0,0-.006-.021c-.017-.076-.038-.152-.061-.229q-.066-.238-.141-.473H58.166q-.075.234-.141.473c-.024.077-.044.153-.062.229a.043.043,0,0,0-.006.021l-.009.035v.009h2.725a1.024,1.024,0,0,1,.887.511A1.006,1.006,0,0,1,61.7,27v5.522a.875.875,0,0,1-.029.235l0,.006v0l0,.006a.744.744,0,0,1-.085.235,1.033,1.033,0,0,1-.461.44.989.989,0,0,1-.447.1H44.324a1.036,1.036,0,0,1-.908-.543.965.965,0,0,1-.091-.244Zm-9.466-.226v1.228A4.613,4.613,0,0,1,31.5,32.78l.87-.87-.729-.728-.87.87a4.6,4.6,0,0,1-.979-2.363h1.229V28.657H29.788a4.571,4.571,0,0,1,.979-2.36l.87.867.729-.729-.87-.867a4.591,4.591,0,0,1,2.363-.981v1.231H34.89V24.587a4.57,4.57,0,0,1,2.36.981l-.867.867.729.729.867-.867a4.571,4.571,0,0,1,.979,2.36H37.729v1.032h1.229a4.57,4.57,0,0,1-.979,2.363l-.867-.87-.729.728.867.87a4.593,4.593,0,0,1-2.36.979V32.531Zm61.6-24.343H9.534a1.9,1.9,0,0,0-1.9,1.9V39.152a1.9,1.9,0,0,0,1.9,1.9H95.463a1.9,1.9,0,0,0,1.9-1.9V10.089A1.9,1.9,0,0,0,95.463,8.188Zm-20.252,21.5a4.619,4.619,0,0,1-.978,2.363l-.87-.87-.729.728.87.87a4.613,4.613,0,0,1-2.363.979V32.531H70.109v1.228a4.614,4.614,0,0,1-2.362-.979l.87-.87-.729-.728-.87.87a4.621,4.621,0,0,1-.979-2.363h1.229V28.657H66.039a4.6,4.6,0,0,1,.979-2.36l.87.867.729-.729-.87-.867a4.591,4.591,0,0,1,2.362-.981v1.231h1.032V24.587a4.591,4.591,0,0,1,2.363.981l-.87.867.729.729.87-.867a4.6,4.6,0,0,1,.978,2.36H73.983v1.032ZM43.325,32.757a.876.876,0,0,1-.03-.235V27a1.006,1.006,0,0,1,.141-.518,1.027,1.027,0,0,1,.888-.511h2.727v-.009l-.009-.035a.043.043,0,0,0-.006-.021c-.017-.076-.038-.152-.061-.229q-.066-.238-.141-.473H58.166q-.075.234-.141.473c-.024.077-.044.153-.062.229a.043.043,0,0,0-.006.021l-.009.035v.009h2.725a1.024,1.024,0,0,1,.887.511A1.006,1.006,0,0,1,61.7,27v5.522a.875.875,0,0,1-.029.235l0,.006v0l0,.006a.744.744,0,0,1-.085.235,1.033,1.033,0,0,1-.461.44.989.989,0,0,1-.447.1H44.324a1.036,1.036,0,0,1-.908-.543.965.965,0,0,1-.091-.244Zm-9.466-.226v1.228A4.613,4.613,0,0,1,31.5,32.78l.87-.87-.729-.728-.87.87a4.6,4.6,0,0,1-.979-2.363h1.229V28.657H29.788a4.571,4.571,0,0,1,.979-2.36l.87.867.729-.729-.87-.867a4.591,4.591,0,0,1,2.363-.981v1.231H34.89V24.587a4.57,4.57,0,0,1,2.36.981l-.867.867.729.729.867-.867a4.571,4.571,0,0,1,.979,2.36H37.729v1.032h1.229a4.57,4.57,0,0,1-.979,2.363l-.867-.87-.729.728.867.87a4.593,4.593,0,0,1-2.36.979V32.531Z'/%3E%3Cpath class='cls-5' d='M95.463,8.188H9.534a1.9,1.9,0,0,0-1.9,1.9V20.208H97.367V10.089A1.9,1.9,0,0,0,95.463,8.188Zm0,0H9.534a1.9,1.9,0,0,0-1.9,1.9V20.208H97.367V10.089A1.9,1.9,0,0,0,95.463,8.188Z'/%3E%3Cline class='cls-6' x1='99.302' y1='20.1' x2='5.914' y2='20.1'/%3E%3Cpath class='cls-2' d='M21.12,67.008a1.8,1.8,0,0,1-1.552-1.942c.239-.869,4.252-15.431,4.648-16.956.264-1.014.6-1.6,1.528-1.6h53.51c.93,0,1.264.587,1.528,1.6.4,1.525,4.409,16.087,4.648,16.956a1.8,1.8,0,0,1-1.552,1.942Z'/%3E%3Cpath class='cls-7' d='M79.254,46.8c.669,0,.972.336,1.243,1.38.392,1.508,4.3,15.707,4.638,16.919-.029.895-.582,1.612-1.257,1.612H21.12c-.675,0-1.228-.717-1.257-1.612C20.2,63.89,24.109,49.691,24.5,48.184c.272-1.045.574-1.381,1.244-1.381h53.51m0-.587H25.744c-1.156,0-1.548.8-1.812,1.82-.411,1.581-4.658,16.991-4.658,16.991A2.092,2.092,0,0,0,21.12,67.3H83.878a2.092,2.092,0,0,0,1.846-2.275s-4.248-15.41-4.658-16.991c-.265-1.018-.656-1.82-1.812-1.82Z'/%3E%3Ccircle class='cls-8' cx='52.499' cy='53.13' r='1.561'/%3E%3Crect class='cls-1' x='13.403' y='11.977' width='4.506' height='4.506' rx='1.492'/%3E%3Cline class='cls-9' x1='22.068' y1='12.565' x2='91.591' y2='12.565'/%3E%3Cline class='cls-9' x1='22.068' y1='15.895' x2='91.591' y2='15.895'/%3E%3Ccircle class='cls-8' cx='28.696' cy='60.632' r='1.904'/%3E%3Ccircle class='cls-8' cx='35.296' cy='57.924' r='1.904'/%3E%3Ccircle class='cls-8' cx='76.302' cy='60.632' r='1.904'/%3E%3Ccircle class='cls-8' cx='69.702' cy='57.924' r='1.904'/%3E%3Ccircle class='cls-7' cx='4.335' cy='61.487' r='1.119'/%3E%3Ccircle class='cls-7' cx='100.663' cy='61.487' r='1.119'/%3E%3Ccircle class='cls-7' cx='4.335' cy='5.118' r='1.119'/%3E%3Ccircle class='cls-7' cx='100.663' cy='5.118' r='1.119'/%3E%3Cpath class='cls-2' d='M70.9,20.155H34.1a9.02,9.02,0,1,0,0,18.039H70.9a9.02,9.02,0,0,0,0-18.039Zm4.311,9.534a4.619,4.619,0,0,1-.978,2.363l-.87-.87-.729.728.87.87a4.613,4.613,0,0,1-2.363.979V32.531H70.109v1.228a4.614,4.614,0,0,1-2.362-.979l.87-.87-.729-.728-.87.87a4.621,4.621,0,0,1-.979-2.363h1.229V28.657H66.039a4.6,4.6,0,0,1,.979-2.36l.87.867.729-.729-.87-.867a4.591,4.591,0,0,1,2.362-.981v1.231h1.032V24.587a4.591,4.591,0,0,1,2.363.981l-.87.867.729.729.87-.867a4.6,4.6,0,0,1,.978,2.36H73.983v1.032ZM47.042,25.927a.043.043,0,0,0-.006-.021c-.017-.076-.038-.152-.061-.229q-.066-.238-.141-.473H58.166q-.075.234-.141.473c-.024.077-.044.153-.062.229a.043.043,0,0,0-.006.021l-.009.035v.009c-.026.115-.055.223-.082.338a1.41,1.41,0,0,0-.035.162c-.021.091-.038.185-.056.276-.053.264-.094.529-.126.8-.009.062-.015.127-.021.191a.032.032,0,0,0,0,.024c-.015.1-.023.194-.029.294-.015.141-.024.285-.03.429-.005.079-.008.161-.011.241-.006.15-.009.3-.009.449a12.992,12.992,0,0,0,.617,3.968H46.837a13.023,13.023,0,0,0,.617-3.968c0-.15,0-.3-.009-.449,0-.08-.006-.162-.012-.241-.006-.144-.014-.288-.029-.429-.006-.1-.015-.2-.03-.294a.038.038,0,0,0,0-.024c-.006-.064-.012-.129-.021-.191-.032-.27-.074-.535-.126-.8-.018-.091-.036-.185-.056-.276a1.412,1.412,0,0,0-.036-.162c-.026-.115-.055-.223-.082-.338v-.009Zm-8.084,3.762a4.57,4.57,0,0,1-.979,2.363l-.867-.87-.729.728.867.87a4.593,4.593,0,0,1-2.36.979V32.531H33.859v1.228A4.613,4.613,0,0,1,31.5,32.78l.87-.87-.729-.728-.87.87a4.6,4.6,0,0,1-.979-2.363h1.229V28.657H29.788a4.571,4.571,0,0,1,.979-2.36l.87.867.729-.729-.87-.867a4.591,4.591,0,0,1,2.363-.981v1.231H34.89V24.587a4.57,4.57,0,0,1,2.36.981l-.867.867.729.729.867-.867a4.571,4.571,0,0,1,.979,2.36H37.729v1.032Z'/%3E%3Cpath class='cls-10' d='M47.454,29.174a13.023,13.023,0,0,1-.617,3.968c-.012.053-.03.1-.044.153H43.939a.863.863,0,0,1-.088,0,1.4,1.4,0,0,1-.7-1.229v-5.78a1.393,1.393,0,0,1,.7-1.226.5.5,0,0,1,.094-.006h2.848a1.118,1.118,0,0,1,.047.153A12.951,12.951,0,0,1,47.454,29.174Z'/%3E%3Cpath class='cls-4' d='M34.373,23.062a6.111,6.111,0,1,0,6.113,6.112A6.119,6.119,0,0,0,34.373,23.062Zm0,11.341A5.23,5.23,0,1,1,39.6,29.174,5.237,5.237,0,0,1,34.373,34.4Z'/%3E%3Cpath class='cls-10' d='M34.373,23.817a5.356,5.356,0,1,0,5.355,5.357A5.356,5.356,0,0,0,34.373,23.817ZM37.25,32.78a4.593,4.593,0,0,1-2.36.979V32.531H33.859v1.228A4.613,4.613,0,0,1,31.5,32.78l.87-.87-.729-.728-.87.87a4.6,4.6,0,0,1-.979-2.363h1.229V28.657H29.788a4.571,4.571,0,0,1,.979-2.36l.87.867.729-.729-.87-.867a4.591,4.591,0,0,1,2.363-.981v1.231H34.89V24.587a4.57,4.57,0,0,1,2.36.981l-.867.867.729.729.867-.867a4.571,4.571,0,0,1,.979,2.36H37.729v1.032h1.229a4.57,4.57,0,0,1-.979,2.363l-.867-.87-.729.728Zm-7.491-3.62v.026l0-.012Z'/%3E%3Cpath class='cls-10' d='M61.848,26.283v5.78a1.4,1.4,0,0,1-.7,1.229h0a.863.863,0,0,1-.088,0H58.21a1.49,1.49,0,0,1-.047-.153,13.044,13.044,0,0,1,0-7.938.994.994,0,0,1,.047-.153h2.845c.032,0,.062,0,.094,0l0,0A1.405,1.405,0,0,1,61.848,26.283Z'/%3E%3Cpath class='cls-4' d='M70.624,23.062a6.111,6.111,0,1,0,6.113,6.112A6.118,6.118,0,0,0,70.624,23.062Zm0,11.341a5.23,5.23,0,1,1,5.231-5.229A5.234,5.234,0,0,1,70.624,34.4Z'/%3E%3Cpath class='cls-10' d='M70.624,23.817a5.356,5.356,0,1,0,5.354,5.357A5.356,5.356,0,0,0,70.624,23.817ZM73.5,32.78a4.613,4.613,0,0,1-2.363.979V32.531H70.109v1.228a4.614,4.614,0,0,1-2.362-.979l.87-.87-.729-.728-.87.87a4.621,4.621,0,0,1-.979-2.363h1.229V28.657H66.039a4.6,4.6,0,0,1,.979-2.36l.87.867.729-.729-.87-.867a4.591,4.591,0,0,1,2.362-.981v1.231h1.032V24.587a4.591,4.591,0,0,1,2.363.981l-.87.867.729.729.87-.867a4.6,4.6,0,0,1,.978,2.36H73.983v1.032h1.228a4.619,4.619,0,0,1-.978,2.363l-.87-.87-.729.728Z'/%3E%3Cpath class='cls-4' d='M61.3,24.973v-.066h-.11a1.393,1.393,0,0,0-.643-.159H44.45a1.368,1.368,0,0,0-.676.18A1.536,1.536,0,0,0,43,26.282v5.781a1.311,1.311,0,0,0,.013.2.925.925,0,0,0,.026.154c0,.019.007.028.007.023a.3.3,0,0,0,.022.087c.012.043.027.085.043.132l.013.031c.018.038.034.073.053.108l.02.042a.225.225,0,0,0,.032.048l.018.031a.857.857,0,0,0,.077.111.9.9,0,0,0,.133.15,1.066,1.066,0,0,0,.135.12l.05.045h.01a1.471,1.471,0,0,0,.126.078,1.332,1.332,0,0,0,.592.173.529.529,0,0,0,.079,0h16.1a.391.391,0,0,0,.066,0,1.368,1.368,0,0,0,.571-.155l.04-.02a1.629,1.629,0,0,0,.168-.111,1.405,1.405,0,0,0,.109-.092l.074-.076a1.274,1.274,0,0,0,.091-.1l.036-.051.013-.015.067,0v-.106l.037-.04v-.028c.018-.034.036-.071.055-.116l.014-.031a.652.652,0,0,0,.021-.062l.019-.061c.013-.045.025-.093.033-.134a.8.8,0,0,0,.021-.12A1.4,1.4,0,0,0,62,32.063V26.282A1.56,1.56,0,0,0,61.3,24.973Zm-.334,7.906a.834.834,0,0,1-.42.116H44.45a.842.842,0,0,1-.418-.114.954.954,0,0,1-.449-.818V26.282a.9.9,0,0,1,.867-.931h16.1a.9.9,0,0,1,.867.931v5.781A.948.948,0,0,1,60.966,32.879Z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E'); background-position: center; background-repeat: no-repeat; height: 105px; margin-top: 0.8rem; min-height: 90px; min-width: 90px; width: 105px; } .d2l-ie-warning-banner-message { align-items: center; display: flex; width: 100%; } @media (max-width: 750px) { .d2l-ie-warning-banner-message { flex-flow: wrap; } } .d2l-ie-warning-banner-text { margin-left: 3rem; word-break: break-word; } [dir='rtl'] .d2l-ie-warning-banner-text { margin-left: 0; margin-right: 3rem; } @media (max-width: 1000px) { .d2l-ie-warning-banner-text { margin-left: 2.1rem; } [dir='rtl'] .d2l-ie-warning-banner-text { margin-right: 2.1rem; } } @media (max-width: 750px) { .d2l-ie-warning-banner-text { padding: 0.5rem 0 0.25rem 0; } } #d2l-ie-warning-banner-text-details { margin: 0.25rem 0 0 0; } #d2l-ie-warning-banner-text-details span:first-child { margin-right: 0.5rem; } [dir='rtl'] #d2l-ie-warning-banner-text-details span:first-child { margin-right: 0; margin-left: 0.5rem; } #d2l-ie-warning-banner-text-learn-more a:after { content: '\203A'; display: inline-block; font-size: 35px; margin-left: 8px; text-decoration: underline; vertical-align: top; } #d2l-ie-warning-banner-text-learn-more a:after, #d2l-ie-warning-banner-text-learn-more a:hover:after, #d2l-ie-warning-banner-text-learn-more a:focus:after { text-decoration: none; } [dir='rtl'] #d2l-ie-warning-banner-text-learn-more a:after { margin-left: 0; margin-right: 8px; } .d2l-ie-warning-banner-button { margin-left: auto; padding-left: 3.6rem; } [dir='rtl'] .d2l-ie-warning-banner-button { margin-left: 0; margin-right: auto; padding-left: 0; padding-right: 3.6rem; } @media (max-width: 1000px) { .d2l-ie-warning-banner-button { padding-left: 2.4rem; } [dir='rtl'] .d2l-ie-warning-banner-button { padding-right: 2.4rem; } } @media (max-width: 750px) { .d2l-ie-warning-banner-button { margin-left: 0; margin-right: auto; padding-left: 2.1rem; padding-bottom: 0.3rem; } [dir='rtl'] .d2l-ie-warning-banner-button { margin-left: auto; margin-right: 0; padding-left: 0; padding-right: 2.1rem; } }.d2l-xspl-box { width: 370px; min-height: 173px; } .xspl-block-link { text-decoration: none; color: #888888 !important; font-size: 0.85em; font-style: italic; cursor: pointer; outline: none !important; background-image:url('../../../d2l/img/lp/xspl/48.png'); background-position: left center; background-repeat: no-repeat; padding-left: 15px; } .xspl-block-link:hover, .xspl-block-link:focus { text-decoration: underline; } .xspl-container { background-color: #F8F8F8; padding: 12px; border: 1px solid #CCCCCC; box-shadow: inset 2px 4px 4px 0px rgba(0,0,0,.08); border-radius: 4px; }
resource1/1124/d2l/common/css/2.css
.form-group.date_start { display: none; } .form-group.date_due { display: none; } .form-group.date_post { display: none; } .form-group.peermark-product { display: none; } .control-label[for=instructions] { display: none; } #instructions { display: none; }
resource1/1124/d2l/common/css/3.css
table.d_g tr.fgskip td { height: 1px; line-height: 1px; padding: 0; font-size: 1px; border-style: none; } table.d2l-grid td.d_gn, table.d2l-grid th.d_gn { white-space: nowrap; } .d2l-grid-wrapper .d_g.d_gd, .d2l-grid-wrapper .d_g.d_gl { padding-bottom: 0; } table.d_gd td.d_gact { border: 0; padding: 3px 3px 3px 0; white-space: nowrap; } table.d_gl td.d_gact { border-bottom-width: 0; border-top-width: 0; white-space: nowrap; } table.d_gn td.d_gact { background-color: #f5f5f5; border-bottom: solid 1px #bbb; border-top: solid 1px #bbb; padding: 3px 3px 3px 0; white-space: nowrap; } .d_gact.d_gd td.d_gact, .d_gact.d_gl td.d_gact { padding: 0.5rem 1.5rem; } .daylight .d_gact.d_gd td.d_gact.d_gacte, .daylight .d_gact.d_gl td.d_gact.d_gacte { padding: 1.5rem 1rem; width: 12px; } .daylight .d_gact.d_gd td.d_gact, .daylight .d_gact.d_gl td.d_gact { padding-left: 8px; } [dir='rtl'].daylight .d_gact.d_gd td.d_gact, [dir='rtl'].daylight .d_gact.d_gl td.d_gact { padding-right: 8px; } .daylight .d_gact.d_gd td.d_gact span.di_t, .daylight .d_gact.d_gl td.d_gact span.di_t, .daylight .d_gact.d_gd td.d_gact .d2l-grid-actions-container > d2l-action-button-group, .daylight .d_gact.d_gl td.d_gact .d2l-grid-actions-container > d2l-action-button-group { font-size: 16px; font-weight: 400; } .daylight .d_gact.d_gd td.d_gact a.di_l, .daylight .d_gact.d_gl td.d_gact a.di_l { color: #494c4e; } .daylight .d_gact.d_gd td.d_gact a.di_l:hover, .daylight .d_gact.d_gl td.d_gact a.di_l:hover, .daylight .d_gact.d_gd td.d_gact a.di_l:focus, .daylight .d_gact.d_gl td.d_gact a.di_l:focus { color: #004489; text-decoration: underline; } table.d_gact { width:100%; border-collapse:collapse; padding:0; } .daylight table.d_gact td.d_gs { white-space:normal; padding-left:0; } .daylight .d2l-grid tr[header] .d_gs { width: 1px; } .daylight table.d_gact td.d_gs.d2l-select-above-table { padding-left: 22px; } [dir='rtl'].daylight table.d_gact td.d_gs.d2l-select-above-table input.d2l-checkbox { margin-right: 0px; } .daylight table.d_gact td.d_gs span.di_t { margin: 0; } table.d_gact td.d_gs input.d2l-checkbox { margin-bottom:1px; margin-right:15px } table.d_gact td.d_gs .d2l-grid-action-wrapper { display: inline-block; } table.d_gact td.d_gp { text-align:center; width:100%; } table.d_gact td.d_gn { text-align:right; white-space:nowrap; } .d2l-grid-actions-container { display: flex; position: relative; } .d2l-grid-actions-container > d2l-action-button-group { -webkit-flex: 1; -ms-flex: 1 0 auto; flex: 1; } table.d_g tr td.d_gtsl, table.d2l-grid tr td.d_gtsl { vertical-align:top; padding:.2em .3em .3em 0; white-space:nowrap; } table.d_g tr td.d_gtsr, table.d2l-grid tr td.d_gtsr { vertical-align:top; padding:5px 0 .3em 0; } a.d_gt { text-decoration:none; } .d_g_display_none { display: none !important; } table.d_g td.d_gsearch { text-align:left; padding-right:0; padding-left:0; padding-top: 0; white-space: nowrap; border: none; } table.d_dgsearch { width: 100%; } .daylight .d_g.d_gd, .daylight .d_g.d_gl { border-spacing: 0; border-collapse: separate; display: table; width: 100%; } .daylight .d_g.d_gd tbody > tr, .daylight .d_g.d_gl tbody > tr { border: none; } .daylight .d_g.d_gd >:only-child .d_hch a, .daylight .d_g.d_gl >:only-child .d_hch a { text-decoration: none; color: inherit; } .daylight .d_g.d_gd >:only-child .d_hch a:hover, .daylight .d_g.d_gl >:only-child .d_hch a:hover { text-decoration: underline; } .daylight .d_g.d_gd > :only-child > tr:not(.d_gactr):not(.d_gh), .daylight .d_g.d_gl > :only-child > tr:not(.d_gactr):not(.d_gh) { background-color: #ffffff; border: none; } .daylight .d_g.d_gd >:only-child > tr:not(.d_gactr):not(.d_gh) th, .daylight .d_g.d_gl >:only-child > tr:not(.d_gactr):not(.d_gh) th { white-space: nowrap; } .daylight .d2l-grid[type=data] >:only-child > tr[header] > th, .daylight .d2l-grid[type=list] >:only-child > tr[header] > th { padding: 0.5rem 1rem; } .daylight .d2l-grid[type=data] >:only-child > tr > th.d_gn, .daylight .d2l-grid[type=list] >:only-child > tr > th.d_gn { white-space: nowrap; } .daylight .d2l-grid[type=data] >:only-child > tr > td, .daylight .d2l-grid[type=list] >:only-child > tr > td, .daylight .d2l-grid[type=data] >:only-child > tr > th, .daylight .d2l-grid[type=list] >:only-child > tr > th { padding: 0.5rem 1rem; } .daylight .d2l-grid[type=data] > :only-child > tr > td.d_gd_sel, .daylight .d2l-grid[type=list] > :only-child > tr > td.d_gd_sel { width: 1px; } .daylight .d2l-grid[type=data] > :only-child > tr.d_ggl2 > td, .daylight .d2l-grid[type=data] > :only-child > tr.d_ggl2 > th, .daylight .d2l-grid[type=list] > :only-child > tr.d_ggl2 > td, .daylight .d2l-grid[type=list] > :only-child > tr.d_ggl2 > th { background-color: #f9fbff; } .daylight .d2l-grid-container { padding-top: 1em; padding-bottom: 1.5em; } .daylight .d2l-grid-container-no-top-bottom-padding { padding-top: 0; padding-bottom: 0; } .daylight .d_g_treeNodeImage { width: 1.5rem; } .daylight .d_ggl1 { background-color: #f9fbff; font-weight: 400; } @-webkit-keyframes vui-bubble-animation-multiaction-show { 0% { top: -2rem; opacity: 0; } 100% { top: -2.5rem; opacity: 1; } } @keyframes vui-bubble-animation-multiaction-show { 0% { top: -2rem; opacity: 0; } 100% { top: -2.5rem; opacity: 1; } } @keyframes vui-bubble-animation-multiaction-hide { 0% { opacity: 1; } 100% { opacity: 0; } } @-webkit-keyframes vui-bubble-animation-multiaction-hide { 0% { opacity: 1; } 100% { opacity: 0; } } .daylight .d2l-grid-actions-container .vui-validation-bubble-content { width: 180px; white-space: initial; word-wrap: break-word; position: relative; text-align: center; animation: vui-bubble-animation-multiaction-show 200ms ease forwards; -webkit-animation: vui-bubble-animation-multiaction-show 200ms ease forwards; top: -2.5rem; right: auto; } .daylight .d2l-grid-actions-container .vui-validation-bubble-content::before { top: 100%; border-width: 0.7rem 0.7rem 0 0.7rem; left: calc(50% - 0.7rem); right: auto; } .daylight .d2l-grid-actions-container .vui-validation-bubble-content.vui-validation-bubble-left::before { left: 20px; } .daylight .d2l-grid-actions-container .vui-validation-bubble-content.vui-validation-bubble-right::before { left: calc(100% - 48px); } .daylight .d2l-grid-actions-container .d_vb.vui-validation-bubble.vui-validation-bubble-show { bottom: 0; position: absolute; pointer-events: none; top: auto; right:auto; } .daylight .d2l-grid-actions-container .vui-validation-bubble-content.vui-validation-bubble-hide { animation: vui-bubble-animation-multiaction-hide 200ms ease forwards; -webkit-animation: vui-bubble-animation-multiaction-hide 200ms ease forwards; } .daylight table.d2l-grid td.d_gl, .daylight table.d2l-grid th.d_gl { text-align: left; } [dir='rtl'].daylight table.d2l-grid td.d_gl, [dir='rtl'].daylight table.d2l-grid th.d_gl { text-align: right; } table.d2l-grid td.d_gt, table.d2l-grid th.d_gt { vertical-align:top !important; } table.d2l-grid td.d_gb, table.d2l-grid th.d_gb { vertical-align: bottom !important; } table.d_g tr th.d_hch, table.d2l-grid th.d_hch { white-space:nowrap; } .daylight table.d2l-grid td.d_gc, .daylight table.d2l-grid th.d_gc { text-align: center; } .daylight table.d2l-grid td.d_gr, .daylight table.d2l-grid th.d_gr { text-align: right; } [dir='rtl'].daylight table.d2l-grid td.d_gr, [dir='rtl'].daylight table.d2l-grid th.d_gr { text-align: left; } .daylight table.d2l-grid tr.d_gdel label, .daylight table.d2l-grid tr.d_gdel th .d2l-link { text-decoration: line-through; opacity: 0.5; } .daylight .d2l-grid-row-unread td:first-child { background-image:url('../../../d2l/img/LP/grid/49.png'); background-repeat: repeat-y; } [dir="rtl"].daylight .d2l-grid-row-unread td:first-child { background-position: right top; } .daylight table.d2l-grid-responsive-actions .d_gactr td.d_gact { padding-left: 0; padding-right: 0; text-align: center; white-space: normal; } @media (max-width: 700px) { .daylight table.d2l-grid-responsive-actions .d2l-select-container:nth-of-type(2) { display: block; margin-top: 1rem; } } .daylight .d2l-grid-search-top-right-wrapper { float: right; padding-top: 0.3rem; width: initial; } [dir="rtl"].daylight .d2l-grid-search-top-right-wrapper { float: left; } .daylight .d2l-grid-actions-top-left-wrapper { float: left; width: initial; } [dir="rtl"].daylight .d2l-grid-actions-top-left-wrapper { float: right; } @media (max-width: 1100px) { .daylight .d2l-grid-search-top-right-wrapper { float: initial; padding-top: 0; width: 100%; } } .daylight table.d2l-table.d2l-grid.d_gd.d2l-fitted-table { width: 1%; white-space: nowrap; } .d_gempty .d2l-msg-container { margin: 0.5rem 0; }
resource1/1124/d2l/common/js/6.js
var D2LMicrosoftAjax=D2LMicrosoftAjax||{}; D2LMicrosoftAjax.Hijri={ticks1970:621355968E5,monthDays:[0,30,59,89,118,148,177,207,236,266,295,325,355],minDate:-425216736E5,maxDate:253402300799999,adjustment:0,toGregorian:function(hyear,hmonth,hday){var daysSinceJan0101=this.daysToYear(hyear)+this.monthDays[hmonth]+hday-1-this.adjustment;var gdate=new Date(daysSinceJan0101*864E5-this.ticks1970);gdate.setMinutes(gdate.getMinutes()+gdate.getTimezoneOffset());return gdate},fromGregorian:function(gdate){if(gdate<this.minDate||gdate>this.maxDate)return null; var ticks=this.ticks1970+(gdate-0)-gdate.getTimezoneOffset()*6E4,daysSinceJan0101=Math.floor(ticks/864E5)+1+this.adjustment;var hday,hmonth,hyear=Math.floor((daysSinceJan0101-227013)*30/10631)+1,absDays=this.daysToYear(hyear),daysInYear=this.isLeapYear(hyear)?355:354;if(daysSinceJan0101<absDays){hyear--;absDays-=daysInYear}else if(daysSinceJan0101===absDays){hyear--;absDays=this.daysToYear(hyear)}else if(daysSinceJan0101>absDays+daysInYear){absDays+=daysInYear;hyear++}hmonth=0;var daysIntoYear=daysSinceJan0101- absDays;while(hmonth<=11&&daysIntoYear>this.monthDays[hmonth])hmonth++;hmonth--;hday=daysIntoYear-this.monthDays[hmonth];return[hyear,hmonth,hday]},daysToYear:function(year){var yearsToYear30=Math.floor((year-1)/30)*30,yearsInto30=year-yearsToYear30-1,days=Math.floor(yearsToYear30*10631/30)+227013;while(yearsInto30>0){days+=this.isLeapYear(yearsInto30)?355:354;yearsInto30--}return days},isLeapYear:function(year){return(year*11+14)%30<11}};var D2LMicrosoftAjax=D2LMicrosoftAjax||{}; D2LMicrosoftAjax.UmAlQura={_yearInfo:[[746,-21987072E5],[1769,-21681216E5],[3794,-21374496E5],[3748,-21067776E5],[3402,-2076192E6],[2710,-20456064E5],[1334,-20150208E5],[2741,-19844352E5],[3498,-19537632E5],[2980,-19230912E5],[2889,-18925056E5],[2707,-186192E7],[1323,-18313344E5],[2647,-18007488E5],[1206,-17700768E5],[2741,-17394912E5],[1450,-17088192E5],[3413,-16782336E5],[3370,-16475616E5],[2646,-1616976E6],[1198,-15863904E5],[2397,-15558048E5],[748,-15251328E5],[1749,-14945472E5],[1706,-14638752E5], [1365,-14332896E5],[1195,-1402704E6],[2395,-13721184E5],[698,-13414464E5],[1397,-13108608E5],[2994,-12801888E5],[1892,-12495168E5],[1865,-12189312E5],[1621,-11883456E5],[683,-115776E7],[1371,-11271744E5],[2778,-10965024E5],[1748,-10658304E5],[3785,-10352448E5],[3474,-10045728E5],[3365,-9739872E5],[2637,-9434016E5],[685,-912816E6],[1389,-8822304E5],[2922,-8515584E5],[2898,-8208864E5],[2725,-7903008E5],[2635,-7597152E5],[1175,-7291296E5],[2359,-698544E6],[694,-667872E6],[1397,-6372864E5],[3434,-6066144E5], [3410,-5759424E5],[2710,-5453568E5],[2349,-5147712E5],[605,-4841856E5],[1245,-4536E8],[2778,-422928E6],[1492,-392256E6],[3497,-3616704E5],[3410,-3309984E5],[2730,-3004128E5],[1238,-2698272E5],[2486,-2392416E5],[884,-2085696E5],[1897,-177984E6],[1874,-147312E6],[1701,-1167264E5],[1355,-861408E5],[2731,-555552E5],[1370,-248832E5],[2773,57024E5],[3538,363744E5],[3492,670464E5],[3401,97632E6],[2709,1282176E5],[1325,1588032E5],[2653,1893888E5],[1370,2200608E5],[2773,2506464E5],[1706,2813184E5],[1685,311904E6], [1323,3424896E5],[2647,3730752E5],[1198,4037472E5],[2422,4343328E5],[1388,4650048E5],[2901,4955904E5],[2730,5262624E5],[2645,556848E6],[1197,5874336E5],[2397,6180192E5],[730,6486912E5],[1497,6792768E5],[3506,7099488E5],[2980,7406208E5],[2890,7712064E5],[2645,801792E6],[693,8323776E5],[1397,8629632E5],[2922,8936352E5],[3026,9243072E5],[3012,9549792E5],[2953,9855648E5],[2709,10161504E5],[1325,1046736E6],[1453,10773216E5],[2922,11079936E5],[1748,11386656E5],[3529,11692512E5],[3474,11999232E5],[2726, 12305088E5],[2390,12610944E5],[686,129168E7],[1389,13222656E5],[874,13529376E5],[2901,13835232E5],[2730,14141952E5],[2381,14447808E5],[1181,14753664E5],[2397,1505952E6],[698,1536624E6],[1461,15672096E5],[1450,15978816E5],[3413,16284672E5],[2714,16591392E5],[2350,16897248E5],[622,17203104E5],[1373,1750896E6],[2778,1781568E6],[1748,181224E7],[1701,18428256E5],[0,18734112E5]],minDate:-21987072E5,maxDate:1873411199999,toGregorian:function(hyear,hmonth,hday){var days=hday-1,gyear=hyear-1318;if(gyear<0|| gyear>=this._yearInfo.length)return null;var info=this._yearInfo[gyear],gdate=new Date(info[1]),monthLength=info[0];gdate.setMinutes(gdate.getMinutes()+gdate.getTimezoneOffset());for(var i=0;i<hmonth;i++){days+=29+(monthLength&1);monthLength=monthLength>>1}gdate.setDate(gdate.getDate()+days);return gdate},fromGregorian:function(gdate){var ticks=gdate-gdate.getTimezoneOffset()*6E4;if(ticks<this.minDate||ticks>this.maxDate)return null;var hyear=0,hmonth=1;while(ticks>this._yearInfo[++hyear][1]);if(ticks!== this._yearInfo[hyear][1])hyear--;var info=this._yearInfo[hyear],days=Math.floor((ticks-info[1])/864E5),monthLength=info[0];hyear+=1318;var daysInMonth=29+(monthLength&1);while(days>=daysInMonth){days-=daysInMonth;monthLength=monthLength>>1;daysInMonth=29+(monthLength&1);hmonth++}return[hyear,hmonth-1,days+1]}};window.D2L=window.D2L||{};window.D2L.LP=window.D2L.LP||{};window.D2L.LP.Web=window.D2L.LP.Web||{};window.D2L.LP.Web.UI=window.D2L.LP.Web.UI||{}; window.D2L.LP.Web.UI.Html=window.D2L.LP.Web.UI.Html||{};window.D2L.LP.Globalization=window.D2L.LP.Globalization||{Formatting:{Domain:{Default:{}}}};window.D2L.LP.LayeredArch=window.D2L.LP.LayeredArch||{};window.D2L.LE=window.D2L.LE||{};window.D2L.PT=window.D2L.PT||{};window.D2L.LOR=window.D2L.LOR||{};window.D2L.EP=window.D2L.EP||{};window.D2L.IM=window.D2L.IM||{};window.D2L.WCS=window.D2L.WCS||{};window.D2L.IsNotAnIframedApp=true; D2L.LP.Web.UI.Daylight={IsEnabled:function(){if(!document||!document.body||!document.body.classList)return true;return document.body.classList.contains("daylight")}};D2L.LP.Web.UI.Desktop={CompositeViews:{},Controls:{},MasterPages:{}}; D2L.LP.Web.UI.ObjectRepository={Get:function(key,subKey){var obj=D2L.LP.Web.UI.ObjectRepository.TryGet(key,subKey);if(obj===null)throw"'"+key+"'["+subKey+"] not found in object repository.";return obj},GetDictionary:function(key){if(D2L.OR[key]===undefined)return null;var resultDic={};for(var subKey in D2L.OR[key])resultDic[subKey]=D2L.LP.Web.Serialization.Json.Deserialize(D2L.OR[key][subKey]);return resultDic},HasKey:function(key){return D2L.OR[key]!==undefined},HasKeys:function(key,subKey){return D2L.OR[key]!== undefined&&D2L.OR[key][subKey]!==undefined},Remove:function(key,subKey){if(D2L.OR[key]===undefined)return;if(subKey===undefined)delete D2L.OR[key];else if(D2L.OR[key][subKey]!==undefined)delete D2L.OR[key][subKey]},RpcReceivePayloadProvider:function(data){if(data===undefined||data===null)return;for(var key in data)D2L.OR[key]=data[key]},TryClone:function(key,subKey,newKey,newSubKey){if(key===undefined||subKey===undefined||newKey===undefined||newSubKey===undefined)return false;if(D2L.OR[key]===undefined)return false; if(D2L.OR[newKey]===undefined)D2L.OR[newKey]={};D2L.OR[newKey][newSubKey]=D2L.OR[key][subKey];return true},TryGet:function(key,subKey){if(subKey===undefined)subKey="0";if(D2L.OR[key]===undefined||D2L.OR[key][subKey]===undefined)return null;return D2L.LP.Web.Serialization.Json.Deserialize(D2L.OR[key][subKey])}};D2L.O=function(key,subKey){return D2L.LP.Web.UI.ObjectRepository.Get(key,subKey)};D2L.OR={};D2L.Class=function(){};D2L.Class.prototype.Construct=function(){};D2L.Class.prototype.Dispose=function(){}; D2L.Class.prototype.AttachObject=function(obj,attrName,val){if(obj!==undefined&&obj!==null)obj[attrName]=val};D2L.Class.Create=function(def){var classDef=function(){if(arguments[0]!==D2L.Class)this.Construct.apply(this,arguments)};var proto=new this(D2L.Class);for(var n in def){var item=def[n];proto[n]=item}classDef.prototype=proto;return classDef}; D2L.Class.Extend=function(def){var classDef=function(){if(arguments[0]!==D2L.Class)this.Construct.apply(this,arguments)};var proto=new this(D2L.Class);var superClass=this.prototype;for(var n in def){var item=def[n];if(item instanceof Function)item.$=superClass;proto[n]=item}classDef.prototype=proto;classDef.extend=this.extend;classDef.Extend=this.extend;return classDef};D2L.Class.extend=D2L.Class.Extend; D2L.GarbageCollection={m_objects:[],Register:function(obj){this.m_objects.push(obj)},Dispose:function(){var length=this.m_objects.length;for(var i=0;i<length;i++)if(this.m_objects[i].Dispose)this.m_objects[i].Dispose()}};D2L.Class.prototype.Construct=function(doRegisterForDisposal){if(doRegisterForDisposal===undefined)doRegisterForDisposal=false;if(doRegisterForDisposal&&D2L.GarbageCollection!==undefined)D2L.GarbageCollection.Register(this)};D2L.LP.Web.UI.Events=D2L.LP.Web.UI.Events||{}; D2L.LP.Web.UI.Events.AggregateEvents=function(events,callback){var evt=new D2L.LP.Web.UI.Events.Event;var numTriggered=0;var handleTrigger=function(){numTriggered++;if(numTriggered>=events.length){if(callback!==undefined)callback();evt.Trigger()}};for(var i=0;i<events.length;i++){var e=events[i];if(e===undefined||e===null||e.HasTriggered===undefined||e.HasTriggered())handleTrigger();else e.AddListener(handleTrigger)}if(events.length===0)setTimeout(handleTrigger,0);return evt}; D2L.LP.Web.UI.Events.Event=D2L.Class.Create({Construct:function(argumentDelegate){this.m_callbacks=[];this.m_argumentDelegate=argumentDelegate;this.m_hasTriggered=false;this.m_releaseCallbacks=[]},AddListener:function(callback){this.m_callbacks.push(callback)},AddReleaseListener:function(callback){this.m_releaseCallbacks.push(callback)},HasTriggered:function(){return this.m_hasTriggered},RemoveListener:function(callback){for(var i=0;i<this.m_callbacks.length;i++)if(this.m_callbacks[i]===callback)this.m_callbacks.splice(i, 1)},Release:function(){for(var i=0;i<this.m_releaseCallbacks.length;i++)this.m_releaseCallbacks[i].apply(this.m_releaseCallbacks[i])},Trigger:function(){this.m_hasTriggered=true;var args=arguments;if(typeof this.m_argumentDelegate!=="undefined")args=this.m_argumentDelegate();for(var i=0;i<this.m_callbacks.length;i++){var result=this.m_callbacks[i].apply(this.m_callbacks[i],args);if(typeof result!=="undefined"&&result===false)return}}});D2L.LP.Web.UI.Events.OnLoad=D2L.LP.Web.UI.Events.OnLoad||new D2L.LP.Web.UI.Events.Event; D2L.LocalTime=D2L.Class.Create({Construct:function(hour,minute,second){var now=new Date;this.m_hour=hour!==undefined?hour:now.getHours();this.m_minute=minute!==undefined?minute:now.getMinutes();this.m_second=second!==undefined?second:now.getSeconds()},_deserialize:function(deserializer){this.m_hour=deserializer.GetMember("Hour");this.m_minute=deserializer.GetMember("Minute");this.m_second=deserializer.GetMember("Second")},_serialize:function(serializer){serializer.AddMember("Hour",this.m_hour);serializer.AddMember("Minute", this.m_minute);serializer.AddMember("Second",this.m_second)},GetHour:function(){return this.m_hour},GetMinute:function(){return this.m_minute},GetSecond:function(){return this.m_second}}); D2L.LocalDateTime=D2L.Class.Create({Construct:function(year,month,day,hour,minute,second){var now=new Date;this.m_year=year!==undefined?year:now.getFullYear();this.m_month=month!==undefined?month:now.getMonth()+1;this.m_day=day!==undefined?day:now.getDate();this.m_hour=hour!==undefined?hour:now.getHours();this.m_minute=minute!==undefined?minute:now.getMinutes();this.m_second=second!==undefined?second:now.getSeconds()},_deserialize:function(deserializer){this.m_year=deserializer.GetMember("Year"); this.m_month=deserializer.GetMember("Month");this.m_day=deserializer.GetMember("Day");this.m_hour=deserializer.GetMember("Hour");this.m_minute=deserializer.GetMember("Minute");this.m_second=deserializer.GetMember("Second")},_serialize:function(serializer){serializer.AddMember("Year",this.m_year);serializer.AddMember("Month",this.m_month);serializer.AddMember("Day",this.m_day);serializer.AddMember("Hour",this.m_hour);serializer.AddMember("Minute",this.m_minute);serializer.AddMember("Second",this.m_second)}, GetYear:function(){return this.m_year},GetMonth:function(){return this.m_month},GetDay:function(){return this.m_day},GetHour:function(){return this.m_hour},GetMinute:function(){return this.m_minute},GetSecond:function(){return this.m_second},GetDateString:function(){var ret;ret=this.GetYear();ret+=this.PadInt(this.GetMonth(),2);ret+=this.PadInt(this.GetDay(),2);ret+=this.PadInt(this.GetHour(),2);ret+=this.PadInt(this.GetMinute(),2);return ret},GetTimestamp:function(){var date=new Date(this.GetYear(), this.GetMonth()-1,this.GetDay(),this.GetHour(),this.GetMinute(),this.GetSecond(),0);return date.getTime()},PadInt:function(val,digits){var ret=val.toString();while(ret.length<digits)ret="0"+ret;return ret}});D2L.LocalDateTime.ToJavaScriptDate=function(localDateTime){return new Date(localDateTime.GetYear(),localDateTime.GetMonth()-1,localDateTime.GetDay(),localDateTime.GetHour(),localDateTime.GetMinute(),localDateTime.GetSecond(),0)}; D2L.LocalDateTime.FromJavaScriptDate=function(jsDate){return new D2L.LocalDateTime(jsDate.getFullYear(),jsDate.getMonth()+1,jsDate.getDate(),jsDate.getHours(),jsDate.getMinutes(),jsDate.getSeconds())}; D2L.LocalDateTime.Compare=function(first,second,ignoreTime){if(ignoreTime){first=new D2L.LocalDateTime(first.GetYear(),first.GetMonth(),first.GetDay());second=new D2L.LocalDateTime(second.GetYear(),second.GetMonth(),second.GetDay())}var firstJsDate=D2L.LocalDateTime.ToJavaScriptDate(first);var secondJsDate=D2L.LocalDateTime.ToJavaScriptDate(second);if(firstJsDate<secondJsDate)return-1;else if(firstJsDate>secondJsDate)return 1;else return 0};D2L.LP.Web.Serialization={Json:{},Url:{}}; D2L.LP.Web.Serialization.Serializer=D2L.Class.Extend({Construct:function(){this.m_scopeString="";this.m_values=[]},AddMember:function(name,value){var type=typeof value;if(type==="undefined"||type==="function")return;if(type==="number"||type==="boolean"||type==="string"||value===null)this.m_values.push([this.m_scopeString+name,value]);else if(D2L.LP.Web.UI.Html.JavaScript.IsArray(value)){var isObjArray=value.length>0&&typeof value[0]==="object";for(var i=0;i<value.length;i++)if(isObjArray&&i>0)this.AddMember(name+ "`"+i,value[i]);else this.AddMember(name,value[i])}else if(type==="object"){this.m_scopeString+=name+"$";if(value._serialize!==undefined)value._serialize(this);else for(var key in value)this.AddMember(key,value[key]);this.m_scopeString=this.m_scopeString.substr(0,this.m_scopeString.length-(name.length+1))}},GetMembers:function(){return this.m_values}}); D2L.LP.Web.Serialization.Json.Deserialize=function(jsonString){if(jsonString===undefined||jsonString===null||typeof jsonString!=="string")return undefined;var typeReviver=function(value){var type=D2L.LP.Web.Serialization.Json.GetType(this,value._type);if(type!==undefined&&type.func!==undefined){var obj=new type.func;if(obj._deserialize!==undefined){obj._deserialize(new D2L.LP.Web.Serialization.Json.Deserializer(value));value=obj}}return value};var functionReviver=function(value){return D2L.LP.Web.Serialization.Json.FunctionReviver(this, value)};var dictionaryReviver=function(value){return D2L.LP.Web.Serialization.Json.DictionaryReviver(this,value)};var normalizeType=function(t){if(t=="url")return"D2L.LP.Web.Http.UrlLocation";else if(t=="id")return"D2L.LP.Web.UI.Html.AbsoluteHtmlId";return t};var json=JSON.parse(jsonString,function(key,value){if(value===undefined||value===null||value._type===undefined)return value;var ret;value._type=normalizeType(value._type);if(value._type=="D2L.LP.Util.Dictionary")ret=dictionaryReviver(value); else if(value._type=="call"){ret=functionReviver(value);ret._isCall=true}else if(value._type=="func")ret=functionReviver(value);else if(value._type=="pipe"){value.N="D2L.LP.Web.UI.Html.JavaScript.CallFunctionPipeline";value.D=true;ret=functionReviver(value)}else ret=typeReviver(value);return ret});return json}; D2L.LP.Web.Serialization.Json.Deserializer=D2L.Class.Create({Construct:function(json){this.m_json=json},GetMember:function(name,defaultValue){return this.HasMember(name)?this.m_json[name]:defaultValue},HasMember:function(name){return this.m_json[name]!==undefined}}); D2L.LP.Web.Serialization.Json.GetType=function(type,typeString){var typeSegments=typeString.replace(/\+/g,".").split(".");var prevType=type;for(var i=0;i<typeSegments.length;i++){if(type[typeSegments[i]]===undefined)return undefined;prevType=type;type=type[typeSegments[i]]}if(i!=typeSegments.length)return undefined;return{obj:prevType,func:type}}; D2L.LP.Web.Serialization.Json.FunctionReviver=function(win,value){var type=D2L.LP.Web.Serialization.Json.GetType(win,value.N);if(type===undefined)throw"Unrecognized function '"+value.N+"'.";if(value.P===undefined)value.P=[];var isParamDelayed=false;for(var i=0;i<value.P.length;i++){var p=value.P[i];if(p!==undefined&&p!==null&&p._isDelayed===true){isParamDelayed=true;break}}var fixParam=D2L.LP.Web.Serialization.Json.FunctionReviver.FixParam;var retFunc=function(){var evt=new D2L.LP.Web.UI.Events.Event; evt._isDelayed=true;var isDelayed=value.D===true;var params=[];var args=arguments;var callFunction=function(){for(var i=0;i<args.length;i++)params.push(args[i]);if(type.func.apply===undefined){evt.Release();throw"'"+value.N+"' is not a function.";}return type.func.apply(type.obj,params)};if(!isDelayed&&!isParamDelayed){for(var i=0;i<value.P.length;i++)params.push(fixParam(value.P[i]));return callFunction()}var finish=function(){if(isDelayed){var result=callFunction();if(result){result.AddListener(function(val){evt.Trigger(val)}); result.AddReleaseListener(function(){evt.Release()})}else evt.Release()}else evt.Trigger(callFunction())};var buildParam=function(index){if(index==value.P.length){finish();return}var p=value.P[index];if(p===undefined||p===null||p._isDelayed===undefined||p._isDelayed===false){params.push(fixParam(p));buildParam(++index);return}if(p._isCall===true)p=p();p.AddListener(function(val){params.push(fixParam(val));buildParam(++index)});p.AddReleaseListener(function(){evt.Release()})};setTimeout(function(){buildParam(0)}, 0);return evt};if(value._type=="call")retFunc._isDelayed=value.D===true||isParamDelayed;return retFunc};D2L.LP.Web.Serialization.Json.FunctionReviver.FixParam=function(p){if(p===undefined||p===null)return p;if(typeof p=="object"){var origP=p;p=new p.constructor;for(var key in origP)p[key]=D2L.LP.Web.Serialization.Json.FunctionReviver.FixParam(origP[key])}if(p._isCall)p=p();return p}; D2L.LP.Web.Serialization.Json.DictionaryReviver=function(win,dict){delete dict["_type"];var isDelayed=false;var dictKeys=[];var newDict={};for(var key in dict){var val=dict[key];dictKeys.push(key);if(val!==undefined&&val!==null&&val._isDelayed===true)isDelayed=true}if(!isDelayed)return dict;var fixParam=D2L.LP.Web.Serialization.Json.FunctionReviver.FixParam;var evt=new D2L.LP.Web.UI.Events.Event;evt._isDelayed=true;var buildParam=function(index){if(index==dictKeys.length){evt.Trigger(newDict);return}var p= dict[dictKeys[index]];if(p===undefined||p===null||p._isDelayed===undefined||p._isDelayed===false){newDict[dictKeys[index]]=fixParam(p);buildParam(++index);return}if(p._isCall===true)p=p();p.AddListener(function(v){newDict[dictKeys[index]]=fixParam(v);buildParam(++index)});p.AddReleaseListener(function(){evt.Release()})};setTimeout(function(){buildParam(0)},0);return evt};if(!this.JSON)this.JSON={}; (function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i, k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function")value=value.toJSON(key);if(typeof rep==="function")value=rep.call(holder,key,value);switch(typeof value){case "string":return quote(value);case "number":return isFinite(value)?String(value):"null";case "boolean":case "null":return String(value);case "object":if(!value)return"null";gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length; for(i=0;i<length;i+=1)partial[i]=str(i,value)||"null";v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v)partial.push(quote(k)+(gap?": ":":")+v)}}}else for(k in value)if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v)partial.push(quote(k)+(gap?": ":":")+v)}v=partial.length===0?"{}":gap?"{\n"+gap+ partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function")JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number")for(i=0;i<space;i+=1)indent+=" ";else if(typeof space==="string")indent=space;rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number"))throw new Error("JSON.stringify");return str("",{"":value})};if(typeof JSON.parse!=="function")JSON.parse= function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object")for(k in value)if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined)value[k]=v;else delete value[k]}return reviver.call(holder,key,value)}text=String(text);cx.lastIndex=0;if(cx.test(text))text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse");}})();D2L.LP.Web.Serialization.Url.Serialize=function(value){if(value===undefined||value===null)return"";if(typeof value!=="object")return value.toString();var serializer=new D2L.LP.Web.Serialization.Url.Serializer;for(var key in value)serializer.AddMember(key,value[key]);return serializer.Serialize()}; D2L.LP.Web.Serialization.Url.Serializer=D2L.LP.Web.Serialization.Serializer.Extend({Construct:function(){arguments.callee.$.Construct.call(this)},Serialize:function(){var ret="";var delim="";var values=this.GetMembers();for(var i=0;i<values.length;i++){var kvp=values[i];ret+=delim+D2L.LP.Web.UI.Html.JavaScript.UrlEncode(kvp[0])+"="+D2L.LP.Web.UI.Html.JavaScript.UrlEncode(kvp[1]);delim="&"}return ret}});D2L.LP.Web.Http={};D2L.LP.Web.Http.ILocation=function(){}; D2L.LP.Web.Http.ILocation.prototype.GetUrl=function(){}; D2L.LP.Web.Http.UrlLocation=D2L.Class.Create({Construct:function(url){if(url===undefined||url===null)url="";this.m_url=url},_deserialize:function(deserializer){this.m_url=deserializer.GetMember("Url")},_serialize:function(serializer){serializer.AddMember("Url",this.m_url)},GetUrl:function(){return this.m_url},WithQueryString:function(param,value){var url=this.m_url;var delim=url.indexOf("?",0)==-1?"?":"&";var serializer=new D2L.LP.Web.Serialization.Url.Serializer;serializer.AddMember(param,value); var serializedValue=serializer.Serialize();url+=delim+serializedValue;return new D2L.LP.Web.Http.UrlLocation(url)},HasQueryString:function(param){param=param.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var regex=new RegExp("[\\?&]"+param+"=([^&#]*)");return regex.test(this.m_url)},RemoveQueryString:function(name){name=name.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var regex=new RegExp("([\\?&])"+name+"=([^&#]*)");if(!regex.test(this.m_url))return;var pos=0;var url=this.m_url.replace(regex,function(match, p1,p2,offset){pos=offset;return p1});if(url.length>pos&&url[pos+1]=="&")url=url.substr(0,pos+1)+url.substr(pos+2);else url=url.substr(0,url.length-1);this.m_url=url}});D2L.LP.Web.Http.UrlLocation.Create=function(url,query){var urlLocation=new D2L.LP.Web.Http.UrlLocation(url);for(var key in query)urlLocation=urlLocation.WithQueryString(key,query[key]);return urlLocation}; D2L.LP.Web.Mvc={RouteLocation:{Create:function(pattern,query,route){for(var key in route)pattern=pattern.replace(new RegExp("{"+key+"}","gi"),D2L.LP.Web.UI.Html.JavaScript.UrlEncode(route[key]));var url=new D2L.LP.Web.Http.UrlLocation(pattern);for(var key in query)url=url.WithQueryString(key,query[key]);return url}}}; D2L.LP.Web.UI.FlashMessages={RpcReceivePayloadProvider:function(data){var win=window;while(win!==win.parent&&D2L.LP.Web.UI.Html.Dom.HasSafeParent(win)&&win.parent.D2L!==undefined&&win.parent.D2L.LP!==undefined&&win.parent.D2L.LP.Web!==undefined&&win.parent.D2L.LP.Web.UI!==undefined&&win.parent.D2L.LP.Web.UI.FlashMessages!==undefined)win=win.parent;if(D2L.LP.Web.UI.Flags.Flag("US116579-toasts",true)){var div=win.document.createElement("div");div.innerHTML=data;var node=win.document.body.appendChild(div.firstChild); win.D2L.LP.Web.UI.Events.OnViewRender.Trigger(node);return}var $data=$(data);win.document.body.appendChild($data.get(0));win.D2L.LP.Web.UI.Events.OnViewRender.Trigger($data.get(0))}};D2L.LP.Web.UI.Rpc={ReceivePayloadProviders:{},SendPayloadProviders:{}}; D2L.LP.Web.UI.Rpc.Initialize=function(loginUrl,message,sendPayloadProviders,receivePayloadProviders){if(sendPayloadProviders!==undefined)D2L.LP.Web.UI.Rpc.SendPayloadProviders=sendPayloadProviders;if(receivePayloadProviders!==undefined)D2L.LP.Web.UI.Rpc.ReceivePayloadProviders=receivePayloadProviders;D2L.LP.Web.UI.Rpc.OnFailure.AddListener(function(args){var reason=args.reason;var keepAlive=args.keepAlive;if(reason===D2L.LP.Web.UI.Rpc.FailureReasons.NotAuthenticated){if(keepAlive!==undefined&&keepAlive)location.href= loginUrl.GetUrl()}else alert(message)})}; D2L.LP.Web.UI.Rpc.Connect=function(verb,loc,params,options){var ret=new D2L.LP.Web.UI.Events.Event;if(verb===undefined||verb===null||verb!="GET"&&verb!="POST")throw"Invalid RPC verb: '"+verb+"'.";if(loc===undefined||loc===null)throw"Invalid RPC location: '"+loc+"'.";if(options===undefined||options===null)options={};if(params===undefined||params===null)params={};for(var key in params)if(params[key]===null)delete params[key];loc=loc.GetUrl();var complete=false;var timedOut=false;var isSynchronous=options.isSynchronous|| false;var fail=function(showErrorMsg){ret.Trigger(false);if(showErrorMsg===undefined)showErrorMsg=true;var errorMsg=function(){D2L.LP.Web.UI.Rpc.OnFailure.Trigger({reason:D2L.LP.Web.UI.Rpc.FailureReasons.Unknown})};if(options.failure!==undefined){var result=options.failure.call(options.failure);var isDelayedReturn=typeof result!=="undefined"?result.Trigger!==undefined:false;var delayedReturnListener=function(returnVal){this.Trigger(returnVal);if(returnVal!==true)errorMsg()};if(result===true)showErrorMsg= false;else if(isDelayedReturn){showErrorMsg=false;result.AddListener(delayedReturnListener)}}if(showErrorMsg)errorMsg()};var xhr=new XMLHttpRequest;var handleXhrResult=function(xhrResult){if(timedOut||xhrResult.readyState!=4)return undefined;complete=true;if(xhrResult.status==200){var response=xhrResult.responseText.trim();var events=[];if(response.length>0){var payload;try{payload=D2L.LP.Web.Serialization.Json.Deserialize(response.substr(9))}catch(e){throw"Unable to parse JSON response: "+response; }if(payload.Redirect){D2L.LP.Web.UI.Html.Dom.Navigate(payload.Location);return}var receivePayloadProviders=D2L.LP.Web.UI.Rpc.ReceivePayloadProviders;for(var key in receivePayloadProviders)if(payload.Data[key]!==undefined)events.push(receivePayloadProviders[key].call(receivePayloadProviders[key],payload.Data[key]));response=payload.Payload}D2L.LP.Web.UI.Events.AggregateEvents(events,function(){ret.Trigger(true);if(typeof options.success!=="undefined")options.success.call(options.success,response)}); return response}else{if(xhrResult.status==403&&xhrResult.responseText=="Not authenticated."){ret.Release();if(options.notAuthenticated!==undefined)options.notAuthenticated.call(options.notAuthenticated);else D2L.LP.Web.UI.Rpc.OnFailure.Trigger({reason:D2L.LP.Web.UI.Rpc.FailureReasons.NotAuthenticated,keepAlive:options.keepAlive});return undefined}var showError=xhrResult.status!=0;fail(showError);return undefined}};if(!isSynchronous)xhr.onreadystatechange=function(){handleXhrResult(xhr)};var sendPayloadProviders= D2L.LP.Web.UI.Rpc.SendPayloadProviders;for(var key in sendPayloadProviders)sendPayloadProviders[key].call(sendPayloadProviders[key],params);var serializeParametersAndSend=function(xsrfToken){params["isXhr"]="true";params["requestId"]=D2L.LP.Web.UI.Rpc.GetUniqueRequestId();if(xsrfToken)params[D2L.LP.Web.Authentication.Xsrf.GetXsrfTokenParameterName()]=xsrfToken;if(options.keepAlive!==undefined&&!options.keepAlive)params["X-D2L-Session"]="no-keep-alive";var serializedParams=D2L.LP.Web.Serialization.Url.Serialize(params); if(verb==D2L.LP.Web.UI.Rpc.Verbs.GET){var sep=loc.indexOf("?")>-1?"&":"?";loc+=sep+serializedParams}xhr.open(verb,loc,!isSynchronous);var data=undefined;if(verb==D2L.LP.Web.UI.Rpc.Verbs.POST){xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");data=serializedParams}if(options.includeXsrfHeader!==undefined&&options.includeXsrfHeader)xhr.setRequestHeader("X-Csrf-Token",D2L.LP.Web.Authentication.Xsrf.GetXsrfToken());if(options.timeout!==undefined)setTimeout(function(){if(complete)return; timedOut=true;fail()},options.timeout);xhr.send(data)};if(verb==D2L.LP.Web.UI.Rpc.Verbs.POST){var xsrfToken=D2L.LP.Web.Authentication.Xsrf.GetXsrfToken();serializeParametersAndSend(xsrfToken)}else serializeParametersAndSend(null);if(isSynchronous)return handleXhrResult(xhr);return ret}; D2L.LP.Web.UI.Rpc.ConnectPartial=function(placeholderId,verb,loc,params,options){if(options===undefined||options===null)options={};if(params===undefined||params===null)params={};var ret=new D2L.LP.Web.UI.Events.Event;params["_d2l_prc"]=D2L.LP.Web.UI.Html.PartialRendering.GetPartialRenderContext(placeholderId.GetValue());D2L.LP.Web.UI.Rpc.Connect(verb,loc,params,{success:function(result){ret.Trigger(result);if(typeof options.success!=="undefined")options.success.call(options.success)},failure:function(){ret.Trigger(false); if(options.failure!==undefined)options.failure.call(options.failure)},keepAlive:options.keepAlive,timeout:6E4,notAuthenticated:function(){D2L.LP.Web.UI.Rpc.OnFailure.Trigger({reason:D2L.LP.Web.UI.Rpc.FailureReasons.NotAuthenticated})}});return ret}; D2L.LP.Web.UI.Rpc.CreateHistoryConnectPartial=function(verb,loc,params,options){var connectPartial0=function(placeholderId){var connectPartial=function(){return D2L.LP.Web.UI.Rpc.ConnectPartial(placeholderId,verb,loc,params,options)};return connectPartial};return connectPartial0};D2L.LP.Web.UI.Rpc.GetUniqueRequestId=function(){var me=D2L.LP.Web.UI.Rpc;if(me.m_requestIdCounter===undefined)me.m_requestIdCounter=1;me.m_requestIdCounter++;return me.m_requestIdCounter}; D2L.LP.Web.UI.Rpc.ConnectObject=function(verb,loc,params,options){var ret=new D2L.LP.Web.UI.Events.Event;if(options===undefined)options={};options.success=function(result){ret.Trigger(result)};var connectRet=D2L.LP.Web.UI.Rpc.Connect(verb,loc,params,options);connectRet.AddListener(function(result){if(result===false)ret.Trigger(false)});connectRet.AddReleaseListener(function(){ret.Release()});return ret}; D2L.LP.Web.UI.Rpc.ConnectObjectSynchronous=function(verb,loc,params,options){if(options===undefined)options={};options.isSynchronous=true;var ret=D2L.LP.Web.UI.Rpc.Connect(verb,loc,params,options);return ret}; D2L.LP.Web.UI.Rpc.SendBeacon=function(location,data){if(navigator.sendBeacon){var formData=new FormData;formData.append(D2L.LP.Web.Authentication.Xsrf.GetXsrfTokenParameterName(),D2L.LP.Web.Authentication.Xsrf.GetXsrfToken());if(data)for(var key in data)formData.append(key,data[key]);navigator.sendBeacon(location.GetUrl(),formData)}else D2L.LP.Web.UI.Rpc.Connect(D2L.LP.Web.UI.Rpc.Verbs.POST,location,data)};D2L.LP.Web.UI.Rpc.Verbs={GET:"GET",POST:"POST"};D2L.LP.Web.UI.Rpc.OnFailure=new D2L.LP.Web.UI.Events.Event; D2L.LP.Web.UI.Rpc.FailureReasons={Unknown:1,NotAuthenticated:2};D2L.Files={RestrictedExtensions:[],TypeInfos:null,TypeInfosDr:null}; D2L.Control=D2L.Class.extend({Construct:function(doRegisterForDisposal){arguments.callee.$.Construct.call(this,doRegisterForDisposal);this.IDomNode=null;this.IChildrenDomNode=null;this.isD2LControl=true;this.m_children=[];this.m_hasDomBeenBuilt=false;this.m_isIntegrated=false;this.m_nextSibling=null;this.m_previousSibling=null;this.m_parent=null;this.m_window=window;this.m_ignoreTransformEvent=false;this.m_mappedId="";this.m_controlId=new D2L.Control.Id;this.OnChildAdd=new D2L.EventHandler;this.OnChildRemove= new D2L.EventHandler;this.OnChildRemoveStructure=new D2L.EventHandler;this.OnDomInsertion=new D2L.EventHandler;this.m_parentChangeEvent=new D2L.EventHandler},AppendChild:function(node,sourceDomNode){return this.InsertBefore(node,undefined,sourceDomNode)},AppendChildren:function(children,sourceDomNode){this.m_ignoreTransformEvent=true;for(var i=0;i<children.length;i++){if(i==children.length-1)this.m_ignoreTransformEvent=false;this.AppendChild(children[i],sourceDomNode)}this.m_ignoreTransformEvent= false},AppendTo:function(parentNode){if(parentNode){if(parentNode.d2l_win!==undefined)this.SetWindow(parentNode.d2l_win);if(!this.m_hasDomBeenBuilt)this.BuildDom();if(parentNode.isD2LControl)parentNode.AppendChild(this);else if(parentNode.appendChild){parentNode.appendChild(this.IDomNode);this.OnDomInsertion.Trigger()}}},BuildDom:function(){this.m_hasDomBeenBuilt=true},Children:function(){return this.m_children},ChildrenDomNode:function(){return this.IChildrenDomNode?this.IChildrenDomNode:this.IDomNode}, CreateCell:function(row,index){if(index===undefined)index=-1;var cell=row.insertCell(index);this.AttachObject(cell,"d2l_win",this.GetWindow());return cell},CreateElement:function(elementName,extensionCustomType){return this.GetUI().CreateElement(elementName,extensionCustomType)},CreateTextNode:function(text){return this.GetUI().CreateTextNode(text)},GetControlId:function(){return this.m_controlId},GetDomNode:function(){if(this.IDomNode===null&&this.m_mappedId.length>0)this.IDomNode=UI.GetById(this.GetMappedId()); return this.IDomNode},GetMappedId:function(){if(this.m_mappedId.length===0)if(this.IDomNode!==null&&this.IDomNode.id.length>0)this.m_mappedId=this.IDomNode.id;else this.m_mappedId=UI.GetUniqueHtmlId();return this.m_mappedId},GetUI:function(){return this.GetWindow()["UI"]},GetWindow:function(){if(this.Parent())return this.Parent().GetWindow();else return this.m_window},IsRendered:function(){return this.m_hasDomBeenBuilt},Integrate:function(parent,IDomNode){this.IntegrateChild(parent,IDomNode)},IntegrateChild:function(parent, IDomNode){if(parent){this.m_parent=parent;this.ParentChangeEvent().Trigger(parent);if(parent.m_children.length>0){parent.m_children[parent.m_children.length-1].m_nextSibling=this;this.m_previousSibling=parent.m_children[parent.m_children.length-1]}parent.m_children.push(this)}if(IDomNode){this.IDomNode=IDomNode;this.AttachObject(this.IDomNode,"ID2L",this);this.m_hasDomBeenBuilt=true}},IntegrateControlInfo:function(controlInfo,isRendered){if(this.IsIntegrated())return;this.m_isIntegrated=true;if(isRendered=== undefined)isRendered=true;this.m_hasDomBeenBuilt=isRendered;if(isRendered&&this.GetDomNode()!==null)this.AttachObject(this.GetDomNode(),"ID2L",this)},IntegrateControl:function(controlInfo,isRendered){this.IntegrateControlInfo(controlInfo,isRendered)},IntegrateControlMin:function(controlInfo,isRendered){this.IntegrateControlInfo(controlInfo,isRendered)},InsertBefore:function(child,beforeChild,sourceDomNode){if(!child||child===undefined||child===null)return null;if(!child.isD2LControl){var control= new D2L.Control;control.IDomNode=child;control.m_hasDomBeenBuilt=true;child=control}if(child.Parent()==this)child=this.RemoveChildStructure(child);if(!this.m_hasDomBeenBuilt)this.BuildDom();if(sourceDomNode===undefined)sourceDomNode=this.ChildrenDomNode();if(beforeChild&&!beforeChild.m_hasDomBeenBuilt)beforeChild.BuildDom();var i;var beforePos=-1;if(beforeChild)for(i=0;i<this.m_children.length;i++)if(this.m_children[i]==beforeChild){beforePos=i;break}if(beforeChild&&(beforePos==-1||beforeChild.IDomNode.parentNode!= sourceDomNode)){beforeChild=null;beforePos=-1}child.m_parent=this;child.ParentChangeEvent().Trigger(this);if(beforePos>-1){if(this.m_children[beforePos].m_previousSibling){this.m_children[beforePos].m_previousSibling.m_nextSibling=child;child.m_previousSibling=this.m_children[beforePos].m_previousSibling}this.m_children[beforePos].m_previousSibling=child;child.m_nextSibling=this.m_children[beforePos];this.m_children.splice(beforePos,0,child)}else{if(this.m_children.length>0){this.m_children[this.m_children.length- 1].m_nextSibling=child;child.m_previousSibling=this.m_children[this.m_children.length-1]}this.m_children.push(child)}if(!child.m_hasDomBeenBuilt)child.BuildDom();if(beforePos>-1){if(child.IDomNode.parentNode!=sourceDomNode){sourceDomNode.insertBefore(child.IDomNode,beforeChild.IDomNode);this.OnDomInsertion.Trigger()}}else if(child.IDomNode&&(!child.IDomNode.parentNode||child.IDomNode.parentNode!=sourceDomNode))try{if(child.IDomNode.tagName&&child.IDomNode.tagName.toLowerCase()!="tr"){sourceDomNode.appendChild(child.IDomNode); child.OnDomInsertion.Trigger()}}catch(e){}this.OnChildAdd.Trigger(new D2L.Event("ChildAdd",this),child);if(!this.m_ignoreTransformEvent){var transformEvent=new D2L.TransformEvent(child.IDomNode);transformEvent.Bubble()}return child},InsertSorted:function(child,isGreaterThan){var beforeChild;for(var i=0;i<this.Children().length;i++)if(isGreaterThan(this.Children()[i],child)){beforeChild=this.Children()[i];break}return this.InsertBefore(child,beforeChild)},IsFirstSibling:function(){return this.PreviousSibling()=== null},IsInDom:function(){try{var domNode=this.GetDomNode();if(domNode!==null){while(domNode.parentNode!==null)domNode=domNode.parentNode;return domNode==document}}catch(e){return false}return false},IsIntegrated:function(){return this.m_isIntegrated},IsLastSibling:function(){return this.NextSibling()===null},NextSibling:function(){return this.m_nextSibling},Parent:function(){return this.m_parent},ParentChangeEvent:function(){return this.m_parentChangeEvent},PreviousSibling:function(){return this.m_previousSibling}, Remove:function(fadeOut){if(fadeOut===undefined)fadeOut=undefined;if(this.IDomNode){var me=this;var doRemoval=function(){if(me.m_parent&&me.m_parent.isD2LControl)return me.m_parent.RemoveChild(me);else if(me.IDomNode.parentNode){if(me.IDomNode.parentNode.deleteRow)me.IDomNode.parentNode.deleteRow(me.IDomNode.rowIndex);else me.IDomNode=me.IDomNode.parentNode.removeChild(me.IDomNode);var transformEvent=new D2L.TransformEvent(me.IDomNode);transformEvent.Bubble()}};if(fadeOut){var myAnim=new YAHOO.util.Anim(this.IDomNode, {opacity:{to:0}},0.5);myAnim.onComplete.subscribe(function(){doRemoval()});myAnim.animate()}else doRemoval();return me}return null},RemoveChild:function(child){if(!child||child===undefined||child===null)return null;child=this.RemoveChildStructure(child);if(child)this.OnChildRemove.Trigger(new D2L.Event("ChildRemove",this),child);return child},RemoveChildStructure:function(child){if(!child||child===undefined||child===null)return null;for(var i=0;i<this.m_children.length;i++)if(this.m_children[i]== child)break;if(i>=this.m_children.length)return null;var domNode=child;if(child.NextSibling())child.NextSibling().m_previousSibling=child.PreviousSibling();if(child.PreviousSibling())child.PreviousSibling().m_nextSibling=child.NextSibling();child.m_parent=null;child.m_nextSibling=null;child.m_previousSibling=null;domNode=child.IDomNode;if(domNode&&domNode.parentNode){this.m_children.splice(i,1);if(domNode.parentNode.deleteRow)domNode.parentNode.deleteRow(domNode.rowIndex);else domNode=domNode.parentNode.removeChild(domNode); var transformEvent=new D2L.TransformEvent(domNode);transformEvent.Bubble()}this.OnChildRemoveStructure.Trigger(new D2L.Event("ChildRemoveStructure",this),child);return child},RequireControlId:function(){if(this.m_controlId.ID().length===0)this.SetControlId(UI.GetUniqueHtmlId())},SetControlId:function(id,sid){UI.GetControlMap().UnregisterControl(this);this.m_controlId=new D2L.Control.Id(id,sid);UI.GetControlMap().RegisterControl(this)},SetDomNode:function(domNode){this.IDomNode=domNode;return this.IDomNode}, SetValidator:function(validator){this.RequireControlId();validator.RequireControlId();UI.GetValidationManager().SetControlValidator(this.GetControlId(),validator.GetControlId())},SetValidationGroup:function(group){this.RequireControlId();UI.GetValidationManager().SetControlValidationGroup(this.GetControlId(),group)},SetValidationSubject:function(subject){this.RequireControlId();UI.GetValidationManager().SetControlSubject(this.GetControlId(),subject)},SetWindow:function(w){this.m_window=w}}); D2L.Control.TextFormat={Normal:1,Bold:2};D2L.C=function(name,id,sid){if(name!==undefined&&name!==null&&name.length>0)window[name]=UI.GetControl(id,sid)}; D2L.Control.Id=D2L.Class.extend({Construct:function(id,sid){arguments.callee.$.Construct.call(this);if(id===undefined)id="";else if(!id.isString)id=id.toString();if(sid===undefined)sid="";else if(!sid.isString)sid=sid.toString();this.m_id=id.toLowerCase();this.m_sid=sid.toLowerCase()},Deserialize:function(deserializer){this.m_id=deserializer.GetMember("ID");if(deserializer.HasMember("SID"))this.m_sid=deserializer.GetMember("SID")},DeserializeMin:function(deserializer){this.m_id=deserializer.GetMember(); if(deserializer.HasMember())this.m_sid=deserializer.GetMember()},Serialize:function(serializer){serializer.AddMember("ID",this.m_id);if(this.m_sid.length>0)serializer.AddMember("SID",this.m_sid)},ID:function(){return this.m_id},SID:function(){return this.m_sid}});D2L.JavaScriptFunctionOnClickAdapter=function(onClick){var f=new Function(onClick);f()};D2L.Util={}; D2L.Util.MethodProxy=D2L.Class.extend({Construct:function(beginMethod,endMethod,isAsynchronous){arguments.callee.$.Construct.call(this);if(isAsynchronous===undefined)isAsynchronous=true;this.m_beginMethod=beginMethod;this.m_endMethod=endMethod;this.m_isAsynchronous=isAsynchronous},Call:function(){var ret=undefined;if(this.m_isAsynchronous){var dr=new D2L.Util.DelayedReturn;ret=dr;if(this.m_endMethod)ret=dr.RegisterWithReturn(this.m_endMethod);if(this.m_beginMethod)dr.Trigger(this.m_beginMethod.apply(this.m_beginMethod, arguments))}else{if(this.m_beginMethod)ret=this.m_beginMethod.apply(this.m_beginMethod,arguments);if(this.m_endMethod)ret=this.m_endMethod.apply(this.m_endMethod,[ret])}return ret}});D2L.Control.Attachments=D2L.Control.Attachments||{}; D2L.Control.Attachments.LinkAttachmentInfo=D2L.Class.extend({Construct:function(linkId,navigation,text,target){arguments.callee.$.Construct.call(this);this.LinkId=linkId||"";this.Navigation=navigation||"";this.Text=text||"";this.Target=target||"_blank"},Deserialize:function(deserializer){this.LinkId=deserializer.GetMember("LinkId");this.Navigation=deserializer.GetMember("Navigation");this.Text=deserializer.GetMember("Text");this.Target=deserializer.GetMember("Target")},DeserializeMin:function(deserializer){this.LinkId= deserializer.GetMember();this.Navigation=deserializer.GetMember();this.Text=deserializer.GetMember();this.Target=deserializer.GetMember()},Serialize:function(serializer){serializer.AddMember("LinkId",this.GetLinkId());serializer.AddMember("Navigation",this.GetNavigation());serializer.AddMember("Text",this.GetText());serializer.AddMember("Target",this.GetTarget())},Equals:function(linkAttachmentInfo){if(linkAttachmentInfo===null||linkAttachmentInfo===undefined)return false;return this.GetLinkId()!= linkAttachmentInfo.GetLinkId()||this.GetNavigation()!=linkAttachmentInfo.GetNavigation()||this.GetText()!=linkAttachmentInfo.GetText()||this.GetTarget()!=linkAttachmentInfo.GetTarget()},GetLinkId:function(){return this.LinkId},GetNavigation:function(){return this.Navigation},GetText:function(){return this.Text},GetTarget:function(){return this.Target}}); D2L.UI=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.displayGroups=null;this.formName="d2l_form";this.form={};this.initialized=false;this.Form=D2L.UI.GetByName;this.ValidateArray=new Array;this.prefetchedImages=new Array;this.windowId="";this.Callback=new Object;this.LanguageManager=new D2L.Language.LanguageManager;this.DisplayGroupsManager=null;this.qsParams=null;this.m_bodyType=D2L.UI.BodyType.Normal;this.m_controlMap=null;this.m_culture=null;this.m_d2lTextCacheManager= null;this.m_displayGroupManager=null;this.m_dragDropManager=null;this.m_formManager=null;this.m_helpDialogs={};this.m_hitCode="";this.m_hitCodeCount=0;this.m_isPageFullScreen=true;this.m_messageArea=null;this.m_messageAreaParentId="";this.m_messageAreaSiblingId="";this.m_multiEditManager=null;this.m_onPageLoad=new D2L.EventHandler;this.m_onPageUnload=new D2L.EventHandler;this.m_pageLoadTime=0;this.m_parentDialog=null;this.m_parentDialogDr=new D2L.Util.DelayedReturn;this.m_reorderManager=null;this.m_shimController= null;this.m_stateManager=null;this.m_uniqueHtmlId=0;this.m_validationManager=null;this.m_warnings=[];this.m_windowEventManager=null;var me=this;this.OnPageLoad().RegisterMethod(function(){var now=new Date;me.m_pageLoadTime=now.getTime()-D2L.InitTime;me.GetControlMap();me.GetReorderManager().Init();if(me.m_warnings.length>0){var ma=me.GetMessageArea();for(var i=0;i<me.m_warnings.length;i++)ma.AddWarningMessage(new D2L.LP.Text.SmlText(me.m_warnings[i]),false)}D2L.LP.Web.UI.Html.Dom.AddEventListener("dom-change", window,function(e){if(e.composedPath){var composedPath=e.composedPath();if(composedPath.length>0){D2L.LP.Web.UI.Events.OnViewRender.Trigger(composedPath[0]);return}}D2L.LP.Web.UI.Events.OnViewRender.Trigger(e.target)});D2L.LP.Web.UI.Events.OnLoad.Trigger()})},DeserializeMin:function(deserializer){window["UI"]=this;window["Nav"]=new D2L.Nav;window["WindowEventManager"]=this.GetWindowEventManager();window["Events"]=FindEventController();window["RpcManager"]=new D2L.Rpc.Manager;window["FormManager"]= this.GetFormManager();this.windowId=deserializer.GetMember();this.pageId=deserializer.GetMember();this.m_bodyType=deserializer.GetMember();this.m_displayGroupManager=deserializer.GetObjectMin(D2L.DisplayGroups.DisplayGroupManager);this.m_reorderManager=deserializer.GetObjectMin(D2L.Reorder.ReorderManager);this.m_validationManager=deserializer.GetObjectMin(D2L.Validation.Manager);this.m_multiEditManager=deserializer.GetObjectMin(D2L.MultiEdit.Manager);this.m_culture=deserializer.GetObjectMin(D2L.Culture); window["Culture"]=this.m_culture;this.m_warnings=deserializer.GetMember();this.m_isPageFullScreen=deserializer.GetBoolean();D2L.Util.DateTime.LoadDateTime=deserializer.GetObject();var ariaController=new D2L.UI.AriaController(this)},CreateArray:function(){return[]},CreateElement:function(elementName,extensionCustomType){var ele=extensionCustomType?document.createElement(elementName,extensionCustomType):document.createElement(elementName);this.AttachObject(ele,"d2l_win",window);return ele},CreateTextNode:function(text){var emptySpace= "\ufeff";if(text===undefined||text===null)return document.createTextNode(emptySpace);else if(text.isString){if(text.length===0)text=emptySpace;return document.createTextNode(text)}else{var textNode=document.createTextNode(emptySpace);text.AssignText(textNode,"data");return textNode}},C:function(anchor,onClick){if(!anchor.classList.contains("dlk_d")&&!anchor.classList.contains("di_l_d")){var f=new Function(onClick);f.call(anchor)}},G:function(id){return this.GetById(id)},GenerateHitCode:function(){var now= new Date;var hitCodeSeed=D2L.LP.Web.Authentication.Xsrf.GetHitCodeSeed();this.m_hitCodeCount++;var count=(this.m_hitCodeCount%10).toString();this.m_hitCode=hitCodeSeed+(now.getTime()+1E8)%1E8+count;if(this.form){var input=this.GetByName("d2l_hitCode");if(input)input.value=this.m_hitCode}return this.m_hitCode},GetBrowserInfo:function(){return BrowserInfo},GetById:function(id){var elem=null;if(document["__shady_native_getElementById"]!==undefined)elem=document.__shady_native_getElementById(id);if(elem=== null)elem=document.getElementById(id);return elem},GetByClassName:function(className){return YAHOO.util.Dom.getElementsByClassName(className)},GetByTagName:function(tagName){return document.getElementsByTagName(tagName)},GetControl:function(ID,SID){return this.GetControlMap().GetControl(ID,SID)},GetControls:function(ID){return this.GetControlMap().GetControls(ID)},GC:function(mappedId){return this.GetControlMap().GetControlByMappedId(mappedId)},GetControlMap:function(){if(this.m_controlMap===null)if(!this.GetForm())return new D2L.ControlMap; else if(this.GetForm().d2l_controlMap!==undefined)this.m_controlMap=D2L.Serialization.JsonDeserializerMin.Deserialize(this.GetForm().d2l_controlMap.value,D2L.ControlMap);else this.m_controlMap=new D2L.ControlMap;return this.m_controlMap},GetCulture:function(){return this.m_culture},GetDisplayGroupManager:function(){return this.m_displayGroupManager},GetLanguageManager:function(){return this.LanguageManager},GetForm:function(){return document.forms[this.formName]},GetFormManager:function(){if(this.m_formManager=== null)this.m_formManager=new D2L.FormManager;return this.m_formManager},GetD2LTextCacheManager:function(){if(this.m_d2lTextCacheManager===null)this.m_d2lTextCacheManager=new D2L.LP.Text.Cache;return this.m_d2lTextCacheManager},GetHitCode:function(){return this.m_hitCode},GetMessageArea:function(){try{if(this.GetBodyType()==D2L.UI.BodyType.IFrame&&window.parent!==window&&window.parent["UI"]!==undefined&&window.parent["UI"]!==window["UI"])return window.parent["UI"].GetMessageArea()}catch(e){}if(this.m_messageArea=== null){this.m_messageArea=UI.GetControl("ctl_messageArea");if(this.m_messageArea===null)this.m_messageArea=new D2L.Control.MessageArea}return this.m_messageArea},GetMultiEditManager:function(){return this.m_multiEditManager},GetPageLoadTime:function(){return this.m_pageLoadTime},GetParentDialog:function(){return this.m_parentDialog},GetParentDialogDelayed:function(){return this.m_parentDialogDr},GetRelativeFontSizeManager:function(){return{GetBaseFontSize:function(){return parseInt(window.getComputedStyle(document.body).fontSize)}}}, GetReorderManager:function(){return this.m_reorderManager},GetShimController:function(){if(this.m_shimController===null)this.m_shimController=new D2L.UI.ShimController(this);return this.m_shimController},GetStateManager:function(){if(this.m_stateManager===null)if(!this.GetForm())return new D2L.State.StateManager;else if(this.GetForm().d2l_state!==undefined)this.m_stateManager=D2L.Serialization.JsonDeserializerMin.Deserialize(this.GetForm().d2l_state.value,D2L.State.StateManager);else this.m_stateManager= new D2L.State.StateManager;return this.m_stateManager},GetValidationManager:function(){if(this.m_validationManager===null)if(!this.GetForm())return new D2L.Validation.Manager;else if(this.GetForm().d2l_validationManager!==undefined)this.m_validationManager=D2L.Serialization.JsonDeserializerMin.Deserialize(this.GetForm().d2l_validationManager.value,D2L.Validation.Manager);else this.m_validationManager=new D2L.Validation.Manager;return this.m_validationManager},GetWindowEventManager:function(){if(this.m_windowEventManager=== null)this.m_windowEventManager=new D2L.WindowEventManager;return this.m_windowEventManager},HideNavBar:function(){var navBar=window.document.getElementById("d_navBar");if(navBar==null)return;var hasNavBar=false;var firstTime=true;var w=window;while(w&&!hasNavBar){try{if(!firstTime&&w.document.getElementById("d_navBar")!==null){hasNavBar=true;break}}catch(e){break}firstTime=false;var frames=w.document.getElementsByTagName("frame");for(var i=0;i<frames.length;i++)if(frames[i].name=="nav"&&frames[i].contentWindow!= window){hasNavBar=true;break}if(w==w.parent)break;w=w.parent}if(hasNavBar)YAHOO.util.Dom.addClass(this.GetBodyElement(),"dbd_noNav")},EncodeUrl:function(str){return D2L.Util.Url.Encode(str)},Init:function(){this.HideNavBar();if(document.forms)this.form=document.forms[this.formName];this.initialized=true;this.GenerateHitCode();var d=new Date;var me=this;var termCopyright=new D2L.LP.Text.LangTerm("Standard.Misc.txtCopyright",d.getFullYear());termCopyright.GetText().Register(function(val){window.defaultStatus= val;me.AttachObject(document,"onmouseout",function(){window.status=val})});this.DisplayGroupsManager=this.GetDisplayGroupManager();this.displayGroups=this.DisplayGroupsManager;this.StateManager=this.GetStateManager();window["StateManager"]=this.GetStateManager();window["ValidationManager"]=this.GetValidationManager()},InitMessageArea:function(parentId,siblingId){this.m_messageAreaParentId=parentId;this.m_messageAreaSiblingId=siblingId},IsPageFullScreen:function(){return this.m_isPageFullScreen},IsValidJsVariableName:function(name){var validRegEx= /^([a-zA-Z])+([a-zA-Z0-9_])*$/;return validRegEx.test(name)},GetByName:function(name){var retVal=null;var form=this.form;if(!this.initialized)form=document.forms[this.formName];if(form[name])retVal=form[name];else if(window[name])retVal=window[name];if(retVal)if(D2L.Util.JavaScript.IsArray(retVal))for(var i=0;i<retVal.length;i++){if(retVal[i].ID2L)retVal[i]=retVal[i].ID2L}else if(retVal.ID2L)retVal=retVal.ID2L;return retVal},GetBodyElement:function(){return document.getElementById("d2l_body")},GetBodyType:function(){return this.m_bodyType}, PrefetchImage:function(name,src,width,height,alt){if(!alt||alt===undefined)alt="";if(!this.prefetchedImages[name]||this.prefetchedImages[name]&&this.prefetchedImages[name]===null){var img=new Image(width,height);img.src=src;img.alt=alt;img.w=width;img.h=height;this.prefetchedImages[name]=img}else if(this.prefetchedImages[name]&&this.prefetchedImages[name].src!=src){this.prefetchedImages[name].src=src;this.prefetchedImages[name].alt=alt;this.prefetchedImages[name].w=width;this.prefetchedImages[name].h= height}},FetchImage:function(name){return this.prefetchedImages[name]},SwapImages:function(oldImage,prefetchedImageName,alt){if(this.prefetchedImages[prefetchedImageName]&&oldImage){var img=this.prefetchedImages[prefetchedImageName];var imgAlt=alt!==undefined?alt:img.alt.length>0?img.alt:"";oldImage.src=img.src;oldImage.width=img.w;oldImage.height=img.h;if(imgAlt.length>0){oldImage.alt=imgAlt;oldImage.title=imgAlt}}},AddCallback:function(method,windowId){var success=false;var win=this.FindWindow(windowId); if(win!==null)if(win[method]){success=true;this.Callback[method]=win[method]}if(!success)this.Callback[method]=function(){return null}},FindWindow:function(windowId,searchUp){if(searchUp===undefined)searchUp=true;var retVal=null;var SearchWindow=function(w){if(w.UI&&w.UI.windowId==windowId)return w;var frames=w.document.getElementsByTagName("frame");for(var i=0;i<frames.length;i++){var fWin=frames[i].contentWindow;if(fWin["UI"]){retVal=fWin.UI.FindWindow(windowId,false);if(retVal)return retVal}}var iframes= w.document.getElementsByTagName("iframe");for(var i=0;i<iframes.length;i++){var fWin=iframes[i].contentWindow;try{var throwsIfXDomain=fWin.location.href}catch(e){continue}if(fWin["UI"]){retVal=fWin.UI.FindWindow(windowId,false);if(retVal)return retVal}}if(w.opener&&w.opener.UI){retVal=w.opener.UI.FindWindow(windowId);if(retVal)return retVal}return null};var root=window;if(searchUp)while(root&&root.parent!=root&&root["UI"])root=root.parent;return SearchWindow(root)},GetUniqueHtmlId:function(){this.m_uniqueHtmlId= this.m_uniqueHtmlId+1;return"d2l_cntl_"+this.windowId+"_"+this.m_uniqueHtmlId},GetWindowWidth:function(w){if(w===undefined)w=window;if(w.innerWidth)return w.innerWidth;else if(w.document.documentElement&&w.document.documentElement.clientWidth)return w.document.documentElement.clientWidth;else if(w.document.body)return w.document.body.clientWidth;return 0},GetWindowHeight:function(w){if(w===undefined)w=window;if(w.innerHeight)return w.innerHeight;else if(w.document.documentElement&&w.document.documentElement.clientHeight)return w.document.documentElement.clientHeight; else if(w.document.body)return w.document.body.clientHeight;return 0},GetPageWidth:function(w){if(w===undefined)w=window;return Math.max(w.document.documentElement.scrollWidth,UI.GetWindowWidth(w))},GetPageHeight:function(w){if(w===undefined)w=window;var doc=undefined;try{doc=w.document}catch(e){}var dh=0;var sh=0;var oh=0;if(doc!==undefined){if(doc.height!==undefined)dh=doc.height;if(doc.body!==undefined){if(doc.body.scrollHeight!==undefined)sh=doc.body.scrollHeight;if(doc.body.offsetHeight!==undefined)oh= doc.body.offsetHeight}}return Math.max(Math.max(dh,sh),oh)},GetScrollLeft:function(w){if(w===undefined)w=window;if(w.document.documentElement&&w.document.documentElement.scrollLeft)return w.document.documentElement.scrollLeft;else if(w.document.body)return w.document.body.scrollLeft;return 0},GetScrollTop:function(w){if(w===undefined)w=window;if(w.document.documentElement&&w.document.documentElement.scrollTop)return w.document.documentElement.scrollTop;else if(w.document.body)return w.document.body.scrollTop; return 0},GetCursorX:function(w,evt){var x=0;if(w.event)x=w.event.clientX+w.document.documentElement.scrollLeft+w.document.body.scrollLeft;else x=evt.clientX+w.scrollX;return x},GetCursorY:function(w,evt){var y=0;if(w.event)y=w.event.clientY+w.document.documentElement.scrollTop+w.document.body.scrollTop;else y=evt.clientY+w.scrollY;return y},GetCursorPositionInEdit:function(w,textElement){if(w===undefined)w=window;if(textElement.selectionStart)return textElement.selectionStart;else if(w.document.selection){var sOldText= textElement.value;var objRange=w.document.selection.createRange();var sOldRange=objRange.text;var sWeirdString="$5b6aaf4b8a6c6c498a74cc6d$";objRange.text=sOldRange+sWeirdString;objRange.moveStart("character",0-sOldRange.length-sWeirdString.length);var sNewText=textElement.value;objRange.text=sOldRange;for(var i=0;i<=sNewText.length;i++){var sTemp=sNewText.substring(i,i+sWeirdString.length);if(sTemp==sWeirdString){var cursorPos=i-sOldRange.length;return cursorPos}}return 0}return 0},SetCursorPositionInEdit:function(w, textElement,cursorPosition){textElement.focus();if(textElement.selectionStart&&cursorPosition>=0)textElement.setSelectionRange(cursorPosition,cursorPosition);else if(textElement.createTextRange){var range=textElement.createTextRange();range.collapse(true);range.moveEnd("character",cursorPosition);range.moveStart("character",cursorPosition);range.select()}},SetParentDialog:function(dialog){this.m_parentDialog=dialog;this.m_parentDialogDr.Trigger(this.m_parentDialog)},EnableLoadingPageShim:function(isShimEnabled){if(isShimEnabled)this.GetShimController().Shim(null, true);else this.GetShimController().ClearShims()},Confirm:function(callback,primaryMessage,secondaryMessage,opener,positiveText,negativeText,dialogWidth){if(opener!==undefined&&opener!==null&&(opener.isString!==undefined||opener.m_isLangTerm!==undefined)){dialogWidth=negativeText;negativeText=positiveText;positiveText=opener;opener=undefined}var d=new D2L.Dialog.Confirm(this.GetUniqueHtmlId(),callback,primaryMessage,secondaryMessage);if(positiveText!==undefined)d.SetPositiveButtonText(positiveText); if(negativeText!==undefined)d.SetNegativeButtonText(negativeText);if(dialogWidth!==undefined&&dialogWidth!==null)d.SetWidth(dialogWidth,true);return d.Open(opener)},Error:function(primaryMessage,secondaryMessage,opener){var d=new D2L.Dialog.Error(this.GetUniqueHtmlId(),primaryMessage,secondaryMessage);return d.Open(opener)},Info:function(primaryMessage,secondaryMessage,opener){var d=new D2L.Dialog.Info(this.GetUniqueHtmlId(),primaryMessage,secondaryMessage);return d.Open(opener)},Warning:function(primaryMessage, secondaryMessage,opener){var d=new D2L.Dialog.Warning(this.GetUniqueHtmlId(),primaryMessage,secondaryMessage);return d.Open(opener)},GetZIndex:function(){var win=window;try{while(win.parent!==win&&win.parent.D2L&&win.parent.D2L.LP)win=win.parent}catch(xdomainErr){}var z=win.D2L.LP.Web.UI.Desktop.Controls.Shim.GetZIndex();return z},AH:function(pTitle,collectionName){var p=new d2l_Popup;p.height=800;p.width=800;p.title=pTitle;p.bodySource="/d2l/lp/Lang/admin/modify/language_instructions_edit.d2l";p.queryString= "ou="+Global.OrgUnitId+"&cname="+collectionName;p.AddCloseButton();p.AddSaveButton();p.Open()},HT:function(primary,secondary,source){var d=new D2L.Dialog.Info(this.GetUniqueHtmlId(),new D2L.LP.Text.HtmlText(primary,false),new D2L.LP.Text.HtmlText(secondary,false));d.SetOpener(source);return d.Open()},OnPageLoad:function(){return this.m_onPageLoad},OnPageUnload:function(){return this.m_onPageUnload},Test:function(){return true}}); D2L.LP.Web.UI.Html.Aria={LogMessage:function(message){D2L.Announce(message)},Politeness:{Off:"off",Polite:"polite",Assertive:"assertive",Rude:"rude"},RemoveAttribute:function(element,attribute){if(element!==undefined&&element!==null)element.removeAttribute("aria-"+attribute)},SetAttribute:function(element,attribute,value){if(element!==undefined&&element!==null)D2L.LP.Web.UI.Html.Dom.SetAttribute(element,"aria-"+attribute,value)},SetRole:function(element,role){if(element!==undefined&&element!==null)D2L.LP.Web.UI.Html.Dom.SetAttribute(element, "role",role)},RpcReceivePayloadProvider:function(data){if(data.Items===undefined||data.Items===null)return;var messages=data.Items;var message="";for(var i=0;i<messages.length;i++)message+=messages[i].Message;D2L.LP.Web.UI.Html.Aria.LogMessage(message)}};D2L.WebComponentsReady.then(function(){if("interactive"===document.readyState||"complete"===document.readyState)document.body.classList.remove("d2l-body-unresolved");else window.addEventListener("DOMContentLoaded",function(){document.body.classList.remove("d2l-body-unresolved")})}); D2L.LP.Web.UI.Html.Bsi={Env:"prod",Init:function(env,wcPolyfill,useShadyDom,regeneratorRuntime,bsiUnbndled,modules){D2L.LP.Web.UI.Html.Bsi.Env=env;D2L.LP.Web.UI.Html.Bsi.LoadPolyfills(wcPolyfill,useShadyDom,regeneratorRuntime).then(function(){return D2L.LP.Web.UI.Html.Bsi.LoadFiles([bsiUnbndled])}).then(function(){return D2L.LP.Web.UI.Html.Bsi.LoadFiles(modules)}).then(function(){D2L.WebComponentsLoaded()})},LoadFiles:function(files){var supportsDynamicImports=D2L.LP.Web.UI.Html.Bsi.SupportsDynamicImports(); var promises=files.map(function(src){if(supportsDynamicImports)return D2L.LP.Web.UI.Html.Bsi.LoadScript(src,"module");if(D2L.LP.Web.UI.Html.Bsi.Env!=="dev"){var lastSlash=src.lastIndexOf("/")+1;src=src.substring(0,lastSlash)+"nomodule-"+src.substring(lastSlash)}return System["import"](src)});return Promise.all(promises)},LoadFilesEventWrapper:function(files){var e=new D2L.LP.Web.UI.Events.Event;D2L.LP.Web.UI.Html.Bsi.LoadFiles(files).then(function(){e.Trigger()});return e},LoadPolyfills:function(wcPolyfill, useShadyDom,regeneratorRuntime){var loadScript=D2L.LP.Web.UI.Html.Bsi.LoadScript;var polyfills=[];var supportsNoModule="noModule"in HTMLScriptElement.prototype;if(!D2L.LP.Web.UI.Html.Bsi.SupportsDynamicImports())polyfills.push(loadScript("https://s.brightspace.com/lib/systemjs/4.1.1/system.min.js").then(function(){if(D2L.LP.Web.UI.Html.Bsi.Env==="dev"){var originalResolve=System.constructor.prototype.resolve;System.constructor.prototype.resolve=function(){return Promise.resolve(originalResolve.apply(this, arguments)).then(function(url){return url+(url.indexOf("?")>0?"&":"?")+"transform-systemjs"})}}}));if(!supportsNoModule)polyfills.push(loadScript(regeneratorRuntime));if(!("fetch"in window)||!("Request"in window)||!("signal"in window.Request.prototype))polyfills.push(loadScript("https://s.brightspace.com/lib/whatwg-fetch/3.0.0/fetch.umd.js"));if(useShadyDom||!("attachShadow"in Element.prototype)||!("getRootNode"in Element.prototype)){document.addEventListener("WebComponentsReady",function(){D2L.WCRDispatched()}); polyfills.push(loadScript(wcPolyfill+"webcomponents-bundle.js"))}else D2L.WCRDispatched();if(!supportsNoModule&&"getRootNode"in Element.prototype)polyfills.push(loadScript(wcPolyfill+"custom-elements-es5-adapter.js"));return Promise.all(polyfills)},LoadScript:function(src,type){return new Promise(function(resolve){function onLoaded(){if(script.parentElement)script.parentElement.removeChild(script);resolve()}var script=document.createElement("script");script.src=src;script.onload=onLoaded;script.onerror= function(){console.error('[D2L.LP.Web.UI.Html.Bsi.LoadScript] failed to load: "'+src+'" check the network tab for HTTP status.');onLoaded()};if(type)script.type=type;document.head.appendChild(script)})},RpcReceiveJsPayloadProvider:function(data){if(data===undefined||data===null)return true;if(window["define2"]!==undefined)define2(data);else D2L.LP.Web.UI.Html.Bsi.LoadFiles(data)},SupportsDynamicImports:function(){try{Function("!function(){import(_)}").call();return true}catch(err){return false}}}; D2L.LP.Web.UI.Html.ChangeTracking={Tracker:{ChangedItems:{},TrackChanges:function(elem,showChanges){if(!elem)return;if(showChanges===undefined)showChanges=true;var trackerId=(new D2L.LP.Web.UI.Html.UniqueHtmlId).GetValue();elem.setAttribute("data-tracker-id",trackerId);elem.setAttribute("data-track-changes","true");var changedItems={};D2L.LP.Web.UI.Html.ChangeTracking.Tracker.ChangedItems[trackerId]=changedItems;elem.addEventListener("vui-change",function(e){var id=e.target?e.target.id:"";if(id=== "")return;changedItems[id]=true;if(showChanges&&!e.isChangeShown){elem.classList.add("vui-changed");e.isChangeShown=true}});elem.addEventListener("vui-restore",function(e){var id=e.target?e.target.id:"";if(id==="")return;if(changedItems[id]!==undefined)delete changedItems[id];if(showChanges&&Object.keys(changedItems).length===0)elem.classList.remove("vui-changed")})},ContainsChanges:function(elem){var trackerId=elem.getAttribute("data-tracker-id");if(!trackerId)return false;var changedItems=D2L.LP.Web.UI.Html.ChangeTracking.Tracker.ChangedItems[trackerId]; return Object.keys(changedItems).length>0},TriggerReset:function(elem){elem.dispatchEvent(new CustomEvent("vui-reset",{composed:true,bubbles:true}))}},Trackable:{GetValue:function(elem){var nodeName=elem.nodeName;if(nodeName==="INPUT"){var inputType=elem.getAttribute("type");if(inputType==="checkbox"||inputType==="radio")return elem.checked}return elem.value},HandleChange:function(elem){var nodeName=elem.nodeName;var selectedId=elem._changeTracking.selectedId;if(nodeName==="INPUT"&&elem.getAttribute("type")=== "radio"){var groupName=elem.getAttribute("name");if(groupName){var radioOptions=document.querySelectorAll('input[name="'+groupName+'"]');for(var i=0;i<radioOptions.length;i++){if(radioOptions[i]!==elem&&radioOptions[i].id===selectedId)D2L.LP.Web.UI.Html.ChangeTracking.Trackable.TriggerEvent(radioOptions[i]);radioOptions[i]._changeTracking.selectedId=elem.id}}}D2L.LP.Web.UI.Html.ChangeTracking.Trackable.TriggerEvent(elem)},HandleReset:function(elem,tracker){var isParentTracker=D2L.LP.Web.UI.Html.Dom.IsAncestor(tracker, elem);if(!isParentTracker||!elem._changeTracking.hasChanged)return;elem._changeTracking.originalValue=D2L.LP.Web.UI.Html.ChangeTracking.Trackable.GetValue(elem);elem._changeTracking.hasChanged=false;elem.dispatchEvent(new CustomEvent("vui-restore",{composed:true,bubbles:true}))},StartTracking:function(elem){elem._changeTracking={};var nodeName=elem.nodeName;if(nodeName==="INPUT"&&elem.getAttribute("type")==="radio"){var groupName=elem.getAttribute("name");if(groupName){var selected=document.querySelector('input[name="'+ groupName+'"][checked]');if(selected){if(selected.id==="")selected.id=(new D2L.LP.Web.UI.Html.UniqueHtmlId).GetValue();elem._changeTracking.selectedId=selected.id}}}if(elem.id==="")elem.id=(new D2L.LP.Web.UI.Html.UniqueHtmlId).GetValue();elem._changeTracking.originalValue=D2L.LP.Web.UI.Html.ChangeTracking.Trackable.GetValue(elem);elem._changeTracking.hasChanged=false;elem._changeTracking.resetHandler=function(e){D2L.LP.Web.UI.Html.ChangeTracking.Trackable.HandleReset(elem,e.target)};document.addEventListener("vui-reset", elem._changeTracking.resetHandler);elem.addEventListener("change",function(){D2L.LP.Web.UI.Html.ChangeTracking.Trackable.HandleChange(elem)})},StopTracking:function(elem){if(elem._changeTracking.hasChanged)elem.dispatchEvent(new CustomEvent("vui-restore",{composed:true,bubbles:true}));document.removeEventListener("vui-reset",elem._changeTracking.resetHandler)},TriggerEvent:function(elem){var hasChanged=D2L.LP.Web.UI.Html.ChangeTracking.Trackable.GetValue(elem)!==elem._changeTracking.originalValue; elem._changeTracking.hasChanged=hasChanged;elem.dispatchEvent(new CustomEvent(hasChanged?"vui-change":"vui-restore",{composed:true,bubbles:true}))},TriggerChange:function(elem){elem.dispatchEvent(new CustomEvent("vui-change",{composed:true,bubbles:true}))},TriggerRestore:function(elem){elem.dispatchEvent(new CustomEvent("vui-restore",{composed:true,bubbles:true}))}}};D2L.LP.Web.Authentication=D2L.LP.Web.Authentication||{}; D2L.LP.Web.Authentication.OAuth2={_Initialized:false,_ClockSkew:0,_StorageKey:"D2L.Fetch.Tokens",_Storage:{},_Inflight:{},GetToken:function(scope){var me=D2L.LP.Web.Authentication.OAuth2;me._Init();var token=this._GetObjectCacheToken(scope)||this._GetLocalStorageToken(scope)||this._RequestTokenDeduped(scope);return Promise.resolve(token)},AddTokenToCache:function(scope,token){var me=D2L.LP.Web.Authentication.OAuth2;me._Init();if(!me._TokenIsForCurrentUser(token))throw new Error("Token is not for current user"); me._Storage[scope]=token;if(D2L.LP.Web.UI.Html.Dom.Storage.IsSupported()){var localStorage=me._GetLocalStorage()||{};localStorage[scope]=token;D2L.LP.Web.UI.Html.Dom.Storage.Local.Set(me._StorageKey,JSON.stringify(localStorage))}},_Init:function(){var me=D2L.LP.Web.Authentication.OAuth2;if(me._Initialized)return;me._Initialized=true;window.addEventListener("storage",me._OnStorage);window.addEventListener("d2l-logout",me._ClearAll)},_OnStorage:function(e){var me=D2L.LP.Web.Authentication.OAuth2;switch(e.key){case "Session.Expired":case "Session.UserId":me._ClearAll(); break;default:break}},_GetObjectCacheToken:function(scope){var me=D2L.LP.Web.Authentication.OAuth2;var cache=D2L.LP.Web.Authentication.OAuth2._Storage;var cached=cache[scope];if(!cached)return null;if(me._TokenIsExpired(cached)){delete cache[scope];return null}return cached.access_token},_GetLocalStorageToken:function(scope){var me=D2L.LP.Web.Authentication.OAuth2;if(!D2L.LP.Web.UI.Html.Dom.Storage.IsSupported())return null;var storage=me._GetLocalStorage();if(!storage)return null;var storedToken= storage[scope];if(!storedToken)return null;if(!me._TokenIsForCurrentUser(storedToken)){me._ClearCachedTokens();return null}if(me._TokenIsExpired(storedToken)){storage[scope]=undefined;D2L.LP.Web.UI.Html.Dom.Storage.Local.Set(me._StorageKey,JSON.stringify(storage));return null}me._Storage[scope]=storedToken;return storedToken.access_token},_GetLocalStorage:function(){var me=D2L.LP.Web.Authentication.OAuth2;var storageVal=D2L.LP.Web.UI.Html.Dom.Storage.Local.Get(me._StorageKey);if(!storageVal)return null; try{return JSON.parse(storageVal)}catch(e){D2L.LP.Web.UI.Html.Dom.Storage.Local.Remove(me._StorageKey);return null}},_ClearAll:function(){var me=D2L.LP.Web.Authentication.OAuth2;me._Inflight={};me._ClearCachedTokens()},_ClearCachedTokens:function(){var me=D2L.LP.Web.Authentication.OAuth2;me._Storage={};D2L.LP.Web.UI.Html.Dom.Storage.Local.Remove(me._StorageKey)},_RequestTokenDeduped:function(scope){var me=D2L.LP.Web.Authentication.OAuth2;if(!me._Inflight[scope])me._Inflight[scope]=me._RequestToken(scope).then(function(token){delete me._Inflight[scope]; return token},function(e){delete me._Inflight[scope];throw e;});return me._Inflight[scope]},_RequestToken:function(scope){var me=D2L.LP.Web.Authentication.OAuth2;var xsrfToken=D2L.LP.Web.Authentication.Xsrf.GetXsrfToken();var request=new Request("/d2l/lp/auth/oauth2/token",{method:"POST",headers:new Headers({"Content-Type":"application/x-www-form-urlencoded","X-Csrf-Token":xsrfToken}),body:"scope="+scope,credentials:"include"});return window.fetch(request).then(me._AdjustClockSkew).then(function(response){if(!response.ok)throw new Error(response.statusText); return response.json()}).then(function(token){if(!me._TokenIsForCurrentUser(token))throw new Error("Session has changed during request");return token}).then(function(token){me.AddTokenToCache(scope,token);return token.access_token})},_AdjustClockSkew:function(response){var me=D2L.LP.Web.Authentication.OAuth2;try{var dateHeader=response.headers.get("Date");if(!dateHeader)return;var serverTime=(new Date(dateHeader)).getTime();if(serverTime!==serverTime)return;serverTime=Math.round(serverTime/1E3);var currentTime= D2L.LP.Web.Authentication.OAuth2._Now();me._ClockSkew=serverTime-currentTime}catch(e){}return response},_Now:function(){return Math.round(Date.now()/1E3)},_TokenIsExpired:function(token){var me=D2L.LP.Web.Authentication.OAuth2;return me._Now()+me._ClockSkew>token.expires_at},_TokenIsForCurrentUser:function(token){var parts=token.access_token.split(".");if(parts.length!==3)return false;var userId;try{var decoded=JSON.parse(atob(parts[1]));userId=decoded.sub}catch(e){return false}if(!userId)return false; var currentUser=D2L.LP.Web.UI.Html.Dom.Storage.Local.Get("Session.UserId");if(userId!==currentUser)return false;return true}}; D2L.LP.Web.Authentication.Xsrf={Init:function(xsrfTokenParameterName,xsrfToken,hitCodeSeed){D2L.LP.Web.UI.Html.Dom.Storage.Local.Set("XSRF.HitCodeSeed",hitCodeSeed);D2L.LP.Web.UI.Html.Dom.Storage.Local.Set("XSRF.Token",xsrfToken)},GetHitCodeSeed:function(){var hitCodeSeed=D2L.LP.Web.UI.Html.Dom.Storage.Local.Get("XSRF.HitCodeSeed");return hitCodeSeed},GetXsrfTokenParameterName:function(){return"d2l_referrer"},GetXsrfToken:function(){var token=D2L.LP.Web.UI.Html.Dom.Storage.Local.Get("XSRF.Token"); return token},CreateXsrfHidden:function(){var hidden=document.createElement("input");hidden.type="hidden";hidden.name=D2L.LP.Web.Authentication.Xsrf.GetXsrfTokenParameterName();hidden.value=D2L.LP.Web.Authentication.Xsrf.GetXsrfToken();return hidden}};D2L.LP.Web.UI.Html.Ids={}; D2L.LP.Web.UI.Html.AbsoluteHtmlId=D2L.Class.Create({Construct:function(value){if(value===undefined||value===null)value="";this.m_value=value},_deserialize:function(deserializer){this.m_value=deserializer.GetMember("Value")},_serialize:function(serializer){serializer.AddMember("Value",this.m_value)},GetValue:function(){return this.m_value},$:function(){var node=document.getElementById(this.m_value);return $(node)}});D2L.LP.Web.UI.Html.AbsoluteHtmlId.Create=function(id){return new D2L.LP.Web.UI.Html.AbsoluteHtmlId(id)}; D2L.LP.Web.UI.Html.Ids.Index=0;D2L.LP.Web.UI.Html.UniqueHtmlId=D2L.Class.Create({Construct:function(){D2L.LP.Web.UI.Html.Ids.Index++;this.m_value="d2l_c_"+D2L.LP.Web.UI.Html.Ids.Index+"_"+Math.floor(Math.random()*1E3)},_deserialize:function(deserializer){this.m_value=deserializer.GetMember("Value")},_serialize:function(serializer){serializer.AddMember("Value",this.m_value)},GetValue:function(){return this.m_value},$:function(){var node=document.getElementById(this.m_value);return $(node)}}); D2L.LP.Web.UI.Html.JavaScript=D2L.LP.Web.UI.Html.JavaScript||{};D2L.LP.Web.UI.Html.JavaScript.CompareBoolean=function(type,left,right){if(type===0)return left!=right;else return left==right};D2L.LP.Web.UI.Html.JavaScript.Console={Error:function(){},Info:function(){},Warn:function(){},Log:function(){},Debug:function(){},IsEnabled:function(){return false}};D2L.LP.Web.UI.Html.Dom=D2L.LP.Web.UI.Html.Dom||{};D2L.LP.Web.UI.Html.Dom.ClassDestructors={}; D2L.LP.Web.UI.Html.Dom.AddClassDestructor=function(className,callback){if(D2L.LP.Web.UI.Html.Dom.ClassDestructors[className]===undefined)D2L.LP.Web.UI.Html.Dom.ClassDestructors[className]=[];D2L.LP.Web.UI.Html.Dom.ClassDestructors[className].push(callback)};D2L.LP.Web.UI.Html.Dom.ClassInitializers={};D2L.LP.Web.UI.Html.Dom.AddClassInitializer=function(className,callback){if(D2L.LP.Web.UI.Html.Dom.ClassInitializers[className]===undefined)D2L.LP.Web.UI.Html.Dom.ClassInitializers[className]=[];D2L.LP.Web.UI.Html.Dom.ClassInitializers[className].push(callback)}; D2L.LP.Web.UI.Html.Dom.AddClassName=function(className,domNode){if(!className||!domNode||domNode.className===undefined)return;$(domNode).addClass(className)};D2L.LP.Web.UI.Html.Dom.AddClassNameById=function(className,id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(node!==null)D2L.LP.Web.UI.Html.Dom.AddClassName(className,node)}; D2L.LP.Web.UI.Html.Dom.AddEventListener=function(eventName,domNode,callback,useCapture){if(!domNode)return;if(domNode.addEventListener){useCapture=useCapture||false;if(eventName.length>2&&eventName.substr(0,2)=="on")eventName=eventName.substr(2);domNode.addEventListener(eventName,callback,useCapture)}else if(domNode.attachEvent){if(eventName.substr(0,2)!="on")eventName="on"+eventName;domNode.attachEvent(eventName,callback)}}; D2L.LP.Web.UI.Html.Dom.AddKeyDownEventListener=function(domNode,callback){var handleKeyDown=function(e){var args=new D2L.LP.Web.UI.Html.Dom.KeyDownEventArgs(e);return callback.call(callback,args)};D2L.LP.Web.UI.Html.Dom.AddEventListener("keydown",domNode,handleKeyDown)};D2L.LP.Web.UI.Html.Dom.KeyDownEventArgs=D2L.Class.extend({Construct:function(e){this.m_event=e},GetKey:function(){return this.m_event.keyCode},GetEventObject:function(){return this.m_event}}); D2L.LP.Web.UI.Html.Dom.KeyDownEventArgs.Key={Backspace:8,Tab:9,Enter:13,Shift:16,Control:17,Escape:27,End:35,Home:36,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Delete:46}; D2L.LP.Web.UI.Html.Dom.AddKeyPressEventListener=function(domNode,callback){var handleKeyPress=function(e){var args=new D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs(e);if(args.IsCtrl())D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.IsControlPressed=true;var result=callback.call(callback,args);return result};var handleKeyUp=function(e){var args=new D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs(e);if(args.IsCtrl())D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.IsControlPressed=false};D2L.LP.Web.UI.Html.Dom.AddEventListener("keydown", domNode,handleKeyPress);D2L.LP.Web.UI.Html.Dom.AddEventListener("keyup",domNode,handleKeyUp)};D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs=D2L.Class.extend({Construct:function(e){this.m_event=e},GetKey:function(){return this.m_event.keyCode},GetEventObject:function(){return this.m_event},GetTarget:function(){return D2L.LP.Web.UI.Html.Dom.GetEventTargetElement(this.m_event)},IsCtrl:function(){return this.m_event.keyCode==D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.Control}}); D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key={Backspace:8,Tab:9,Enter:13,Shift:16,Control:17,Escape:27,Space:32,PageUp:33,PageDown:34,End:35,Home:36,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Delete:46};D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.IsControlPressed=false; D2L.LP.Web.UI.Html.Dom.ApplyClassFunctions=function(classFunctions,node){for(var className in classFunctions){var elems=Array.prototype.slice.call(node.querySelectorAll("."+className));if(node.classList&&node.classList.contains(className))elems.push(node);for(var i=0;i<elems.length;i++)for(var j=0;j<classFunctions[className].length;j++)classFunctions[className][j].call(classFunctions[className][j],elems[i])}}; D2L.LP.Web.UI.Html.Dom.CancelEventDefaultBehaviour=function(e){if(e.preventDefault!==undefined)e.preventDefault();else e.returnValue=false};D2L.LP.Web.UI.Html.Dom.CancelEventBubble=function(e){if(e.stopPropagation!==undefined)e.stopPropagation();else if(e.cancelBubble!==undefined)e.cancelBubble=true}; D2L.LP.Web.UI.Html.Dom.DispatchEvent=function(eventName,node,options){if(document.createEvent){if(!options)options={"cancelable":true};else if(options.cancelable===undefined)options.cancelable=true;var evt;if(eventName=="click"){evt=document.createEvent("MouseEvents");evt.initMouseEvent("click",true,options.cancelable,window,0,0,0,0,0,false,false,false,false,0,null)}else{evt=document.createEvent("HTMLEvents");evt.initEvent(eventName,true,options.cancelable)}return!node.dispatchEvent(evt)}else if(node.fireEvent)return node.fireEvent("on"+ eventName);return false};D2L.LP.Web.UI.Html.Dom.Focus=function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());D2L.LP.Web.UI.Html.Dom.FocusNode(node)};D2L.LP.Web.UI.Html.Dom.FocusNode=function(node){if(!node||node.focus==undefined)return;try{node.focus()}catch(e){}};D2L.LP.Web.UI.Html.Dom.GetActiveElement=function(doc){if(doc===null||doc===undefined){var activeElement=null;try{activeElement=document.activeElement}catch(e){}return activeElement}else return doc.activeElement}; D2L.LP.Web.UI.Html.Dom.GetAncestorElementsByClassName=function(className,elem){if(elem===undefined||elem===null||className===undefined||className===null)return null;var result=[];var parentElem=elem.parentNode;className=className.replace(/\-/g,"\\-");var oRegExp=new RegExp("(^|\\s)"+className+"(\\s|$)");while(parentElem!==null){if(oRegExp.test(parentElem.className))result.push(parentElem);parentElem=parentElem.parentNode}return result};D2L.LP.Web.UI.Html.Dom.GetAttribute=function(node,attrName){return node.getAttribute(attrName)}; D2L.LP.Web.UI.Html.Dom.GetBoundingRect=function(elem,baseOnDocumentCoordinates){if(baseOnDocumentCoordinates===undefined)baseOnDocumentCoordinates=true;var offsetParent=elem.offsetParent,doc=elem.ownerDocument,docElem=doc.documentElement,body=doc.body,top=elem.offsetTop,left=elem.offsetLeft;var width=elem.offsetWidth;var height=elem.offsetHeight;var positionedOffsetParent;if(!baseOnDocumentCoordinates)positionedOffsetParent=D2L.LP.Web.UI.Html.Dom.GetPositionedOffsetParent(elem);while((elem=elem.parentNode)&& elem!==body&&elem!==docElem){if(!baseOnDocumentCoordinates&&elem===positionedOffsetParent)break;top-=elem.scrollTop;left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop;left+=elem.offsetLeft;offsetParent=elem.offsetParent}}return{top:top,right:left+width,bottom:top+height,left:left,width:width,height:height}}; D2L.LP.Web.UI.Html.Dom.GetElementsByClassName=function(className,elem){var elems;if(elem===undefined||elem===null||elem===document)elems=$("."+className);else elems=$(elem).find("."+className);return $.makeArray(elems)}; D2L.LP.Web.UI.Html.Dom.GetElementById=function(id,doc){if(id===undefined||id===null||id==="")return null;if(id.GetValue!==undefined)id=id.GetValue();doc=doc||document;var elem=null;if(doc["__shady_native_getElementById"]!==undefined)elem=doc.__shady_native_getElementById(id);if(elem===null)elem=doc.getElementById(id);if(elem!==null&&elem.id!=id)if(doc.all){var possibleNodes=doc.all[id];for(var i=0;i<possibleNodes.length;i++)if(possibleNodes[i].id==id)return possibleNodes[i];return null}else return null; else return elem};D2L.LP.Web.UI.Html.Dom.GetEventTargetElement=function(e){return e.srcElement||e.target};D2L.LP.Web.UI.Html.Dom.GetFirstImmediateChildElementByClassName=function(className,elem){for(var i=0;i<elem.childNodes.length;i++){var childNode=elem.childNodes[i];if(D2L.LP.Web.UI.Html.Dom.HasClassName(className,childNode))return childNode}return null}; D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName=function(className,elem){if(elem===undefined||elem===null)elem=document;if(elem.getElementsByClassName!==undefined||elem.querySelectorAll!==undefined){var nodes;if(elem.getElementsByClassName!==undefined)nodes=elem.getElementsByClassName(className);else nodes=elem.querySelectorAll("."+className);if(nodes.length>0)return nodes[0];return null}var allElems=elem.all?elem.all:elem.getElementsByTagName("*");var elems=[];className=className.replace(/\-/g, "\\-");var oRegExp=new RegExp("(^|\\s)"+className+"(\\s|$)");for(var i=0;i<allElems.length;i++)if(oRegExp.test(allElems[i].className))return allElems[i];return null};D2L.LP.Web.UI.Html.Dom.GetFirstElementChild=function(elem){if(elem.firstElementChild!==undefined)return elem.firstElementChild;var childrenCount=elem.childNodes.length;for(var i=0;i<childrenCount;i++)if(elem.childNodes[i].nodeType==1)return elem.childNodes[i];return null}; D2L.LP.Web.UI.Html.Dom.GetLastElementChild=function(elem){if(elem.lastElementChild!==undefined)return elem.lastElementChild;var childrenCount=elem.childNodes.length;for(var i=childrenCount-1;i>=0;i--)if(elem.childNodes[i].nodeType==1)return elem.childNodes[i];return null}; D2L.LP.Web.UI.Html.Dom.GetMousePosition=function(win,evt){var pos={x:0,y:0};if(evt.targetTouches&&evt.targetTouches[0]){pos.x=evt.targetTouches[0].pageX;pos.y=evt.targetTouches[0].pageY}else if(evt.changedTouches&&evt.changedTouches[0]){pos.x=evt.changedTouches[0].pageX;pos.y=evt.changedTouches[0].pageY}else if(win.event){pos.x=win.event.clientX+win.document.documentElement.scrollLeft+win.document.body.scrollLeft;pos.y=win.event.clientY+win.document.documentElement.scrollTop+win.document.body.scrollTop}else{pos.x= evt.clientX+win.scrollX;pos.y=evt.clientY+win.scrollY}return pos};D2L.LP.Web.UI.Html.Dom.GetNextElementSibling=function(elem){if(elem.nextElementSibling!==undefined)return elem.nextElementSibling;var sibling=elem.nextSibling;while(sibling!==null){if(sibling.nodeType==1)return sibling;sibling=sibling.nextSibling}return null}; D2L.LP.Web.UI.Html.Dom.GetNextFocusableElement=function(domNode,includeHidden){if(domNode===undefined||domNode===null)return null;if(includeHidden===undefined)includeHidden=false;var checkDecendents=function(node){var children=node.childNodes;for(var i=0;i<children.length;i++){var isFocusable=D2L.LP.Web.UI.Html.Dom.IsFocusable(children[i],includeHidden);if(isFocusable)return children[i];var childResult=checkDecendents(children[i]);if(childResult)return childResult}return null};var recursiveFunc=function(node, skipFocusCheck,ignoreChildren){if(!skipFocusCheck&&D2L.LP.Web.UI.Html.Dom.IsFocusable(node,includeHidden))return node;if(!ignoreChildren){var childResult=checkDecendents(node);if(childResult)return childResult}var nextSibling=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(node);if(nextSibling){var siblingResult=recursiveFunc(nextSibling,false,false);if(siblingResult)return siblingResult;return null}var parent=null;if(node.parentNode)parent=node.parentNode;else{var win=null;if(node.defaultView)win=node.defaultView; else if(node.parentWindow)win=node.parentWindow;if(win!=null&&win.D2L)if(win.frameElement)if(win.frameElement.parentNode)parent=win.frameElement.parentNode}if(!parent)return null;var nextSiblingOfParent=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(parent);if(nextSiblingOfParent){var r=recursiveFunc(nextSiblingOfParent,false,false);if(r)return r}return null};var result=recursiveFunc(domNode,true,false);return result}; D2L.LP.Web.UI.Html.Dom.GetParentElementByClassName=function(className,elem){if(elem===undefined||elem===null||className===undefined||className===null)return null;var parentElem;try{parentElem=elem.parentNode}catch(e){return null}className=className.replace(/\-/g,"\\-");var oRegExp=new RegExp("(^|\\s)"+className+"(\\s|$)");while(parentElem!==null){if(oRegExp.test(parentElem.className))return parentElem;parentElem=parentElem.parentNode}return null}; D2L.LP.Web.UI.Html.Dom.GetParentElementsByClassName=function(className,elem){if(elem===undefined||elem===null||className===undefined||className===null)return null;var parentElems=new Array;var parentElem;try{parentElem=elem.parentNode}catch(e){return null}className=className.replace(/\-/g,"\\-");var oRegExp=new RegExp("(^|\\s)"+className+"(\\s|$)");while(parentElem!==null){if(oRegExp.test(parentElem.className))parentElems.push(parentElem);parentElem=parentElem.parentNode}return parentElems}; D2L.LP.Web.UI.Html.Dom.GetPageSize=function(w){var ret={width:0,height:0};var doc=undefined;try{doc=w.document}catch(e){}if(doc===undefined)return ret;var dh=0;var dw=0;var sh=0;var sw=0;var oh=0;var ow=0;var dbH=0;var dbW=0;if(doc.height!==undefined){dh=doc.height;dw=doc.width}if(doc.body!==undefined&&doc.body!==null){if(doc.body.scrollHeight!==undefined)sh=doc.body.scrollHeight;if(doc.body.scrollWidth!==undefined)sw=doc.body.scrollWidth;if(doc.body.offsetHeight!==undefined)oh=doc.body.offsetHeight; if(doc.body.offsetWidth!==undefined)ow=doc.body.offsetWidth;if(doc.documentElement.scrollHeight!==undefined)dbH=doc.documentElement.scrollHeight;if(doc.documentElement.scrollWidth!==undefined)dbW=doc.documentElement.scrollWidth}ret.height=Math.min(dbH,Math.max(Math.max(dh,sh),oh));ret.width=Math.min(dbW,Math.max(Math.max(dw,sw),ow));return ret}; D2L.LP.Web.UI.Html.Dom.GetPositionedOffsetParent=function(elem){var offsetParent=elem.offsetParent||document.body;while(offsetParent&&D2L.LP.Web.UI.Html.Css.GetStyle(offsetParent,"position")==="static"&&offsetParent!==document.body&&offsetParent!==document.documentElement)offsetParent=offsetParent.offsetParent;return offsetParent}; D2L.LP.Web.UI.Html.Dom.GetPreviousElementSibling=function(elem){if(elem===undefined||elem===null)return null;if(elem.previousElementSibling!==undefined)return elem.previousElementSibling;var sibling=elem.previousSibling;while(sibling!==null){if(sibling.nodeType==1)return sibling;sibling=sibling.previousSibling}return null}; D2L.LP.Web.UI.Html.Dom.GetPreviousFocusableElement=function(domNode,includeHidden){if(domNode===undefined||domNode===null)return null;if(includeHidden===undefined)includeHidden=false;var checkDecendents=function(node){var children=node.childNodes;for(var i=children.length-1;i>=0;i--){var childResult=checkDecendents(children[i]);if(childResult)return childResult;var isFocusable=D2L.LP.Web.UI.Html.Dom.IsFocusable(children[i],includeHidden);if(isFocusable)return children[i]}return null};var recursiveFunc= function(node,skipFocusCheck,ignoreChildren){if(!skipFocusCheck&&D2L.LP.Web.UI.Html.Dom.IsFocusable(node,includeHidden))return node;if(!ignoreChildren){var childResult=checkDecendents(node);if(childResult)return childResult}var prevSibling=D2L.LP.Web.UI.Html.Dom.GetPreviousElementSibling(node);if(prevSibling){var siblingResult=recursiveFunc(prevSibling,false,false);if(siblingResult)return siblingResult;return null}var parent=null;if(node.parentNode)parent=node.parentNode;else{var win=null;if(node.defaultView)win= node.defaultView;else if(node.parentWindow)win=node.parentWindow;if(win!=null&&win.D2L)if(win.frameElement)if(win.frameElement.parentNode)parent=win.frameElement.parentNode}if(!parent)return null;var prevSiblingOfParent=D2L.LP.Web.UI.Html.Dom.GetPreviousElementSibling(parent);if(prevSiblingOfParent){var r=recursiveFunc(prevSiblingOfParent,false,false);if(r)return r}return null};var result=recursiveFunc(domNode,true,true);return result}; D2L.LP.Web.UI.Html.Dom.GetScrollPosition=function(w){w=w||window;var ret={top:0,left:0};if(w.pageYOffset!==undefined){ret.top=w.pageYOffset;ret.left=w.pageXOffset}else if(w.document.documentElement!==undefined&&w.document.documentElement.scrollTop!==undefined){ret.top=w.document.documentElement.scrollTop;ret.left=w.document.documentElement.scrollLeft}else if(w.document.body!==undefined){ret.top=w.document.body.scrollTop;ret.left=w.document.body.scrollLeft}return ret}; D2L.LP.Web.UI.Html.Dom.GetTextContent=function(node){if(node==null)return null;if(node.textContent!==undefined)return node.textContent;else if(node.innerText!==undefined)return node.innerText;else return null}; D2L.LP.Web.UI.Html.Dom.GetViewportSize=function(w){w=w||window;var ret={width:0,height:0};if(w.innerWidth!==undefined){ret.width=w.innerWidth;ret.height=w.innerHeight}else if(w.document.documentElement&&w.document.documentElement.clientWidth){ret.width=w.document.documentElement.clientWidth;ret.height=w.document.documentElement.clientHeight}else if(w.document.body){ret.width=w.document.body.clientWidth;ret.height=w.document.body.clientHeight}return ret}; D2L.LP.Web.UI.Html.Dom.HasAnyClassName=function(classNames,domNode){if(!classNames||!domNode||domNode.className===undefined)return false;for(var i=0;i<classNames.length;i++){var hasClass=$(domNode).hasClass(classNames[i]);if(hasClass)return true}return false};D2L.LP.Web.UI.Html.Dom.HasAttribute=function(node,attrName){if(node.hasAttribute!==undefined)return node.hasAttribute(attrName);else{var val=node.getAttribute(attrName);return val!==null&&val.length>0}}; D2L.LP.Web.UI.Html.Dom.HasClassName=function(className,domNode){if(!className||!domNode||domNode.className===undefined)return false;var hasClass=$(domNode).hasClass(className);return hasClass};D2L.LP.Web.UI.Html.Dom.HasSafeParent=function(win){try{var throwsIfXDomain=win.parent.document;return true}catch(xdomainErr){return false}}; D2L.LP.Web.UI.Html.Dom.IndexOf=function(source,searchValue,from){from=from||0;if(source.indexOf!==undefined)return source.indexOf(searchValue,from);if(!D2L.LP.Web.UI.Html.JavaScript.IsArray(source))return;if(from>=source.length)return-1;for(;from<source.length;from++)if(source[from]===searchValue)return from;return-1};D2L.LP.Web.UI.Html.Dom.IndexOfElement=function(elem){var i=0;var e=elem;while(e=e.previousSibling)if(e.nodeType==1)i++;return i}; D2L.LP.Web.UI.Html.Dom.InsertElementAfter=function(elem,insertAfterElem){var nextElement=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(insertAfterElem);var parent=insertAfterElem.parentNode;if(nextElement===elem)return;if(nextElement!=null)parent.insertBefore(elem,nextElement);else parent.appendChild(elem)};D2L.LP.Web.UI.Html.Dom.IsAncestor=function(ancestorNode,node){var cur=node;while(cur){if(cur===ancestorNode)return true;cur=cur.parentNode}return false}; D2L.LP.Web.UI.Html.Dom.FocusableElements={a:true,body:true,button:true,frame:true,iframe:true,img:true,input:true,isindex:true,object:true,select:true,textarea:true}; D2L.LP.Web.UI.Html.Dom.IsFocusable=function(node,includeHidden){if(node===undefined||node===null||node.disabled)return false;if(!includeHidden){var isVisible=D2L.LP.Web.UI.Html.Dom.IsVisible(node);if(!isVisible)return false}if(node.attachEvent){if(node.getAttributeNode){var tabIndexAttr=node.getAttributeNode("tabindex");if(tabIndexAttr!==null&&tabIndexAttr.specified)return tabIndexAttr.value>=0}var nodeName=node.nodeName.toLowerCase();if(D2L.LP.Web.UI.Html.Dom.FocusableElements[nodeName])return true; return false}return node.tabIndex>=0}; D2L.LP.Web.UI.Html.Dom.IsVisible=function(domNode){if(domNode===undefined||domNode===null)return false;var isVisible=function(node){if(node.style===undefined)return true;if(node.style.visibility&&node.style.visibility!="visible"&&node.style.visibility!="inherit")return false;if(node.style.display&&node.style.display=="none")return false;if(D2L.LP.Web.UI.Html.Css.GetStyle(node,"visibility")!="visible"&&D2L.LP.Web.UI.Html.Css.GetStyle(node,"visibility")!="inherit")return false;if(D2L.LP.Web.UI.Html.Css.GetStyle(node, "display")=="none")return false;return true};var visible=isVisible(domNode);if(visible){var _parentNode=domNode.parentNode;while(_parentNode!=null){var doc=null;var win=null;if(_parentNode.nodeName.toLowerCase()=="document")doc=_parentNode;else if(_parentNode.ownerDocument)doc=_parentNode.ownerDocument;if(doc!=null)win=doc.defaultView?doc.defaultView:doc.parentWindow;if(win!=null&&win.D2L){visible=isVisible(_parentNode);if(visible)_parentNode=_parentNode.parentNode;else break}else break}}return visible}; D2L.LP.Web.UI.Html.Dom.Navigate=function(location,formId){if(formId!==undefined&&formId!==null)D2L.LP.Web.UI.Common.Controls.Form.StopChangeTracking(formId);window.location.assign(location.GetUrl())}; D2L.LP.Web.UI.Html.Dom.OpenWindow=function(windowName,location,width,height,hasMenubar,hasToolbar,callback,noopener){if(hasMenubar===undefined)hasMenubar=false;if(hasToolbar===undefined)hasToolbar=false;windowName=windowName.replace(/[^a-zA-Z0-9]+/g,"_");var features="";if(noopener)features+="noopener,";if(width>0)features+="width="+width+",";if(height>0)features+="height="+height+",";features+="location=1,"+"menubar="+(hasMenubar?"1":"0")+","+"resizable=1,"+"status=1,"+"scrollbars=1,"+"toolbar="+ (hasToolbar?"1":"0");var w=window.open(location.GetUrl(),windowName,features);if(w)w.focus();if(callback)callback.apply(callback)}; D2L.LP.Web.UI.Html.Dom.OverlayElement=function(elem,targetElem,insertAfterElem,position,verticalOffset,horizontalOffset,isAutoPosition,isAutoScroll,attachToBody){if(attachToBody===undefined)attachToBody=false;if(isAutoPosition===undefined)isAutoPosition=true;if(isAutoScroll===undefined)isAutoScroll=false;if(insertAfterElem===undefined)insertAfterElem=targetElem;if(position===undefined)position=D2L.LP.Web.UI.Html.Style.OverlayPosition.Mouse;if(verticalOffset===undefined)verticalOffset=0;if(horizontalOffset=== undefined)horizontalOffset=0;var isRTL=D2L.LP.Globalization.Locale.GetTextFormatDescriptor().TextDirection==D2L.LP.Globalization.Formatting.Text.TextDirection.RightToLeft;if(isRTL){var RTLposition=position;if(position==D2L.LP.Web.UI.Html.Style.OverlayPosition.Left)RTLposition=D2L.LP.Web.UI.Html.Style.OverlayPosition.Right;else if(position==D2L.LP.Web.UI.Html.Style.OverlayPosition.Right)RTLposition=D2L.LP.Web.UI.Html.Style.OverlayPosition.Left;position=RTLposition;horizontalOffset=-horizontalOffset}if(attachToBody)insertAfterElem= document.body.lastChild;D2L.LP.Web.UI.Html.Dom.InsertElementAfter(elem,insertAfterElem);elem.style.left="";elem.style.right="";elem.style.top="";elem.style.bottom="";var targetRect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(targetElem,attachToBody);var elemRect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(elem,attachToBody);var viewPortSize=D2L.LP.Web.UI.Html.Dom.GetViewportSize();var left;var top;if(position==D2L.LP.Web.UI.Html.Style.OverlayPosition.Mouse){var clickPos=D2L.LP.Web.UI.Events.m_lastMouseDownPosition; var scrollPos=D2L.LP.Web.UI.Html.Dom.GetScrollPosition();left=clickPos.x-scrollPos.left;top=clickPos.y-scrollPos.top;elem.style.position="fixed"}else if(position==D2L.LP.Web.UI.Html.Style.OverlayPosition.Top){left=targetRect.left;top=targetRect.top-elemRect.height}else if(position==D2L.LP.Web.UI.Html.Style.OverlayPosition.Right){left=targetRect.left+targetRect.width;top=targetRect.top}else if(position==D2L.LP.Web.UI.Html.Style.OverlayPosition.Bottom){left=targetRect.left+(isRTL?targetRect.width:0); top=targetRect.top+targetRect.height}else if(position==D2L.LP.Web.UI.Html.Style.OverlayPosition.Left){left=targetRect.left;top=targetRect.top}else throw"Invalid Overlay Position";left+=horizontalOffset;top+=verticalOffset;if(isRTL&&position!=D2L.LP.Web.UI.Html.Style.OverlayPosition.Mouse)left=left-elemRect.width;elem.style.left=left+"px";elem.style.top=top+"px";if(isAutoPosition||isAutoScroll){var offsetParent=D2L.LP.Web.UI.Html.Dom.GetPositionedOffsetParent(elem);var offsetParentRect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(offsetParent); var elemNewRect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(elem);var body=document.body;if(offsetParent==body){offsetParentRect.bottom=viewPortSize.height;elemNewRect.bottom-=document.documentElement.scrollTop;offsetParentRect.top=0;elemNewRect.top-=document.documentElement.scrollTop}var rightDelta=offsetParentRect.right-elemNewRect.right;var leftDelta=elemNewRect.left-offsetParentRect.left;var topDelta=elemNewRect.top-offsetParentRect.top;var bottomDelta=offsetParentRect.bottom-elemNewRect.bottom;if(isRTL){leftDelta= elemNewRect.left;rightDelta=elemNewRect.right}var flipX;if(isAutoPosition){if(position==D2L.LP.Web.UI.Html.Style.OverlayPosition.Mouse){if(left+elemRect.width>viewPortSize.width)left=left-elemRect.width;if(top+elemRect.height>viewPortSize.height)top=top-elemRect.height}else{if(!isRTL&&rightDelta<0&&leftDelta>=0)left=targetRect.left-(isRTL?0:elemRect.width);if(isRTL&&leftDelta<0&&rightDelta>=0)left=targetRect.left-(isRTL?0:elemRect.width);if(bottomDelta<0&&topDelta>=0){flipX=true;top=targetRect.top- elemRect.height-verticalOffset}}if(left>=0)elem.style.left=left+"px";D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-overlay-flip-x",elem);if(top>=0){if(flipX)D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-overlay-flip-x",elem);elem.style.top=top+"px"}}if(isAutoScroll){var scroll=false;var xScrollBy=0;var yScrollBy=0;if(rightDelta<0){xScrollBy=Math.abs(rightDelta)+10;scroll=true}if(leftDelta<0){xScrollBy=leftDelta-10;scroll=true}if(bottomDelta<0){yScrollBy=Math.abs(bottomDelta)+10;scroll=true}if(topDelta<0){yScrollBy= topDelta-10;scroll=true}if(scroll)scrollBy(xScrollBy,yScrollBy)}}};D2L.LP.Web.UI.Html.Dom.RemoveAttribute=function(node,attrName){node.removeAttribute(attrName)};D2L.LP.Web.UI.Html.Dom.RemoveChildElements=function(domNode){if(domNode)domNode.innerHTML=""};D2L.LP.Web.UI.Html.Dom.RemoveClassName=function(className,domNode){if(!className||!domNode||domNode.className===undefined)return;$(domNode).removeClass(className)}; D2L.LP.Web.UI.Html.Dom.RemoveClassNameById=function(className,id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(node!==null)D2L.LP.Web.UI.Html.Dom.RemoveClassName(className,node)};D2L.LP.Web.UI.Html.Dom.RemoveElement=function(elem){if(elem&&elem.parentNode)elem.parentNode.removeChild(elem)};D2L.LP.Web.UI.Html.Dom.RemoveElementById=function(id){var elem=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());D2L.LP.Web.UI.Html.Dom.RemoveElement(elem)}; D2L.LP.Web.UI.Html.Dom.RemoveEventListener=function(eventName,domNode,callback,useCapture){if(domNode.removeEventListener){useCapture=useCapture||false;if(eventName.length>2&&eventName.substr(0,2)=="on")eventName=eventName.substr(2);domNode.removeEventListener(eventName,callback,useCapture)}else if(domNode.detachEvent){if(eventName.substr(0,2)!="on")eventName="on"+eventName;domNode.detachEvent(eventName,callback)}}; D2L.LP.Web.UI.Html.Dom.SetAttribute=function(node,attrName,attrValue){node.setAttribute(attrName,attrValue)};D2L.LP.Web.UI.Html.Dom.SetIsDisplayed=function(id,isDisplayed){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(!node){D2L.LP.Web.UI.Html.JavaScript.Console.Warn("SetIsDisplayed Error. Node does not exist: '"+id.GetValue()+"'.");return}D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(node,isDisplayed)}; D2L.LP.Web.UI.Html.Dom.SetIsDisplayedMultiple=function(ids,isDisplayed){for(var i=0;i<ids.length;i++)D2L.LP.Web.UI.Html.Dom.SetIsDisplayed(ids[i],isDisplayed)};D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode=function(node,isDisplayed){if(isDisplayed)D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-hidden",node);else D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-hidden",node);D2L.LP.Web.UI.Events.OnVisibilityChange.Trigger(node,isDisplayed)}; D2L.LP.Web.UI.Html.Dom.SetIsEnabled=function(id,isEnabled){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(!node)return;D2L.LP.Web.UI.Html.Dom.SetIsEnabledNode(node,isEnabled)};D2L.LP.Web.UI.Html.Dom.SetIsEnabledNode=function(node,isEnabled){if(node.disabled!==undefined)node.disabled=!isEnabled}; D2L.LP.Web.UI.Html.Dom.Storage={m_isSupported:undefined,IsSupported:function(){var me=D2L.LP.Web.UI.Html.Dom.Storage;if(me.m_isSupported!==undefined)return me.m_isSupported;if(!window.localStorage){me.m_isSupported=false;return false}try{window.localStorage.setItem("test","");window.localStorage.removeItem("test")}catch(e){return false}return true},Repo:{},Common:{Get:function(storage,key){var me=D2L.LP.Web.UI.Html.Dom.Storage;var val;if(me.IsSupported())val=storage.getItem(key);else val=D2L.LP.Web.UI.Html.Dom.Storage.Repo[key]; if(val===undefined)val=null;return val},Remove:function(storage,key,triggerLocalEvent){if(triggerLocalEvent===undefined)triggerLocalEvent=true;var me=D2L.LP.Web.UI.Html.Dom.Storage;var oldValue=D2L.LP.Web.UI.Html.Dom.Storage.Common.Get(storage,key);if(me.IsSupported())storage.removeItem(key);else D2L.LP.Web.UI.Html.Dom.Storage.Repo[key]=null;var newValue=D2L.LP.Web.UI.Html.Dom.Storage.Common.Get(storage,key);if(oldValue==newValue)return;if(triggerLocalEvent)D2L.LP.Web.UI.Events.OnStorage.Trigger({Key:key, NewValue:null,OldValue:oldValue})},Set:function(storage,key,value,triggerLocalEvent){var me=D2L.LP.Web.UI.Html.Dom.Storage;if(triggerLocalEvent===undefined)triggerLocalEvent=true;value=value.toString();var oldValue=me.Common.Get(storage,key);if(oldValue==value)return;var success=false;if(me.IsSupported())try{storage.setItem(key,value);success=true}catch(e){D2L.LP.Web.UI.Html.JavaScript.Console.Error("Local storage: disabled or limit reached.",e)}if(!success)me.Repo[key]=value;if(triggerLocalEvent)D2L.LP.Web.UI.Events.OnStorage.Trigger({Key:key, NewValue:value,OldValue:oldValue})}},Local:{Get:function(key){return D2L.LP.Web.UI.Html.Dom.Storage.Common.Get(window.localStorage,key)},Remove:function(key,triggerLocalEvent){var hasStorage=false;try{if(window.localStorage)hasStorage=true}catch(e){hasStorage=false}if(!hasStorage)return;D2L.LP.Web.UI.Html.Dom.Storage.Common.Remove(window.localStorage,key,triggerLocalEvent)},Set:function(key,value,triggerLocalEvent){var hasStorage=false;try{if(window.localStorage)hasStorage=true}catch(e){hasStorage= false}if(!hasStorage)return;D2L.LP.Web.UI.Html.Dom.Storage.Common.Set(window.localStorage,key,value,triggerLocalEvent)}},OnStorage:function(e){if(e.oldValue===e.newValue)return;try{D2L.LP.Web.UI.Events.OnStorage.Trigger({Key:e.key,NewValue:e.newValue,OldValue:e.oldValue})}catch(e){}},Session:{Get:function(key){return D2L.LP.Web.UI.Html.Dom.Storage.Common.Get(window.sessionStorage,key)},Remove:function(key,triggerLocalEvent){D2L.LP.Web.UI.Html.Dom.Storage.Common.Remove(window.sessionStorage,key,triggerLocalEvent)}, Set:function(key,value,triggerLocalEvent){D2L.LP.Web.UI.Html.Dom.Storage.Common.Set(window.sessionStorage,key,value,triggerLocalEvent)}}};D2L.LP.Web.UI.Html.Dom.ToggleClassName=function(className,domNode,force){if(!className||!domNode||domNode.className===undefined)return;$(domNode).toggleClass(className,force)}; D2L.LP.Web.UI.Html.Dom.ToggleClassNameById=function(className,id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(node!==null)D2L.LP.Web.UI.Html.Dom.ToggleClassName(className,node)}; D2L.LP.Web.UI.Html.Dom.ToggleVisibility=function(id,animate){var $node=id.$();if($node.length===0){D2L.LP.Web.UI.Html.JavaScript.Console.Warn("Toggle Visiblity Error. Node does not exist: '"+id.GetValue()+"'.");return}if(animate)if($node.hasClass("d2l-hidden"))$node.css("display","none").removeClass("d2l-hidden").slideToggle();else $node.slideToggle();else $node.toggleClass("d2l-hidden")}; D2L.LP.Web.UI.Html.JavaScript.If=function(){var args=arguments;var ret=new D2L.LP.Web.UI.Events.Event;var executeStatement=function(index){if(index==args.length){ret.Trigger();return}var condition=args[index];var func=args[index+1];if(!condition){index=index+2;executeStatement(index);return}var val=undefined;if(func!==undefined&&func!==null)val=func.call(func);if(val===undefined||val===null||val.AddListener===undefined){ret.Trigger();return}val.AddListener(function(){ret.Trigger()});val.AddReleaseListener(function(){ret.Release()})}; setTimeout(function(){executeStatement(0)});return ret};D2L.LP.Web.UI.Html.JavaScript.LogicalAnd=function(){var args=arguments;var result=args[0];for(var i=1;i<args.length;i++)result=result&&args[i];return result};D2L.LP.Web.UI.Html.JavaScript.LogicalNegate=function(booleanValue){return!booleanValue};D2L.LP.Web.UI.Html.JavaScript.CallFunctionPipeline=function(){return D2L.LP.Web.UI.Html.JavaScript.CallFunctionArrayPipeline(arguments)}; D2L.LP.Web.UI.Html.JavaScript.CallFunctionArrayPipeline=function(funcs){var ret=new D2L.LP.Web.UI.Events.Event;var handleResult=function(result,index){if(typeof result!=="undefined"&&(result===null||result===false)){ret.Trigger(false);return}if(typeof result!=="undefined"&&result.AddListener!==undefined){result.AddListener(function(r){handleResult(r,index)});result.AddReleaseListener(function(){ret.Release()})}else callFunction(++index)};var callFunction=function(index){if(index==funcs.length){ret.Trigger(true); return}if(funcs[index]===undefined||funcs[index]===null)callFunction(++index);else{var result=funcs[index].apply(funcs[index]);handleResult(result,index)}};setTimeout(function(){callFunction(0)},0);return ret}; D2L.LP.Web.UI.Html.JavaScript.HtmlEncode=function(value){if(value==undefined||value==null)return value;if(value.indexOf("&")!=-1)value=value.replace(/&/g,"&");if(value.indexOf("<")!=-1)value=value.replace(/</g,"<");if(value.indexOf(">")!=-1)value=value.replace(/>/g,">");if(value.indexOf('"')!=-1)value=value.replace(/"/g,""");return value}; D2L.LP.Web.UI.Html.JavaScript.ObjectAccessor=function(obj,property){if(obj[property]!==undefined)if(typeof obj[property]==="function")return obj[property]();else return obj[property];return null};window.oldSetTimeout=window.setTimeout;window.setTimeout=function(method,time){if(time===undefined||time===0)return D2L.LP.Web.UI.Html.JavaScript.SetImmediate(method);else return window.oldSetTimeout(method,time)}; D2L.LP.Web.UI.Html.JavaScript.SetImmediate=function(handle){if(window.setImmediate!==undefined)return window.setImmediate(handle);else if(window.msSetImmediate!==undefined)return window.msSetImmediate(handle);else return window.oldSetTimeout(handle)}; D2L.LP.Web.UI.Html.JavaScript.SetTimeoutWithEvent=function(method,time){var evt=new D2L.LP.Web.UI.Events.Event;setTimeout(function(){var result=method.call(method);if(result===undefined||result===null||result.AddListener===undefined){evt.Trigger(result);return}result.AddListener(function(r){evt.Trigger(r)});result.AddReleaseListener(function(){evt.Release()})},time);return evt}; D2L.LP.Web.UI.Html.JavaScript.IncludeScript=function(src,params){var evt=new D2L.LP.Web.UI.Events.Event;var sep=src.indexOf("?")>-1?"&":"?";for(var key in params){src+=sep+D2L.LP.Web.UI.Html.JavaScript.UrlEncode(key)+"="+D2L.LP.Web.UI.Html.JavaScript.UrlEncode(params[key]);sep="&"}var scripts=document.body.getElementsByTagName("script");for(var i=0;i<scripts.length;i++)if(scripts[i].src.length>=src.length&&scripts[i].src.substr(scripts[i].src.length-src.length)==src){setTimeout(function(){evt.Trigger()}, 0);return evt}var script=document.createElement("script");if(script.readyState)script.onreadystatechange=function(){if(script.readyState=="loaded"||script.readyState=="complete"){script.onreadystatechange=null;evt.Trigger()}};else script.onload=function(){evt.Trigger()};script.src=src;document.body.appendChild(script);return evt}; D2L.LP.Web.UI.Html.JavaScript.IncludeScriptBlock=function(js){var script=document.createElement("script");script.appendChild(document.createTextNode(js));document.body.appendChild(script);return script};D2L.LP.Web.UI.Html.JavaScript.Int={Parse:function(value){var val=D2L.LP.Web.UI.Html.JavaScript.Int.TryParse(value,null);return val},TryParse:function(value,defaultValue){if(value===undefined||value===null)return defaultValue;var val=parseInt(value);if(isNaN(val))return defaultValue;return val}}; D2L.LP.Web.UI.Html.Css={};D2L.LP.Web.UI.Html.Css.GetStyle=function(elem,styleAttribute){if(elem!=null&&elem!=undefined)if(window.getComputedStyle!==undefined)return window.getComputedStyle(elem,null).getPropertyValue(styleAttribute);else if(elem.currentStyle[styleAttribute])return elem.currentStyle[styleAttribute]}; D2L.LP.Web.UI.Html.Css.Capability={SupportsTransition:function(){return document.body.style.transition!==undefined||document.body.style.MozTransition!==undefined||document.body.style.webkitTransition!==undefined||document.body.style.msTransition!==undefined}}; D2L.LP.Web.UI.Html.JavaScript.RpcReceiveJsPayloadProvider=function(data){if(data===undefined||data===null)return true;var events=[];for(var i=0;i<data.length;i++){var item=data[i];if(item.Type=="File")events.push(D2L.LP.Web.UI.Html.JavaScript.IncludeScript(item.Content,undefined));else D2L.LP.Web.UI.Html.JavaScript.IncludeScriptBlock(item.Content)}var evt=D2L.LP.Web.UI.Events.AggregateEvents(events);return evt}; D2L.LP.Web.UI.Html.JavaScript.RpcReceiveCssPayloadProvider=function(data){if(data===undefined||data===null)return;var itemContent=null;var includeStyleBlock=function(){if(itemContent!==null){D2L.LP.Web.UI.Html.Style.IncludeStyleBlock(itemContent);itemContent=null}};for(var i=0;i<data.length;i++){var item=data[i];if(item.Type==="File"){includeStyleBlock();D2L.LP.Web.UI.Html.Style.IncludeStyleSheet(item.Content)}else if(item.Type==="Block")if(itemContent===null)itemContent=item.Content;else itemContent+= item.Content}includeStyleBlock()};D2L.LP.Web.UI.Html.JavaScript.TrimString=function(type,str){if(typeof str!="string")throw"TrimString Error: given variable is not a string.";if(type===0)return str.replace(/^\s+|\s+$/g,"");else if(type===1)return str.replace(/^\s+/,"");else if(type===2)return str.replace(/\s+$/,"")}; D2L.LP.Web.UI.Html.JavaScript.HtmlEncode=function(value){if(value==undefined||value==null)return value;if(value.indexOf("&")!=-1)value=value.replace(/&/g,"&");if(value.indexOf("<")!=-1)value=value.replace(/</g,"<");if(value.indexOf(">")!=-1)value=value.replace(/>/g,">");if(value.indexOf('"')!=-1)value=value.replace(/"/g,""");return value}; D2L.LP.Web.UI.Html.JavaScript.UrlEncode=function(value){if(value==undefined||value==null)return value;var encodedValue=encodeURIComponent(value);return encodedValue};D2L.LP.Web.UI.Html.JavaScript.UrlEncodePath=function(value){if(value==undefined||value==null)return value;var encodedValue="";var urlComponents=value.split("/");for(var i=0;i<urlComponents.length;i++)if(i==0)encodedValue+=encodeURIComponent(urlComponents[i]);else encodedValue+="/"+encodeURIComponent(urlComponents[i]);return encodedValue}; D2L.LP.Web.UI.Html.JavaScript.IsArray=function(obj){if(obj&&obj.pop&&obj.push)return true;return false};D2L.VS=function(varName,obj){D2L.V[varName]=obj};D2L.VG=function(varName){return D2L.V[varName]};D2L.VR=function(varName){delete D2L.V[varName]};D2L.VINS=function(varName){return D2L.V[varName]===undefined};D2L.V={};D2L.VDS=function(dictName,varName,obj){if(!D2L.VD[dictName])D2L.VD[dictName]={};D2L.VD[dictName][varName]=obj}; D2L.VDG=function(dictName,varName){if(D2L.VD[dictName])return D2L.VD[dictName][varName];return null};D2L.VD={};D2L.VAA=function(arrayName,obj){if(!D2L.VA[arrayName])D2L.VA[arrayName]=[];D2L.VA[arrayName].push(obj)};D2L.VAG=function(arrayName,index){if(D2L.VA[arrayName])return D2L.VA[arrayName][index];return null};D2L.VAGA=function(arrayName){if(D2L.VA[arrayName])return D2L.VA[arrayName];return[]};D2L.VA={}; D2L.LP.Web.UI.Html.Math={AnnotateMathML:function(encoding,title,originalMath,mathML){if(title===undefined)title="";var mathStartRegEx=/<math[^>]*>/i;var mathBlockRegEx=/(display="block"|display='block')/gi;var mathStyleRegEx=/(style="(.*?)")/i;var mathStart=mathStartRegEx.exec(mathML);var mathMLContent=mathML.replace(/<math[^>]*>/gi,"").replace(/<\/math>/gi,"");var latexInlineRegEx=/\\\(.*\\\)/gi;var mathDisplayStyle=' display="block"';if(!mathBlockRegEx.test(mathStart))mathDisplayStyle=' display="inline"'; if(encoding==="latex"&&latexInlineRegEx.test(originalMath))mathDisplayStyle=' display="inline"';var mathStyleMatch=mathStyleRegEx.exec(mathStart);var style="";var encode;if(D2L.LP.Web.UI.Html.JavaScript.HtmlEncode!=undefined)encode=D2L.LP.Web.UI.Html.JavaScript.HtmlEncode;else encode=D2L.Util.Html.Encode;if(mathStyleMatch!=null)style=mathStyleMatch[1];var encodedMath=encode(originalMath);var annotatedMathML='<math title="'+title+'" '+style+' xmlns="http://www.w3.org/1998/Math/MathML"'+mathDisplayStyle+ "><semantics><mstyle>"+mathMLContent+'</mstyle><annotation encoding="'+encoding+'">'+'{"version":"1.1","math":"'+encodedMath+'"}'+"</annotation></semantics></math>";return annotatedMathML},DecodeMathML:function(str){if(str.indexOf("&")!=-1){str=str.replace(/&/g,"&");str=str.replace(/</g,"<");str=str.replace(/>/g,">");str=str.replace(/"/g,'"')}return str},GetMath:function(node,callback){if(!window.MathJax)return;MathJax.Hub.Queue(function(){var math=[];var allJax=MathJax.Hub.getAllJax(node); if(Array.isArray(allJax))allJax.forEach(function(jax){if(jax.root&&jax.root.toMathML)math.push({"originalMath":jax.originalText,"mathML":jax.root.toMathML()})});if(callback&&callback.call)callback.call(callback,math)});return},Update:function(callback){D2L.LP.Web.UI.Html.Math.UpdateNode(null,callback)},UpdateNode:function(node,callback){if(D2LMathML.ReadyState!=="ready")return;if(node)if(node.nodeType!==1&&node.nodeType!==9||node.tagName.toLowerCase()==="template")return;if(!window.MathJax){if(callback&& callback.call)callback.call(callback);return}if(MathJax.InputJax.TeX)try{MathJax.Hub.Queue(["resetEquationNumbers",MathJax.InputJax.TeX])}catch(e){}if(node)MathJax.Hub.Queue(["Typeset",MathJax.Hub,node]);else MathJax.Hub.Queue(["PreProcess",MathJax.Hub],["Reprocess",MathJax.Hub]);if(callback&&callback.call)MathJax.Hub.Queue(function(){callback.call(callback)})}}; D2LMathML={IsLatex:false,IsMathJaxRequested:false,ReadyState:null,m_message:"",m_afterPartialHandler:null,m_hasAfterPartialEvent:function(){return window.D2L&&window.D2L.LP&&window.D2L.LP.Web&&window.D2L.LP.Web.UI&&window.D2L.LP.Web.UI.Html&&window.D2L.LP.Web.UI.Html.PartialRendering&&window.D2L.LP.Web.UI.Html.PartialRendering.OnAfter},DesktopInit:function(mathMLUrl,latexUrl,scalingFactor){var isMathJaxLoaded=function(){if(document.head.querySelector("#mathJax"))return true;return false};var isMathJaxRequired= function(){if(this.IsLatex||this.IsMathJaxRequested||document.querySelector("math"))return true;return false}.bind(this);var loadMathJax=function(){if(D2LMathML.ReadyState)return;D2LMathML.ReadyState="loading";var mathJaxConfig={delayStartupUntil:"onload",showProcessingMessages:false,messageStyle:"none",menuSettings:{context:"MathJax",zoom:"None"},NativeMML:{showMathMenuMSIE:false,scale:scalingFactor+10},"HTML-CSS":{linebreaks:{automatic:true,width:"container"},imageFont:null,scale:scalingFactor}, styles:{".MathJax .merror":{"background-color":"#fff !important",color:"#494c4e !important",border:"1px solid #cd2026 !important"}}};var configScript="MathJax.Hub.Config("+JSON.stringify(mathJaxConfig)+");";var script=document.createElement("script");script.type="text/x-mathjax-config";script.textContent=configScript;document.head.appendChild(script);var mathJaxScript=document.createElement("script");mathJaxScript.id="mathJax";mathJaxScript.async="async";mathJaxScript.onload=function(){D2LMathML.ReadyState= "ready"};mathJaxScript.src=D2LMathML.IsLatex?latexUrl:mathMLUrl;document.head.appendChild(mathJaxScript)}.bind(this);if(isMathJaxLoaded())return;if(isMathJaxRequired())loadMathJax();else if(this.m_hasAfterPartialEvent()&&!this.m_afterPartialHandler){this.m_afterPartialHandler=function(){if(isMathJaxLoaded()||!isMathJaxRequired())return;loadMathJax();D2L.LP.Web.UI.Html.PartialRendering.OnAfter.RemoveListener(this.m_afterPartialHandler);D2L.LP.Web.UI.Common.Controls.HtmlBlock.OnAfterRender.RemoveListener(this.m_afterPartialHandler); this.m_afterPartialHandler=null}.bind(this);D2L.LP.Web.UI.Html.PartialRendering.OnAfter.AddListener(this.m_afterPartialHandler);D2L.LP.Web.UI.Common.Controls.HtmlBlock.OnAfterRender.AddListener(this.m_afterPartialHandler)}}};D2L.LP.Web.UI.Html.PartialRendering={}; D2L.LP.Web.UI.Html.PartialRendering={_includeClasses:[],AddClassNameToFocusIncludeList:function(className){D2L.LP.Web.UI.Html.PartialRendering._includeClasses[className]=true},InjectResult:function(placeholder,result,animationType,isInnerReplacement,activeNode,spinnerCheckmarkElementClassName,spinnerCheckmarkSize,animationOverlay){var ret=new D2L.LP.Web.UI.Events.Event;animationType=animationType||D2L.LP.Web.UI.Html.PartialRendering.Animation.Types.None;var hasAnimation=animationType!=D2L.LP.Web.UI.Html.PartialRendering.Animation.Types.None; var placeholderId=placeholder.getAttribute("id");var prc=D2L.LP.Web.UI.Html.PartialRendering.GetPartialRenderContext(placeholderId);var doInnerReplacement=D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-placeholder-inner",placeholder);var firstNewNode=null;var canSetSelection=D2L.LP.Web.UI.Html.PartialRendering.CanSetSelection(activeNode);var activeSelection={"selectionStart":canSetSelection?activeNode.selectionStart:0,"selectionEnd":canSetSelection?activeNode.selectionEnd:0};var pathToActiveNode=D2L.LP.Web.UI.Html.PartialRendering.GeneratePathToNode(activeNode, placeholder);var parentNode=placeholder.parentNode;if(parentNode!==null){var validClassNames=[];var validateClassNames=false;if(prc!==null){validClassNames=prc.GetValidClassNames();validateClassNames=validClassNames!==null&&validClassNames.length>0}var temp=document.createElement("div");temp.innerHTML=result.Html;var nodes=[];var fragment=document.createDocumentFragment();while(temp.firstChild){var isClassNameValid=true;if(validateClassNames&&temp.firstChild.nodeType==1)isClassNameValid=D2L.LP.Web.UI.Html.Dom.HasAnyClassName(validClassNames, temp.firstChild);if(!isClassNameValid)throw" The partial view contains nodes that are not valid in "+"the current context. The partial view node has class name: "+temp.firstChild.className+", but the valid class names "+"for this context are: "+prc.GetValidClassNames()+".";var newChild=fragment.appendChild(temp.firstChild);if(firstNewNode===null&&newChild.nodeType==1)firstNewNode=newChild;nodes.push(newChild)}var placeholderClone=null;if(hasAnimation)placeholderClone=D2L.LP.Web.UI.Html.PartialRendering.Animation.CloneForAnimation(placeholder); placeholder.innerHTML="";if(doInnerReplacement){placeholder.appendChild(fragment);if(window["CustomElements"]&&window["CustomElements"]["upgradeAll"])CustomElements.upgradeAll(placeholder);window.requestAnimationFrame(function(){D2L.LP.Web.UI.Events.OnViewRender.Trigger(placeholder);finish()})}else{parentNode.insertBefore(fragment,placeholder);parentNode.removeChild(placeholder);for(var i=0;i<nodes.length;i++){if(window["CustomElements"]&&window["CustomElements"]["upgradeAll"])CustomElements.upgradeAll(nodes[i]); (function(n,isLast){window.requestAnimationFrame(function(){D2L.LP.Web.UI.Events.OnViewRender.Trigger(n);if(isLast)finish()})})(nodes[i],i===nodes.length-1)}}}function finish(){for(var i=0;i<result.OnInit.length;i++)eval(result.OnInit[i]);for(var i=0;i<result.OnLoad.length;i++)eval(result.OnLoad[i]);var startAnimation=function(){if(animationType==D2L.LP.Web.UI.Html.PartialRendering.Animation.Types.Checkmark){D2L.LP.Web.UI.Html.PartialRendering.Animation.AnimateCheckmark(firstNewNode,spinnerCheckmarkElementClassName, spinnerCheckmarkSize,animationOverlay);return}var newNodesClone=[];for(var i=0;i<nodes.length;i++)newNodesClone.push(D2L.LP.Web.UI.Html.PartialRendering.Animation.CloneForAnimation(nodes[i]));D2L.LP.Web.UI.Html.PartialRendering.Animation.AnimateResult(animationType,firstNewNode,placeholderClone,newNodesClone)};if(hasAnimation&&D2L.LP.Web.UI.Html.Css.Capability.SupportsTransition())startAnimation();var currNode=D2L.LP.Web.UI.Html.PartialRendering.FindElementByPath(pathToActiveNode,isInnerReplacement? placeholder:firstNewNode);if(currNode===null){var ph=D2L.LP.Web.UI.Html.Dom.GetElementById(placeholderId);currNode=D2L.LP.Web.UI.Html.Dom.GetNextFocusableElement(ph)}if(D2L.LP.Web.UI.Html.PartialRendering.CanSetSelection(currNode)){currNode.selectionStart=activeSelection.selectionStart;currNode.selectionEnd=activeSelection.selectionEnd}D2L.LP.Web.UI.Html.Dom.FocusNode(currNode);ret.Trigger(firstNewNode)}return ret},PartialRender:function(id,provider,animationType,hideSpinner,spinnerCheckmarkOption){var spinnerCheckmarkElementClassName= null;var spinnerCheckmarkSize=D2L.LP.Web.UI.Html.PartialRendering.SpinnerCheckmarkSizes.Small;var loadingDelayInMilliseconds=0;var hasSpinnerCheckmarkAnimation=false;if(spinnerCheckmarkOption){hasSpinnerCheckmarkAnimation=true;spinnerCheckmarkSize=spinnerCheckmarkOption.Size;spinnerCheckmarkElementClassName=spinnerCheckmarkOption.ElementClassName;loadingDelayInMilliseconds=spinnerCheckmarkOption.LoadingDelay}D2L.LP.Web.UI.Html.PartialRendering.OnBefore.Trigger(id);var ret=new D2L.LP.Web.UI.Events.Event; var placeholder=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(placeholder===null){ret.Release();throw"Placeholder not found: '"+id.GetValue()+"'.";}var isInnerReplacement=D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-placeholder-inner",placeholder);var hasLoading=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-loading",placeholder).length>0;var shim=null,shim2=null;var done=false;var animationOverlay=null;var getSize=function(size){switch(size){case D2L.LP.Web.UI.Html.PartialRendering.SpinnerCheckmarkSizes.Small:return 50; case D2L.LP.Web.UI.Html.PartialRendering.SpinnerCheckmarkSizes.Large:return 100}return 50};var spinnerCheckmarkLoad=function(){var animationNode=placeholder;if(spinnerCheckmarkElementClassName){var elements=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName(spinnerCheckmarkElementClassName,placeholder);for(var i=0;i<elements.length;i++)if(placeholder.contains(elements[i])){animationNode=elements[i];break}}var animationContainer=document.createElement("div");animationContainer.className="d2l-partial-render-animation-container"; animationContainer.setAttribute("change-image-loading","");var animationParentNode=animationNode.parentNode;animationParentNode.replaceChild(animationContainer,animationNode);animationContainer.appendChild(animationNode);var spinner=document.createElement("d2l-loading-spinner");spinner.setAttribute("size",getSize(spinnerCheckmarkSize).toString());animationContainer.appendChild(spinner);var animationRect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(animationNode);animationOverlay=document.createElement("div"); animationOverlay.className="d2l-partial-render-animation-overlay";animationOverlay.style.top=animationRect.top+"px";animationOverlay.style.left=animationRect.left+"px";animationOverlay.style.width=animationRect.width+"px";animationOverlay.style.height=animationRect.height+"px";document.body.appendChild(animationOverlay)};var rect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(placeholder);if(rect!==null){shim=document.createElement("div");shim.className="d2l-partial-render-shim1";shim2=document.createElement("div"); shim2.className="d2l-partial-render-shimbg1";shim.style.top=shim2.style.top=rect.top+"px";shim.style.left=shim2.style.left=rect.left+"px";shim.style.width=shim2.style.width=rect.width+"px";shim.style.height=shim2.style.height=rect.height+"px";document.body.appendChild(shim);document.body.appendChild(shim2);setTimeout(function(){if(!hasLoading&&!done)if(hasSpinnerCheckmarkAnimation)spinnerCheckmarkLoad();else if(!hideSpinner){D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-partial-render-shim2",shim);D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-partial-render-shimbg2", shim2)}},500)}var deleteShim=function(){if(shim!==null&&shim.parentNode!==null)shim.parentNode.removeChild(shim);if(shim2!==null&&shim2.parentNode!==null)shim2.parentNode.removeChild(shim2)};var finish=function(val){deleteShim();ret.Trigger(val);D2L.LP.Web.UI.Html.PartialRendering.OnAfter.Trigger(id)};var activeElement=D2L.LP.Web.UI.Html.Dom.GetActiveElement(document);var handleResult=function(result){if(hasSpinnerCheckmarkAnimation)animationType=D2L.LP.Web.UI.Html.PartialRendering.Animation.Types.Checkmark; done=true;if(!result){finish(false);return}placeholder=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(placeholder===null){finish(false);return}var hasHistoryEntry=result.HistoryEntryUrl!==null&&result.HistoryEntryUrl!==undefined&&result.HistoryEntryProvider!==null&&result.HistoryEntryProvider!==undefined;if(hasHistoryEntry){var historyEntryProvider=eval(result.HistoryEntryProvider)(id);var historyEntryReviver=D2L.LP.Web.UI.Html.PartialRendering.CreateReviver(id,historyEntryProvider,animationType, hideSpinner);D2L.LP.Web.UI.Html.PartialRendering.History.PushState(id,result.HistoryEntryUrl,result.HistoryEntryTitle,historyEntryReviver)}var injectEvt=D2L.LP.Web.UI.Html.PartialRendering.InjectResult(placeholder,result,animationType,isInnerReplacement,activeElement,spinnerCheckmarkElementClassName,spinnerCheckmarkSize,animationOverlay);injectEvt.AddListener(function(){finish(true)})};var delayedHandleResult=function(result){setTimeout(function(){handleResult(result)},loadingDelayInMilliseconds)}; var resultHandler=hasSpinnerCheckmarkAnimation&&loadingDelayInMilliseconds>0?delayedHandleResult:handleResult;var evt=provider.call(provider);evt.AddListener(resultHandler);evt.AddReleaseListener(function(){ret.Release()});return ret},CreateReviver:function(id,provider,animationType,hideSpinner){var reviver=function(){return D2L.LP.Web.UI.Html.PartialRendering.PartialRender(id,provider,animationType,hideSpinner)};return reviver},GetPartialRenderContext:function(placeholderId){var prc=null;if(placeholderId!== null)prc=D2L.LP.Web.UI.ObjectRepository.TryGet(placeholderId,0);if(prc===null)prc=new D2L.LP.Web.UI.Html.PartialRendering.PartialHtmlRenderContext;var placeholderNode=D2L.LP.Web.UI.Html.Dom.GetElementById(placeholderId);if(placeholderNode&&D2L.LP.Web.UI.Html.Dom.GetParentElementByClassName("d2l-form-primary",placeholderNode)!=null)prc.SetHasActiveForm(true);return prc},GetInitialRenderProvider:function(placeholderId){var provider=null;if(placeholderId!==null&&placeholderId!==undefined)provider=D2L.LP.Web.UI.ObjectRepository.TryGet(placeholderId, "InitialRenderProvider");return provider},CanSetSelection:function(selectionNode){if(!selectionNode||!("selectionStart"in selectionNode)||!("selectionEnd"in selectionNode)||!selectionNode.tagName)return false;var tagName=selectionNode.tagName.toLowerCase();if(tagName=="textarea")return true;if(tagName!="input")return false;var attributeType=selectionNode.getAttribute("type").toLowerCase();if(attributeType=="text"||attributeType=="password"||attributeType=="search"||attributeType=="telephone"||attributeType== "url")return true;return false},GeneratePathToNode:function(startNode,endNode){var path=[];var currElement=startNode;if(startNode==null||startNode==undefined||endNode==null||endNode==undefined)return[];while(true){var nodeIndex=D2L.LP.Web.UI.Html.Dom.IndexOfElement(currElement);path.push({tagName:currElement.tagName,className:currElement.className,childIndex:nodeIndex});if(currElement==endNode)break;currElement=currElement.parentNode;if(currElement==null){path=[];break}}return path},FindElementByPath:function(path, rootNode){if(path===undefined||path===null||path.length===0)return false;if(!D2L.LP.Web.UI.Html.PartialRendering.CompareElements(path[path.length-1],rootNode))return false;var currNode=rootNode;for(var j=path.length-2;j>=0;j--){var pathElem=D2L.LP.Web.UI.Html.PartialRendering.FindMatchingElementInChildren(path[j],currNode);if(pathElem===null){currNode=null;break}currNode=pathElem}return currNode},FindMatchingElementInChildren:function(refElem,parent){if(parent===undefined||parent===null)return null; var children=D2L.LP.Web.UI.Html.PartialRendering.GetChildNodes(parent);for(var i=0;i<children.length;i++)if(D2L.LP.Web.UI.Html.Dom.IndexOfElement(children[i])==refElem.childIndex&&D2L.LP.Web.UI.Html.PartialRendering.CompareElements(refElem,children[i]))return children[i];return null},GetChildNodes:function(parent){var children=[];var parentChildren=parent.childNodes;for(var i=parentChildren.length;i>=0;i--)if(parentChildren[i]!==undefined&&parentChildren[i]!==null&&parentChildren[i].nodeType==1)children.push(parentChildren[i]); return children},RegexD2lClassName:/d2l_[0-9]*_[0-9]*_[0-9]*/,CompareElements:function(elem1,elem2){if(elem1==null||elem1==undefined||elem2==null||elem2==undefined)return false;if(elem1.tagName!=elem2.tagName)return false;var classes=D2L.LP.Web.UI.Html.PartialRendering.GetClassNamesForMatching(elem1);var classes2=D2L.LP.Web.UI.Html.PartialRendering.GetClassNamesForMatching(elem2);if(classes.length!=classes2.length)return false;var numClassNameMatches=0;for(var i=0;i<classes.length;i++){if(!D2L.LP.Web.UI.Html.PartialRendering.RegexD2lClassName.test(classes[i]))if(!D2L.LP.Web.UI.Html.Dom.HasClassName(classes[i], elem2))break;numClassNameMatches++}return numClassNameMatches==classes.length},GetClassNamesForMatching:function(elem){var classNames=elem.className.split(" ");var validClassNames=[];for(var i=classNames.length-1;i>=0;i--){var className=classNames[i];if(className in D2L.LP.Web.UI.Html.PartialRendering._includeClasses)validClassNames.push(className)}return validClassNames},History:{IsAvailable:"history"in window&&"pushState"in window.history,IsReviving:false,Revivers:{},AddPopStateListener:function(){if(!D2L.LP.Web.UI.Html.PartialRendering.History.IsAvailable)return; D2L.LP.Web.UI.Html.Dom.AddEventListener("popstate",window,D2L.LP.Web.UI.Html.PartialRendering.History.HandlePopState)},QueueEvent:null,QueueHistoryTask:function(func){var event=new D2L.LP.Web.UI.Events.Event;var callFunc=function(){func(event)};var event0=D2L.LP.Web.UI.Html.PartialRendering.History.QueueEvent;if(event0!==null&&event0!==undefined){event0.AddListener(callFunc);event0.AddReleaseListener(function(){event.Release()})}else setTimeout(callFunc,0);D2L.LP.Web.UI.Html.PartialRendering.History.QueueEvent= event;var clearQueueEvent=function(){if(D2L.LP.Web.UI.Html.PartialRendering.History.QueueEvent===event)D2L.LP.Web.UI.Html.PartialRendering.History.QueueEvent=null};event.AddListener(clearQueueEvent);event.AddReleaseListener(clearQueueEvent);return event},HandlePopState:function(event){var stateObj=event.state;var popStateTask=function(evt){return D2L.LP.Web.UI.Html.PartialRendering.History.PopStateImpl(evt,stateObj)};return D2L.LP.Web.UI.Html.PartialRendering.History.QueueHistoryTask(popStateTask)}, PopStateImpl:function(event,stateObj){if(stateObj===null||stateObj===undefined||stateObj.Key===undefined){event.Trigger();return}var reviver=D2L.LP.Web.UI.Html.PartialRendering.History.Revivers[stateObj.Key];if(reviver===undefined){if(stateObj.Url!==undefined)window.location=stateObj.Url;event.Release();return}D2L.LP.Web.UI.Html.PartialRendering.History.IsReviving=true;var reviveEvent=reviver();reviveEvent.AddListener(function(){D2L.LP.Web.UI.Html.PartialRendering.History.IsReviving=false;if(stateObj.Title!== null&&stateObj.Title!==undefined)document.title=stateObj.Title;event.Trigger()});reviveEvent.AddReleaseListener(function(){event.Release()})},StripSchemeAndAuthority:function(urlObject){return urlObject.pathname+urlObject.search+urlObject.hash},TrySaveInitialState:function(id){var stateObj=window.history.state;var isInitialState=stateObj===null||stateObj===undefined||stateObj.Key===undefined||D2L.LP.Web.UI.Html.PartialRendering.History.Revivers[stateObj.Key]===undefined;if(!isInitialState)return; var url=D2L.LP.Web.UI.Html.PartialRendering.History.StripSchemeAndAuthority(window.location);var title=window.document.title;var placeholderId=id.GetValue();var key=placeholderId+","+url;stateObj={Key:key,PlaceholderId:placeholderId,Title:title,Url:url};var initialRenderProvider=D2L.LP.Web.UI.Html.PartialRendering.GetInitialRenderProvider(placeholderId);if(initialRenderProvider!==null)D2L.LP.Web.UI.Html.PartialRendering.History.Revivers[stateObj.Key]=D2L.LP.Web.UI.Html.PartialRendering.CreateReviver(id, initialRenderProvider);if(!D2L.LP.Web.UI.Html.PartialRendering.History.IsReviving)window.history.replaceState(stateObj,stateObj.Title,stateObj.Url)},PushState:function(id,url,title,reviver){if(!D2L.LP.Web.UI.Html.PartialRendering.History.IsAvailable)return;D2L.LP.Web.UI.Html.PartialRendering.History.TrySaveInitialState(id);var placeholderId=id.GetValue();var key=placeholderId+","+url;var stateObj={Key:key,PlaceholderId:placeholderId,Title:title,Url:url};D2L.LP.Web.UI.Html.PartialRendering.History.Revivers[stateObj.Key]= reviver;if(!D2L.LP.Web.UI.Html.PartialRendering.History.IsReviving)window.history.pushState(stateObj,title,url);if(title!==null&&title!==undefined)document.title=title}}};D2L.LP.Web.UI.Html.PartialRendering.SpinnerCheckmarkSizes={Small:0,Large:1}; D2L.LP.Web.UI.Html.PartialRendering.Animation={AnimateResult:function(animationType,firstNewNode,placeholderClone,newNodesClone){switch(animationType){case D2L.LP.Web.UI.Html.PartialRendering.Animation.Types.SlideLeft:case D2L.LP.Web.UI.Html.PartialRendering.Animation.Types.SlideRight:case D2L.LP.Web.UI.Html.PartialRendering.Animation.Types.SlideLeftWithFade:case D2L.LP.Web.UI.Html.PartialRendering.Animation.Types.SlideRightWithFade:var isSlideLeft=animationType==D2L.LP.Web.UI.Html.PartialRendering.Animation.Types.SlideLeftWithFade|| animationType==D2L.LP.Web.UI.Html.PartialRendering.Animation.Types.SlideLeft;var hasHFade=animationType==D2L.LP.Web.UI.Html.PartialRendering.Animation.Types.SlideLeftWithFade||animationType==D2L.LP.Web.UI.Html.PartialRendering.Animation.Types.SlideRightWithFade;D2L.LP.Web.UI.Html.PartialRendering.Animation.AnimateHorizontalSlide(isSlideLeft,hasHFade,firstNewNode,placeholderClone,newNodesClone);break;case D2L.LP.Web.UI.Html.PartialRendering.Animation.Types.SlideUp:case D2L.LP.Web.UI.Html.PartialRendering.Animation.Types.SlideDown:case D2L.LP.Web.UI.Html.PartialRendering.Animation.Types.SlideUpWithFade:case D2L.LP.Web.UI.Html.PartialRendering.Animation.Types.SlideDownWithFade:var isSlideUp= animationType==D2L.LP.Web.UI.Html.PartialRendering.Animation.Types.SlideUpWithFade||animationType==D2L.LP.Web.UI.Html.PartialRendering.Animation.Types.SlideUp;var hasVFade=animationType==D2L.LP.Web.UI.Html.PartialRendering.Animation.Types.SlideUpWithFade||animationType==D2L.LP.Web.UI.Html.PartialRendering.Animation.Types.SlideDownWithFade;D2L.LP.Web.UI.Html.PartialRendering.Animation.AnimateVerticalSlide(isSlideUp,hasVFade,firstNewNode,placeholderClone,newNodesClone);break}},AnimateCheckmark:function(firstNewNode, spinnerCheckmarkElementClassName,size,animationOverlay){var animationNode=firstNewNode;if(spinnerCheckmarkElementClassName){var elements=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName(spinnerCheckmarkElementClassName,firstNewNode);for(var i=0;i<elements.length;i++)if(firstNewNode.contains(elements[i])){animationNode=elements[i];break}}var animationParentNode=animationNode.parentNode;var animationContainer=null;if(animationParentNode.className==="d2l-partial-render-animation-container"){animationContainer= animationParentNode;if(animationContainer.hasAttribute("change-image-loading"))animationContainer.removeAttribute("change-image-loading");animationParentNode=animationParentNode.parentNode}else{animationContainer=document.createElement("div");animationContainer.className="d2l-partial-render-animation-container";animationParentNode.replaceChild(animationContainer,animationNode);animationContainer.appendChild(animationNode)}animationContainer.setAttribute("change-image-success","");var checkmarkContainer= document.createElement("div");checkmarkContainer.className="d2l-partial-render-animation-checkmark-container";var checkmark=document.createElement("d2l-icon");checkmark.className="d2l-partial-render-animation-checkmark";checkmark.setAttribute("icon","d2l-tier2:check");checkmarkContainer.appendChild(checkmark);switch(size){case D2L.LP.Web.UI.Html.PartialRendering.SpinnerCheckmarkSizes.Small:D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-partial-render-animation-checkmark-container-small",checkmarkContainer); break;case D2L.LP.Web.UI.Html.PartialRendering.SpinnerCheckmarkSizes.Large:D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-partial-render-animation-checkmark-container-large",checkmarkContainer);break}animationContainer.appendChild(checkmarkContainer);var animationDuration=400;var startAnimation=function(){setTimeout(finishAnimation,animationDuration)};var finishAnimation=function(){animationParentNode.replaceChild(animationNode,animationContainer);if(animationOverlay!==null&&animationOverlay.parentNode!== null)animationOverlay.parentNode.removeChild(animationOverlay)};setTimeout(startAnimation,0)},AnimateHorizontalSlide:function(isSlideLeft,hasFade,firstNewNode,placeholderClone,newNodesClone){var isRTLCulture=D2L.LP.Globalization.Locale.GetTextFormatDescriptor().TextDirection==D2L.LP.Globalization.Formatting.Text.TextDirection.RightToLeft;if(isRTLCulture)isSlideLeft=!isSlideLeft;var animationDuration=400;var separatorWidth=10;var prevWidth=placeholderClone.d2l_boundingRect.width;var sliderOpener=document.createElement("div"); sliderOpener.className="d2l-partial-render-animation-horizontal-slider-opener";D2L.LP.Web.UI.Html.Aria.SetRole(sliderOpener,"presentation");var sliderWindow=document.createElement("div");sliderWindow.className="d2l-partial-render-animation-horizontal-slider-window";sliderOpener.appendChild(sliderWindow);var slider=document.createElement("div");slider.className="d2l-partial-render-animation-horizontal-slider";sliderWindow.appendChild(slider);var sliderPrevPanel=document.createElement("div");sliderPrevPanel.className= "d2l-partial-render-animation-horizontal-slider-prev";sliderPrevPanel.style.width=prevWidth+"px";D2L.LP.Web.UI.Html.Aria.SetRole(sliderPrevPanel,"presentation");var separatorPanel=document.createElement("div");separatorPanel.className="d2l-partial-render-animation-horizontal-slider-separator";separatorPanel.style.width=separatorWidth+"px";separatorPanel.style.height="1px";var sliderNextPanel=document.createElement("div");sliderNextPanel.className="d2l-partial-render-animation-horizontal-slider-next"; D2L.LP.Web.UI.Html.Aria.SetRole(sliderNextPanel,"presentation");if(isSlideLeft){slider.appendChild(sliderPrevPanel);slider.appendChild(separatorPanel);slider.appendChild(sliderNextPanel);if(isRTLCulture)slider.style.left=prevWidth+"px";else slider.style.left="0px"}else{slider.appendChild(sliderNextPanel);slider.appendChild(separatorPanel);slider.appendChild(sliderPrevPanel);if(isRTLCulture)slider.style.left="0px";else slider.style.left=-(prevWidth+separatorWidth)+"px"}if(hasFade){sliderNextPanel.style.opacity= 0;sliderPrevPanel.style.opacity=1}var clearFloat=document.createElement("div");clearFloat.className="d2l-clear";slider.appendChild(clearFloat);sliderPrevPanel.appendChild(placeholderClone);for(var i=0;i<newNodesClone.length;i++)sliderNextPanel.appendChild(newNodesClone[i]);firstNewNode.parentNode.insertBefore(sliderOpener,firstNewNode);var newContentBoundingRect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(sliderNextPanel);slider.style.width=prevWidth+newContentBoundingRect.width+separatorWidth+"px";sliderWindow.style.width= newContentBoundingRect.width+"px";var startAnimation=function(){setTimeout(finishAnimation,animationDuration);if(isSlideLeft)if(isRTLCulture)slider.style.left="0px";else slider.style.left=-(prevWidth+separatorWidth)+"px";else if(isRTLCulture)slider.style.left=prevWidth+separatorWidth+"px";else slider.style.left="0px";if(hasFade){sliderNextPanel.style.opacity=1;sliderPrevPanel.style.opacity=0}};var finishAnimation=function(){sliderOpener.parentNode.removeChild(sliderOpener)};setTimeout(startAnimation, 0)},AnimateVerticalSlide:function(isSlideUp,hasFade,firstNewNode,placeholderClone,newNodesClone){var animationDuration=400;var separatorHeight=10;var prevHeight=placeholderClone.d2l_boundingRect.height;var sliderOpener=document.createElement("div");sliderOpener.className="d2l-partial-render-animation-vertical-slider-opener";D2L.LP.Web.UI.Html.Aria.SetRole(sliderOpener,"presentation");var sliderWindow=document.createElement("div");sliderWindow.className="d2l-partial-render-animation-vertical-slider-window"; sliderOpener.appendChild(sliderWindow);var slider=document.createElement("div");slider.className="d2l-partial-render-animation-vertical-slider";sliderWindow.appendChild(slider);var sliderPrevPanel=document.createElement("div");sliderPrevPanel.className="d2l-partial-render-animation-vertical-slider-prev";sliderPrevPanel.style.height=prevHeight+"px";D2L.LP.Web.UI.Html.Aria.SetRole(sliderPrevPanel,"presentation");var separatorPanel=document.createElement("div");separatorPanel.className="d2l-partial-render-animation-vertical-slider-separator"; separatorPanel.style.height=separatorHeight+"px";separatorPanel.style.width="1px";var sliderNextPanel=document.createElement("div");sliderNextPanel.className="d2l-partial-render-animation-vertical-slider-next";D2L.LP.Web.UI.Html.Aria.SetRole(sliderNextPanel,"presentation");if(isSlideUp){slider.appendChild(sliderPrevPanel);slider.appendChild(separatorPanel);slider.appendChild(sliderNextPanel);slider.style.top="0px"}else{slider.appendChild(sliderNextPanel);slider.appendChild(separatorPanel);slider.appendChild(sliderPrevPanel); slider.style.top=-(prevHeight+separatorHeight)+"px"}if(hasFade){sliderNextPanel.style.opacity=0;sliderPrevPanel.style.opacity=1}sliderPrevPanel.appendChild(placeholderClone);for(var i=0;i<newNodesClone.length;i++)sliderNextPanel.appendChild(newNodesClone[i]);firstNewNode.parentNode.insertBefore(sliderOpener,firstNewNode);var newContentBoundingRect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(sliderNextPanel);slider.style.height=prevHeight+newContentBoundingRect.height+separatorHeight+"px";sliderWindow.style.height= newContentBoundingRect.height+"px";var startAnimation=function(){setTimeout(finishAnimation,animationDuration);if(isSlideUp)slider.style.top=-(prevHeight+separatorHeight)+"px";else slider.style.top="0px";if(hasFade){sliderNextPanel.style.opacity=1;sliderPrevPanel.style.opacity=0}};var finishAnimation=function(){sliderOpener.parentNode.removeChild(sliderOpener)};setTimeout(startAnimation,0)},CloneForAnimation:function(node){var cleanupAttributes=function(attrElement){D2L.LP.Web.UI.Html.Aria.RemoveAttribute(attrElement, "live");attrElement.removeAttribute("name");attrElement.removeAttribute("id")};var clone=node.cloneNode(true);if(clone.nodeType==1){var allElems=clone.all?clone.all:clone.getElementsByTagName("*");for(var i=0;i<allElems.length;i++){var elem=allElems[i];cleanupAttributes(elem)}cleanupAttributes(clone);var boundingRect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(node);clone.style.width=boundingRect.width+"px";clone.d2l_boundingRect=boundingRect}return clone}}; D2L.LP.Web.UI.Html.PartialRendering.Animation.Types={None:0,SlideLeft:1,SlideRight:2,SlideLeftWithFade:3,SlideRightWithFade:4,SlideUp:5,SlideDown:6,SlideUpWithFade:7,SlideDownWithFade:8,Checkmark:9}; D2L.LP.Web.UI.Html.PartialRendering.PartialHtmlRenderContext=D2L.Class.Create({Construct:function(){this.m_headingLevel=1;this.m_scope="";this.m_childScopeCounters="";this.m_validClassNames=[];this.m_hasActiveForm=false;this.m_isPrintMode=false},_deserialize:function(deserializer){this.m_headingLevel=deserializer.GetMember("HeadingLevel");this.m_scope=deserializer.GetMember("Scope");if(deserializer.HasMember("ChildScopeCounters"))this.m_childScopeCounters=deserializer.GetMember("ChildScopeCounters"); this.m_validClassNames=deserializer.GetMember("ValidClassNames");if(deserializer.HasMember("IsPrintMode"))this.m_isPrintMode=deserializer.GetMember("IsPrintMode")},_serialize:function(serializer){serializer.AddMember("headingLevel",this.m_headingLevel);serializer.AddMember("scope",this.m_scope);if(this.m_childScopeCounters)serializer.AddMember("childScopeCounters",this.m_childScopeCounters);serializer.AddMember("validClassNames",this.m_validClassNames);serializer.AddMember("hasActiveForm",this.m_hasActiveForm); if(this.m_isPrintMode)serializer.AddMember("isPrintMode",this.m_isPrintMode)},GetValidClassNames:function(){return this.m_validClassNames},SetHasActiveForm:function(hasActiveForm){this.m_hasActiveForm=hasActiveForm}});D2L.LP.Web.UI.Html.PartialRendering.OnBefore=new D2L.LP.Web.UI.Events.Event;D2L.LP.Web.UI.Html.PartialRendering.OnAfter=new D2L.LP.Web.UI.Events.Event; D2L.LP.Web.UI.Html.ReturnPoints={LocalStorageKey:"ReturnPoints",Get:function(key,defaultLocation){var me=D2L.LP.Web.UI.Html.ReturnPoints;me.ValidateKey(key);me.ValidateLocation(defaultLocation);var data=me.Read();for(var i=data.length-1;i>-1;i--)if(data[i].key===key){var location=new D2L.LP.Web.Http.UrlLocation(data[i].url);data=data.slice(0,i);me.Write(data);return location}return defaultLocation},Set:function(key,location){var me=D2L.LP.Web.UI.Html.ReturnPoints;if(location===undefined)location= new D2L.LP.Web.Http.UrlLocation(document.location.href);location.RemoveQueryString("dst");if(!location.HasQueryString("returnPoint"))location=location.WithQueryString("returnPoint","1");me.ValidateKey(key);me.ValidateLocation(location);var data=me.Read();var entry={key:key,url:location.GetUrl()};data.push(entry);me.Write(data)},TryPeek:function(key){var me=D2L.LP.Web.UI.Html.ReturnPoints;me.ValidateKey(key);var data=me.Read();for(var i=data.length-1;i>-1;i--)if(data[i].key===key){var location=new D2L.LP.Web.Http.UrlLocation(data[i].url); return location}return null},Read:function(){var me=D2L.LP.Web.UI.Html.ReturnPoints;var json=D2L.LP.Web.UI.Html.Dom.Storage.Session.Get(me.LocalStorageKey);if(json===undefined||json===null||json.length===0)return[];var data=D2L.LP.Web.Serialization.Json.Deserialize(json);return data},Reset:function(){var me=D2L.LP.Web.UI.Html.ReturnPoints;D2L.LP.Web.UI.Html.Dom.Storage.Session.Remove(me.LocalStorageKey)},ValidateKey:function(key){if(key===undefined||key===null||key.length===0)throw"Invalid key."; },ValidateLocation:function(location){if(location===undefined||location===null)throw"Invalid location.";},Write:function(data){var me=D2L.LP.Web.UI.Html.ReturnPoints;if(data.length===0)me.Reset();var json=JSON.stringify(data);D2L.LP.Web.UI.Html.Dom.Storage.Session.Set(me.LocalStorageKey,json,false)}};D2L.LP.Web.UI.Html.Style={};D2L.LP.Web.UI.Html.Style.OverlayPosition={Top:1,Right:2,Bottom:3,Left:4,Mouse:5}; D2L.LP.Web.UI.Html.Style.IncludeStyleSheet=function(src,params){var head=document.getElementsByTagName("head");if(head.length!=1)return;var sep=src.indexOf("?")>-1?"&":"?";for(var key in params){src+=sep+D2L.LP.Web.UI.Html.JavaScript.UrlEncode(key)+"="+D2L.LP.Web.UI.Html.JavaScript.UrlEncode(params[key]);sep="&"}var styles=document.getElementsByTagName("style");if(styles.length>0){var reSrc=src.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");if(styles[0].innerHTML.search(new RegExp("@import url\\('.*"+ reSrc+"'\\);","gm"))>-1)return}var links=document.getElementsByTagName("link");for(var i=0;i<links.length;i++){var href=links[i].href;if(href.length>=src.length){var end=href.substr(href.length-src.length);if(end==src)return}}var link=document.createElement("link");link.rel="stylesheet";link.type="text/css";link.href=src;head[0].appendChild(link)}; D2L.LP.Web.UI.Html.Style.IncludeStyleBlock=function(css){var head=document.getElementsByTagName("head");if(head.length!=1)return;var lastStyle=document.getElementById("d2l-style-block");if(lastStyle){css=lastStyle.innerHTML+css;lastStyle.parentNode.removeChild(lastStyle)}var style=document.createElement("style");style.id="d2l-style-block";try{style.appendChild(document.createTextNode(css))}catch(e){if(style.styleSheet)style.styleSheet.cssText=css}head[0].appendChild(style);return style}; D2L.Control.Button=D2L.Control.extend({Construct:function(text){arguments.callee.$.Construct.call(this);this.m_float=D2L.Style.Float.None;this.m_isEnabled=true;this.m_isDisplayed=true;this.m_isPrimary=false;this.m_text=D2L.LP.Text.IText.Normalize(text,"D2L.Control.Button","Constructor","text");this.m_title=null;this.m_onClick=null;this.m_clickTime=null},BuildDom:function(){if(this.IsRendered())return null;arguments.callee.$.BuildDom.call(this);var win=this.GetWindow();var b=win.D2L.LP.Web.UI.Common.Controls.Button; var node=b.Build(win.document);this.SetDomNode(node);var me=this;this.OnDomInsertion.RegisterMethod(function(){b.Init(node);me.SetFloat(me.m_float);me.SetIsDisplayed(me.m_isDisplayed);me.SetIsEnabled(me.m_isEnabled);me.SetIsPrimary(me.m_isPrimary);me.SetText(me.m_text);if(me.m_title!==me)me.SetTitle(me.m_title);if(me.m_onClick!==null)b.SetOnClickNode(node,me.m_onClick)});return node},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);var node= this.GetDomNode();this.GetWindow().D2L.LP.Web.UI.Common.Controls.Button.InitAria(node);this.m_isEnabled=this.GetWindow().D2L.LP.Web.UI.Common.Controls.Button.IsEnabledNode(node);this.m_isDisplayed=this.GetWindow().D2L.LP.Web.UI.Common.Controls.Button.IsVisibleNode(node);this.m_isPrimary=this.GetWindow().D2L.LP.Web.UI.Common.Controls.Button.IsPrimaryNode(node);this.m_text=new D2L.LP.Text.PlainText(this.GetWindow().D2L.LP.Web.UI.Common.Controls.Button.GetTextNode(node));this.m_title=new D2L.LP.Text.PlainText(this.GetWindow().D2L.LP.Web.UI.Common.Controls.Button.GetTitleNode(node)); if(D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-left",node))this.m_float=D2L.Style.Float.Left;else if(D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-right",node))this.m_float=D2L.Style.Float.Right;this.SetOnClick(new Function(deserializer.GetMember()))},Click:function(){if(!this.IsRendered())return;this.GetWindow().D2L.LP.Web.UI.Common.Controls.Button.ClickNode(this.GetDomNode())},Focus:function(){if(this.IsRendered()&&this.IsDisplayed())this.GetDomNode().focus()},GetFloat:function(){return this.m_float},GetName:function(){UI.GetMessageArea().AddWarningMessage(new D2L.LP.Text.PlainText("Button.GetName() is obsolete. "+ "Use GetControlId() instead."),true);return this.GetControlId().ID()},GetText:function(){return this.m_text},Hide:function(){this.SetIsDisplayed(false)},IsDisplayed:function(){return this.m_isDisplayed},IsEnabled:function(){return this.m_isEnabled},IsPrimary:function(){return this.m_isPrimary},SetIsDisplayed:function(isDisplayed){if(isDisplayed===this.IsDisplayed())return;this.m_isDisplayed=isDisplayed;if(!this.IsRendered())return;this.GetWindow().D2L.LP.Web.UI.Common.Controls.Button.SetIsVisibleNode(this.GetDomNode(), isDisplayed);var e=new D2L.TransformEvent(this.GetDomNode());e.Bubble()},SetFloat:function(val){this.m_float=val;if(!this.IsRendered())return;var node=this.GetDomNode();D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-left",node);D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-right",node);if(this.m_float==D2L.Style.Float.Left)D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-left",node);else if(this.m_float==D2L.Style.Float.Right)D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-right",node)},SetIsEnabled:function(isEnabled){this.m_isEnabled= isEnabled;if(this.IsRendered())this.GetWindow().D2L.LP.Web.UI.Common.Controls.Button.SetIsEnabledNode(this.GetDomNode(),isEnabled)},SetIsPrimary:function(isPrimary){this.m_isPrimary=isPrimary;if(this.IsRendered())this.GetWindow().D2L.LP.Web.UI.Common.Controls.Button.SetIsPrimaryNode(this.GetDomNode(),isPrimary)},SetOnClick:function(onClick){if(!onClick)return;var navInfo=new D2L.NavInfo;navInfo.SetOnClick(onClick);this.SetNav(navInfo)},SetNav:function(navInfo){if(!navInfo)return;var navStruct=navInfo.SetupHrefOnClick(this, false);var me=this;this.m_onClick=function(){navStruct.OnClick.call(me)};if(this.IsRendered())this.GetWindow().D2L.LP.Web.UI.Common.Controls.Button.SetOnClickNode(this.GetDomNode(),this.m_onClick)},SetText:function(text){this.m_text=D2L.LP.Text.IText.Normalize(text,"D2L.Control.Button","SetText","text");if(!this.IsRendered())return;var me=this;this.m_text.GetText().Register(function(val){me.GetWindow().D2L.LP.Web.UI.Common.Controls.Button.SetTextNode(me.GetDomNode(),val)})},SetTitle:function(title){this.m_title= D2L.LP.Text.IText.Normalize(title,"D2L.Control.Button","SetTitle","title");if(!this.IsRendered())return;var me=this;this.m_title.GetText().Register(function(val){me.GetWindow().D2L.LP.Web.UI.Common.Controls.Button.SetTitleNode(me.GetDomNode(),val)})},Show:function(){this.SetIsDisplayed(true)}}); D2L.Button=D2L.Control.Button.extend({Construct:function(name,text,onClick){arguments.callee.$.Construct.call(this,text);if(name!==undefined)this.SetControlId(name);if(onClick!==undefined)this.SetOnClick(onClick);UI.GetMessageArea().AddWarningMessage(new D2L.LP.Text.PlainText("D2L.Button( name, text, onClick ) "+"constructor is obsolete. Use D2L.Control.Button( text ) "+"instead."),true)}}); D2L.Control.Button.Type={Custom:0,Cancel:1,Ok:2,Yes:3,No:4,Save:5,Create:6,Copy:7,Insert:8,Close:9,Add:10,Back:11,Next:12}; D2L.Control.Button.GetTermForType=function(type){var term=null;if(type==D2L.Control.Button.Type.Cancel)term=new D2L.LP.Text.LangTerm("Standard.Buttons.btnCancel");else if(type==D2L.Control.Button.Type.Ok)term=new D2L.LP.Text.LangTerm("Standard.Buttons.btnOk");else if(type==D2L.Control.Button.Type.Yes)term=new D2L.LP.Text.LangTerm("Standard.Buttons.btnYes");else if(type==D2L.Control.Button.Type.No)term=new D2L.LP.Text.LangTerm("Standard.Buttons.btnNo");else if(type==D2L.Control.Button.Type.Save)term= new D2L.LP.Text.LangTerm("Standard.Buttons.btnSave");else if(type==D2L.Control.Button.Type.Create)term=new D2L.LP.Text.LangTerm("Standard.Buttons.btnCreate");else if(type==D2L.Control.Button.Type.Copy)term=new D2L.LP.Text.LangTerm("Standard.Buttons.btnCopy");else if(type==D2L.Control.Button.Type.Insert)term=new D2L.LP.Text.LangTerm("Standard.Buttons.btnInsert");else if(type==D2L.Control.Button.Type.Close)term=new D2L.LP.Text.LangTerm("Standard.Buttons.btnClose");else if(type==D2L.Control.Button.Type.Add)term= new D2L.LP.Text.LangTerm("Standard.Buttons.btnAdd");else if(type==D2L.Control.Button.Type.Back)term=new D2L.LP.Text.LangTerm("Standard.Buttons.btnBack");else if(type==D2L.Control.Button.Type.Next)term=new D2L.LP.Text.LangTerm("Standard.Buttons.btnNext");else term=new D2L.LP.Text.LangTerm("Standard.Buttons.btnOk");return term}; D2L.Control.Container=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_height=null;this.m_hasTitle=false;this.m_isCollapsible=false;this.m_isCollapseAnimated=false;this.m_collapseAnimationSpeed="0.2";this.m_title=new D2L.LP.Text.PlainText;this.m_titleNode=null;this.m_collapseImg=null;this.m_isDisplayed=true;this.m_isExpanded=true;this.m_mergeTitleWithContent=true;this.m_border=new D2L.Style.BorderInfo;this.m_borderRadius=0;this.m_backgroundColour=null;this.m_float= D2L.Style.Float.None;this.m_padding=new D2L.Style.Spacing(D2L.Style.Spacing.Type.Padding);this.m_spacing=new D2L.Style.Spacing(D2L.Style.Spacing.Type.Spacing);this.m_ddObject=null;this.m_dragDropMode=D2L.DragDrop.Modes.None;this.m_dragDropInfo=null;this.m_contextMenuPlaceHolder=null;this.OnExpandCollapse=new D2L.EventHandler;this.m_isDisplayedChangeEvent=new D2L.EventHandler;this.m_width=null;this.m_widthType=D2L.Style.WidthType.None;this.m_widthTypeIsSet=false;this.InstallEvents()},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this, deserializer);this.m_hasTitle=deserializer.GetBoolean();this.m_isCollapsible=deserializer.GetBoolean();this.m_isCollapseAnimated=deserializer.GetBoolean();this.m_isDisplayed=deserializer.GetBoolean();this.m_isExpanded=deserializer.GetBoolean();this.m_mergeTitleWithContent=deserializer.GetBoolean();this.m_border=deserializer.GetObjectMin(D2L.Style.BorderInfo);this.m_borderRadius=deserializer.GetMember();this.m_float=deserializer.GetMember();this.m_dragDropMode=deserializer.GetMember();var hasDragDropInfo= deserializer.GetBoolean();if(hasDragDropInfo){var dragDropSettingsControlId=deserializer.GetObjectMin(D2L.Control.Id);if(dragDropSettingsControlId)this.m_dragDropInfo=UI.GetControl(dragDropSettingsControlId.ID(),dragDropSettingsControlId.SID()).GetDragDropInfo()}if(this.HasTitle()){this.m_titleNode=this.GetDomNode().firstChild;this.m_collapseImg=UI.GetControl(this.GetMappedId()+"_imgCol")}this.m_title=new D2L.LP.Text.PlainText(deserializer.GetMember());this.m_contextMenuPlaceHolder=this.GetUI().GetControl(this.GetMappedId()+ "_cmp");this.IChildrenDomNode=this.GetDomNode().childNodes[this.GetDomNode().childNodes.length-1];this.InstallEvents();if(this.m_dragDropMode!=D2L.DragDrop.Modes.None)this.InstallDragDrop()},BuildDom:function(){if(!this.IsRendered()){arguments.callee.$.BuildDom.call(this);this.BuildDom_Container();this.SetBorder(this.m_border);if(this.GetBorderRadius()>0)this.SetBorderRadius(this.m_borderRadius);this.SetBackgroundColour(this.m_backgroundColour);this.RenderFloat();this.RenderPadding();this.RenderSpacing(); this.RenderWidth();this.RenderHeight();if(this.m_dragDropMode!=D2L.DragDrop.Modes.None)this.SetDragDrop(this.m_dragDropMode,this.m_dragDropInfo)}},BuildDom_Container:function(){this.SetDomNode(this.CreateElement("div"));this.GetDomNode().style.zIndex=this.GetWindow()["UI"].GetZIndex();this.GetDomNode().className=this.GetClassName();this.IChildrenDomNode=this.CreateElement("div");this.IChildrenDomNode.className="dco_c";this.GetDomNode().appendChild(this.IChildrenDomNode);this.SetHasTitle(this.HasTitle(), true)},InstallDragDrop:function(){var ddObject;var handle=this.GetDomNode();if(this.HasTitle())handle=this.m_titleNode;if(this.m_dragDropMode==D2L.DragDrop.Modes.DraggableDroppable)ddObject=new D2L.DragDrop.DraggableDroppable(this,handle);if(this.m_dragDropMode==D2L.DragDrop.Modes.Draggable)ddObject=new D2L.DragDrop.Draggable(this,handle);if(this.m_dragDropMode==D2L.DragDrop.Modes.Droppable)ddObject=new D2L.DragDrop.Droppable(this,handle);if(this.m_dragDropMode==D2L.DragDrop.Modes.DraggableDroppable|| this.m_dragDropMode==D2L.DragDrop.Modes.Draggable)this.IChildrenDomNode.className=this.IChildrenDomNode.className+" draggable ";this.SetDragDropObject(ddObject);if(this.GetDragDropObject()&&this.m_dragDropInfo)D2L.DragDrop.SetDragDropInfo(this.GetDragDropObject(),this.m_dragDropInfo)},InstallEvents:function(){var me=this;this.m_spacing.OnChange().RegisterMethod(function(){me.RenderSpacing()});this.m_padding.OnChange().RegisterMethod(function(){me.RenderPadding()});if(this.m_isCollapsible){this.AttachObject(this.GetDomNode(), "ID2LOnExpand",new D2L.EventHandler);this.GetDomNode().ID2LOnExpand.RegisterMethod(function(evt){if(!me.IsExpanded())me.SetIsExpanded(true)})}},RenderFloat:function(){if(this.IsRendered())D2L.Util.Style.ApplyFloat(this.GetDomNode(),this.GetFloat())},RenderHeight:function(){if(this.IsRendered())if(this.m_height!==null)this.GetDomNode().style.height=this.m_height+"px";else this.GetDomNode().style.height="auto"},RenderPadding:function(){if(this.IsRendered())this.IChildrenDomNode.style.padding=this.GetPadding().ToCss()}, RenderSpacing:function(){if(this.IsRendered())this.GetDomNode().style.margin=this.GetSpacing().ToCss()},RenderWidth:function(){if(!this.IsRendered())return;var width="auto";if(this.m_width!==null)if(this.m_widthTypeIsSet)if(this.m_widthType==D2L.Style.WidthType.Em)width=this.m_width+"em";else if(this.m_widthType==D2L.Style.WidthType.Percent)width=this.m_width+"%";else width=this.m_width+"px";else width=this.m_width+"px";this.GetDomNode().style.width=width},GetBackgroundColour:function(){if(this.IsRendered())return this.IChildrenDomNode.style.backgroundColor; return""},GetBorder:function(){return this.m_border},GetBorderRadius:function(){return this.m_borderRadius},GetClassName:function(){return"dco"},GetDragDropObject:function(){return this.m_ddObject},GetFloat:function(){return this.m_float},GetHeight:function(){return this.m_height},GetPadding:function(){return this.m_padding},GetSpacing:function(){return this.m_spacing},GetTextAlignment:function(){if(this.IsRendered()&&this.IChildrenDomNode!=null){var cssTextAlign=this.IChildrenDomNode.style.textAlign; return D2L.Style.Utility.CssToTextAlign(cssTextAlign)}else return D2L.Style.TextAlignment.Left},GetTitle:function(){return this.m_title},GetTitleAlignment:function(){if(this.IsRendered()&&this.HasTitle())return this.m_titleNode.style.textAlign;return""},GetTitleBackgroundColour:function(){if(this.IsRendered()&&this.HasTitle())return this.m_titleNode.style.backgroundColor;return""},GetTitleColour:function(){if(this.IsRendered()&&this.HasTitle())return this.m_titleNode.style.color;return""},GetWidth:function(){return this.m_width}, GetWidthType:function(){return this.m_widthType},HasTitle:function(){return this.m_hasTitle},IsCollapsible:function(){return this.m_isCollapsible},IsCollapseAnimated:function(){return this.m_isCollapseAnimated},IsDisplayed:function(){return this.m_isDisplayed},IsDisplayedChangeEvent:function(){return this.m_isDisplayedChangeEvent},IsExpanded:function(){return this.m_isExpanded},MergeTitleWithContent:function(){return this.m_mergeTitleWithContent},SetBackgroundColour:function(backgroundColour){this.m_backgroundColour= backgroundColour;if(this.IsRendered()&&backgroundColour!==null)this.IChildrenDomNode.style.backgroundColor=backgroundColour},SetBorder:function(borderInfo){this.m_border=borderInfo;if(this.IsRendered())this.IChildrenDomNode.style.border=this.m_border.ToCss()},SetBorderRadius:function(radius){this.m_borderRadius=radius;if(this.IsRendered())if(UI.GetBrowserInfo().Type==D2L.UI.BrowserType.Safari||UI.GetBrowserInfo().Type==D2L.UI.BrowserType.Chrome)this.IChildrenDomNode.style.WebkitBorderRadius=radius+ "px";else if(UI.GetBrowserInfo().Type==D2L.UI.BrowserType.Firefox)this.IChildrenDomNode.style.MozBorderRadius=radius+"px"},SetDragDrop:function(dragDropMode,dragDropInfo){this.m_dragDropMode=dragDropMode;this.m_dragDropInfo=dragDropInfo;if(this.IsRendered()&&this.m_dragDropMode!=D2L.DragDrop.Modes.None)this.InstallDragDrop()},SetDragDropObject:function(ddObject){this.m_ddObject=ddObject},SetFloat:function(val){this.m_float=val;this.RenderFloat()},SetHasTitle:function(hasTitle,firstTime){if(firstTime=== undefined)firstTime=false;this.m_hasTitle=hasTitle;if(this.IsRendered()||firstTime)if(!hasTitle&&this.m_titleNode!==null){this.m_titleNode.parentNode.removeChild(this.m_titleNode);this.m_titleNode=null;if(this.m_collapseImg){this.m_collapseImg.Remove();this.m_collapseImg=null}}else if(hasTitle&&this.m_titleNode===null){this.m_titleNode=this.CreateElement("div");this.m_titleNode.className="dco_t";var me=this;this.m_collapseImg=new D2L.Image;this.m_collapseImg.AppendTo(this.m_titleNode);this.m_collapseImg.SetOnClick(function(){me.TC()}); var h3=this.CreateElement("h3");this.m_titleNode.appendChild(h3);this.GetDomNode().insertBefore(this.m_titleNode,this.IChildrenDomNode)}this.SetTitle(this.GetTitle());this.SetIsCollapsible(this.IsCollapsible());this.SetIsExpanded(this.IsExpanded())},SetHeight:function(height){this.m_height=height;this.RenderHeight()},SetIsCollapsible:function(isCollapsible){if(this.IsRendered()&&this.HasTitle())if(!isCollapsible){if(this.m_collapseImg!==null)this.m_collapseImg.SetIsDisplayed(false)}else this.m_collapseImg.SetIsDisplayed(true); if(!isCollapsible)this.SetIsExpanded(true);this.m_isCollapsible=isCollapsible;if(isCollapsible)this.SetIsExpanded(this.IsExpanded())},SetIsCollapseAnimated:function(isCollapseAnimated){this.m_isCollapseAnimated=isCollapseAnimated},SetIsDisplayed:function(isDisplayed){if(this.IsRendered())this.GetDomNode().style.display=isDisplayed?"block":"none";if(isDisplayed!=this.m_isDisplayed){this.m_isDisplayed=isDisplayed;this.IsDisplayedChangeEvent().Trigger(isDisplayed)}},SetIsExpanded:function(isExpanded){if(this.IsCollapsible()&& this.m_isExpanded!=isExpanded)if(this.IsRendered()&&this.HasTitle()){var me=this;var DoExpandCollapse=function(){var altTerm="Framework.Container.alt";var imgTerm="Shared.Main.act";var hoverTerm="Shared.Main.hover";if(isExpanded){me.IChildrenDomNode.style.display="block";imgTerm+="Hide";altTerm+="Collapse";hoverTerm+="Hide"}else{me.IChildrenDomNode.style.display="none";imgTerm+="Show";altTerm+="Expand";hoverTerm+="Show"}var term=new D2L.LP.Text.LangTerm(altTerm);me.GetTitle().GetText().Register(function(title){me.m_collapseImg.SetImage(new D2L.Images.ImageTerm(imgTerm)); me.m_collapseImg.SetHoverImage(new D2L.Images.ImageTerm(hoverTerm));term.SetSubject(title);me.m_collapseImg.SetAlt(term)});var border=me.GetBorder();if(border.GetStyle()!=D2L.Style.BorderStyle.None&&me.m_mergeTitleWithContent)if(isExpanded)me.m_titleNode.style.borderBottom="none";else me.m_titleNode.style.borderBottom=border.ToCss();me.m_isExpanded=isExpanded;me.OnExpandCollapse.Trigger(me);if(isExpanded)(new D2L.DisplayVisibleEvent(me.GetDomNode())).Bubble()};if(this.m_isCollapseAnimated){var DoAnimate= function(height){var toOpt=1;var fromOpt=0.2;if(!isExpanded){toOpt=0.2;fromOpt=1}me.IChildrenDomNode.style.position="relative";var sizeAnim=new YAHOO.util.Anim(me.IChildrenDomNode,{height:{to:height}},me.m_collapseAnimationSpeed,YAHOO.util.Easing.easeNone);var fadeAnim=new YAHOO.util.ColorAnim(me.IChildrenDomNode,{opacity:{from:fromOpt,to:toOpt}},me.m_collapseAnimationSpeed,YAHOO.util.Easing.easeNon);sizeAnim.onComplete.subscribe(function(){DoExpandCollapse();me.IChildrenDomNode.style.position=""; me.IChildrenDomNode.style.overflow="visible";me.IChildrenDomNode.style.height="auto";if(isExpanded)me.IChildrenDomNode.style.opacity="";me.m_collapseImg.SetIsEnabled(true)});if(isExpanded)me.IChildrenDomNode.style.height="0px";me.IChildrenDomNode.style.overflow="hidden";me.IChildrenDomNode.style.display="block";me.m_collapseImg.SetIsEnabled(false);sizeAnim.animate();fadeAnim.animate()};if(isExpanded)DoAnimate(D2L.Util.Dom.GetHeightHelper(this.IChildrenDomNode));else DoAnimate(0)}else DoExpandCollapse()}}, SetSize:function(width,height){this.SetWidth(width);this.SetHeight(height)},SetTextAlignment:function(textAlign){if(this.IsRendered()&&this.IChildrenDomNode!=null){var cssTextAlign=D2L.Style.Utility.TextAlignToCss(textAlign);this.IChildrenDomNode.style.textAlign=cssTextAlign}},SetTitle:function(title){this.m_title=D2L.LP.Text.IText.Normalize(title,"D2L.Control.Container","SetTitle","title");if(!this.IsRendered()||!this.HasTitle())return;var t=this.m_titleNode.firstChild.firstChild;if(t.firstChild)t.removeChild(t.firstChild); t.appendChild(this.CreateTextNode(this.m_title));if(this.m_contextMenuPlaceHolder!==null)this.m_contextMenuPlaceHolder.SetSubject(title)},SetWidth:function(width){this.m_width=width;this.RenderWidth()},SetWidthType:function(widthType){this.m_widthType=widthType;this.m_widthTypeIsSet=true;this.RenderWidth()},TC:function(){if(this.IsCollapsible())this.SetIsExpanded(!this.IsExpanded());return false}}); D2L.Control.Container.InstallEvents=function(domNode,GetControl){var me=null;if(domNode.ID2LOnChange===undefined)UI.AttachObject(domNode,"ID2LOnChange",new D2L.EventHandler);domNode.ID2LOnChange.RegisterMethod(function(evt){if(!evt.hasChangeBeenShown){domNode.style.backgroundColor="#E6EFF2";evt.hasChangeBeenShown=true}});FormManager.OnChangeReset.RegisterMethod(function(){domNode.style.backgroundColor="#ffffff"})}; D2L.Control.Container.Floating=D2L.Control.Container.extend({Construct:function(name){arguments.callee.$.Construct.call(this,name);this.m_doIgnoreHide=false;this.m_hasAutoHide=false;this.m_posX=0;this.m_posY=0;this.m_isDisplayed=false;this.m_animationMode=D2L.Style.AnimationMode.None},IntegrateControlMin:function(deserializer){},BuildDom:function(){if(this.IsRendered())return;arguments.callee.$.BuildDom.call(this);this.GetDomNode().id=this.GetMappedId();if(this.m_hasAutoHide){var me=this;WindowEventManager.Click.RegisterMethod(function(evt){if(me.IsDisplayed()&& !me.m_doIgnoreHide)me.Hide()});this.AttachObject(this.GetDomNode(),"onclick",function(evt){D2L.Util.Dom.CancelBubble(evt)})}},GetAnimationMode:function(){return this.m_animationMode},GetClassName:function(){return"dco_f"},GetPosX:function(){return this.m_posX},GetPosY:function(){return this.m_posY},Hide:function(){if(!this.IsDisplayed())return;if(this.IsRendered())this.IDomNode=this.GetDomNode().parentNode.removeChild(this.GetDomNode());this.m_isDisplayed=false;this.IsDisplayedChangeEvent().Trigger(false)}, RenderPosition:function(){if(!this.IsRendered()||!this.IsDisplayed())return;YAHOO.util.Dom.setXY(this.GetDomNode(),[this.m_posX,this.m_posY],true)},SetAnimationMode:function(mode){this.m_animationMode=mode},SetIsDisplayed:function(isDisplayed){if(isDisplayed)this.Show();else this.Hide()},SetHasAutoHide:function(hasAutoHide){this.m_hasAutoHide=hasAutoHide},SetPosition:function(posX,posY){this.m_posX=posX;this.m_posY=posY;this.RenderPosition()},SetPosX:function(posX){this.m_posX=posX;this.RenderPosition()}, SetPosY:function(posY){this.m_posY=posY;this.RenderPosition()},Show:function(insertAfter){if(this.IsDisplayed())return;this.m_isDisplayed=true;if(insertAfter===undefined)D2L.LP.Web.UI.Html.JavaScript.Console.Error("You must define the insertAfter parameter. For accessbility reasons it is important to put the container in the right DOM order. insertAfter could be a D2L.Control or a DOM node. For instance if you have an icon that opens a floating div, you must pass that image node as the insertBefore so floating container is inserted rigth after that node in DOM hierarchy."); var insertAfterDom;if(!insertAfter.isD2LControl)insertAfterDom=insertAfter;else{if(!insertAfter.IsRendered())insertAfter.BuildDom();insertAfterDom=insertAfter.GetDomNode()}if(!this.IsRendered())this.BuildDom();this.GetDomNode().style.zIndex=this.GetWindow()["UI"].GetZIndex();var parent=insertAfterDom.parentNode;if(parent){var nextSibiling=insertAfterDom.nextSibling;if(nextSibiling)parent.insertBefore(this.GetDomNode(),nextSibiling);else parent.appendChild(this.GetDomNode())}this.RenderPosition(); var me=this;if(this.GetAnimationMode()===D2L.Style.AnimationMode.Slide){var size=D2L.Util.Dom.GetSizeHelper(this.GetDomNode());this.GetDomNode().style.display="none";var height=size.height;me.GetDomNode().style.overflow="hidden";me.GetDomNode().style.display="block";me.GetDomNode().style.height="1px";me.GetDomNode().style.width="1px";var width=this.GetWidth();if(width===null)width=size.width;var myAnim=new YAHOO.util.Anim(me.GetMappedId(),{height:{to:height},width:{to:width}},0.1,YAHOO.util.Easing.easeOut); myAnim.onComplete.subscribe(function(){me.GetDomNode().style.overflow="visible";me.GetDomNode().style.height="auto";D2L.Util.Dom.ScrollTo(me.GetDomNode(),false,true)});myAnim.animate()}else me.GetDomNode().style.display="block";if(this.m_hasAutoHide){this.m_doIgnoreHide=true;setTimeout(function(){me.m_doIgnoreHide=false},0)}this.IsDisplayedChangeEvent().Trigger(true)}}); D2L.Control.Container.IFrame=D2L.Control.Container.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_autoResizeToContents=true;this.m_iframe=null;this.m_loadingDiv=null;this.m_iframeDiv=null;this.m_src=null;this.m_srcParams=[];this.m_iframeWindow=null;this.m_iframeTitle=null;this.OnLoad=new D2L.EventHandler;this.SetSrcParam("d2l_body_type",D2L.UI.BodyType.IFrame)},BuildDom:function(){if(!this.IsRendered())arguments.callee.$.BuildDom.call(this)},BuildDom_Container:function(){arguments.callee.$.BuildDom_Container.call(this); this.m_loadingDiv=this.CreateElement("div");this.m_loadingDiv.className="d2l_loading";var img=this.CreateElement("img");img.alt="";D2L.Images.ImageTerm.Assign("Shared.Main.actLoadingLg",img,false);this.m_loadingDiv.appendChild(img);this.m_loadingDiv.appendChild(this.CreateTextNode(new D2L.LP.Text.LangTerm("Standard.Misc.txtLoading")));this.m_iframeDiv=this.CreateElement("div");this.GetDomNode().appendChild(this.m_loadingDiv);this.GetDomNode().appendChild(this.m_iframeDiv)},BuildDom_IFrame:function(){var me= this;var name=this.GetWindow()["UI"].GetUniqueHtmlId();this.m_iframeDiv.innerHTML="<iframe name='"+name+"' id='"+name+"' style='width:100%;height:1px;border:none;' scrolling='no' frameBorder='0'></iframe><div class='d2l_loading' style='display:none;'><img src='/d2l/img/lp/loading_lg.gif' width='24' height='24' alt='' />";this.m_iframe=this.m_iframeDiv.firstChild;if(this.m_iframeTitle!==null)this.SetIFrameTitle(this.m_iframeTitle);var onload=function(){try{me.m_iframeWindow=me.GetWindow().frames[name]}catch(e){}if(me.m_autoResizeToContents){var ui= undefined;try{ui=me.m_iframeWindow.UI}catch(e){}if(ui!==undefined)ui.GetWindowEventManager().Transform.RegisterMethod(function(){me.ResizeToContents()});me.ResizeToContents()}if(me.m_iframeTitle===null)try{me.m_iframe.title=me.m_iframeWindow.document.title}catch(e){}me.m_loadingDiv.style.display="none";me.OnLoad.Trigger()};if(this.m_iframe.attachEvent)this.m_iframe.attachEvent("onload",onload);else this.m_iframe.onload=onload},GetIFrameWindow:function(){return this.m_iframeWindow},GetSrc:function(){return this.m_src}, Load:function(){if(this.IsRendered()&&this.m_src!==null){var me=this;var AfterIFrame=function(isD2LFrame,xsrfToken){if(me.m_iframe===null)me.BuildDom_IFrame();if(isD2LFrame){var body=me.GetWindow()["UI"].GetById("d2l_body");var f=me.CreateElement("form");f.method="post";f.target=me.m_iframe.name;f.action=me.m_src;if(xsrfToken){var xsrfTokenInput=me.CreateElement("input");xsrfTokenInput.type="hidden";xsrfTokenInput.name=D2L.LP.Web.Authentication.Xsrf.GetXsrfTokenParameterName();xsrfTokenInput.value= xsrfToken;f.appendChild(xsrfTokenInput)}for(var name in me.m_srcParams){var input=me.CreateElement("input");input.type="hidden";input.name=name;input.value=me.m_srcParams[name];f.appendChild(input)}body.appendChild(f);f.submit();D2L.Util.Dom.Purge(f);body.removeChild(f)}else me.m_iframe.src=me.m_src;me.m_loadingDiv.style.display="block"};var isD2LFrame=me.m_src.indexOf(".d2l")>0;var isInternal=!D2L.Util.Url.IsExternal(me.m_src);if(isD2LFrame&&isInternal)AfterIFrame(isD2LFrame,D2L.LP.Web.Authentication.Xsrf.GetXsrfToken()); else setTimeout(function(){AfterIFrame(isD2LFrame,null)},0)}},RenderHeight:function(){if(this.IsRendered()&&this.m_iframe)if(this.m_height!==null){this.GetDomNode().style.height=this.m_height+"px";this.m_iframe.style.height=this.m_height+"px"}else this.GetDomNode().style.height="auto"},ResizeToContents:function(){this.m_iframe.style.height="auto";var docHeight=this.GetWindow()["UI"].GetPageHeight(this.m_iframeWindow);if(docHeight>0)this.SetHeight(docHeight)},SetAutoResizeToContents:function(autoResizeToContents){this.m_autoResizeToContents= autoResizeToContents},SetIFrameTitle:function(iframeTitle){this.m_iframeTitle=D2L.LP.Text.IText.Normalize(iframeTitle,"D2L.Control.Container.IFrame","SetIFrameTitle","iframeTitle");if(this.IsRendered()&&this.m_iframe)this.m_iframeTitle.AssignText(this.m_iframe,"title")},SetSrc:function(src){this.m_src=src;if(this.m_src.indexOf(".d2l")>0)if(this.m_src.indexOf("ou=")<0){this.m_src+=this.m_src.indexOf("?")<0?"?":"&";this.m_src+="ou="+Global.OrgUnitId}},SetSrcParam:function(name,value){this.m_srcParams[name]= value}}); D2L.ControlMap=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.ID={};this.SID={}},DeserializeMin:function(deserializer){var me=this;this.ID=deserializer.GetMember();for(var id in this.ID){var iInfo=D2L.Serialization.JsonDeserializerMin.Deserialize(this.ID[id],D2L.ControlMap.IntegrateInfo);this.ID[id]=iInfo;if(iInfo.InstallEvents&&iInfo.JsClass!==undefined)iInfo.JsClass.InstallEvents(UI.GetById(iInfo.MappedId),new Function("return UI.GetControl('"+id+"');"));if(!iInfo.DelayClientSideIntegration)setTimeout(new Function("UI.GetControlMap().GetControl('"+ id+"');"))}this.SID=deserializer.GetMember();for(var id in this.SID)for(var sid in this.SID[id]){var iInfo=D2L.Serialization.JsonDeserializerMin.Deserialize(this.SID[id][sid],D2L.ControlMap.IntegrateInfo);this.SID[id][sid]=iInfo;if(iInfo.InstallEvents&&iInfo.JsClass!==undefined)iInfo.JsClass.InstallEvents(UI.GetById(iInfo.MappedId),new Function("return UI.GetControl('"+id+"','"+sid+"');"));if(!iInfo.DelayClientSideIntegration)setTimeout(new Function("UI.GetControlMap().GetControl('"+id+"','"+sid+ "');"))}},Serialize:function(serializer){var ids={};for(var id in this.ID)ids[id]=this.ID[id].MappedId;var sids={};for(var id in this.SID){sids[id]={};for(var sid in this.SID[id])sids[id][sid]=this.SID[id][sid].MappedId}serializer.AddMember("ID",ids);serializer.AddMember("SID",sids)},AddControlMapToForm:function(){UI.GetByName("d2l_controlMapPrev").value=D2L.Serialization.JsonSerializer.Serialize(this)},GetControl:function(ID,SID){if(SID===undefined||SID===null)SID="";if(!ID.isString)ID=ID.toString(); if(!SID.isString)SID=SID.toString();ID=ID.toLowerCase();SID=SID.toLowerCase();var integrateInfo=null;if(SID.length===0){if(this.ID[ID]!==undefined){if(this.ID[ID].Control!==null)return this.ID[ID].Control;integrateInfo=this.ID[ID]}}else if(this.SID[ID]!==undefined&&this.SID[ID][SID]!==undefined){if(this.SID[ID][SID].Control!==null)return this.SID[ID][SID].Control;integrateInfo=this.SID[ID][SID]}if(integrateInfo===null)return null;if(integrateInfo.JsClass===undefined)return null;var control=new integrateInfo.JsClass; control.m_mappedId=integrateInfo.MappedId;control.m_controlId=new D2L.Control.Id(ID,SID);control.IntegrateControlMin(new D2L.Serialization.JsonDeserializerMin(integrateInfo.SerializedDataMin));control.IntegrateControl(new D2L.Serialization.JsonDeserializer(integrateInfo.SerializedData));if(SID.length===0)this.ID[ID].Control=control;else this.SID[ID][SID].Control=control;return control},GetControlByMappedId:function(mappedId){for(var id in this.ID)if(this.ID[id].MappedId==mappedId)return this.GetControl(id); for(var id in this.SID)for(var sid in this.SID[id])if(this.SID[id][sid].MappedId==mappedId)return this.GetControl(id,sid);return null},GetMappedIdById:function(id,sid){if(id===undefined||id===null)return null;id=id.toLowerCase();if(this.ID[id]!==undefined)return this.ID[id].MappedId;if(sid!==undefined&&sid!==null&&sid.length>0){sid=sid.toLowerCase();if(this.SID[id]!==undefined)if(this.SID[id][sid]!==undefined)return this.SID[id][sid].MappedId}return null},GetControls:function(ID){if(ID===undefined|| ID===null)return[];ID=ID.toLowerCase();var controls=[];if(this.ID[ID]!==undefined)controls.push(this.GetControl(ID));for(var sid in this.SID[ID])controls.push(this.GetControl(ID,sid));return controls},RegisterControl:function(control){var id=control.GetControlId().ID();var sid=control.GetControlId().SID();if(id.length===0)return false;var mappedId=control.GetMappedId();if(sid.length===0){this.ID[id]=new D2L.ControlMap.IntegrateInfo(mappedId);this.ID[id].Control=control}else{if(this.SID[id]===undefined)this.SID[id]= {};this.SID[id][sid]=new D2L.ControlMap.IntegrateInfo(mappedId);this.SID[id][sid].Control=control}return true},UnregisterControl:function(control){var id=control.GetControlId().ID();var sid=control.GetControlId().SID();if(id.length===0)return false;if(sid.length===0)this.ID[id]=undefined;else if(this.SID[id]!==undefined)this.SID[id][sid]=undefined}}); D2L.LP.Web.UI.Html.LegacyIdAdapter=D2L.Class.Create({Construct:function(id,sid){if(id===undefined||id===null)id="";this.m_value=id;if(sid===undefined||sid===null)sid="";this.m_sidValue=sid},_deserialize:function(deserializer){this.m_value=deserializer.GetMember("Id");if(deserializer.HasMember("Sid"))this.m_sidValue=deserializer.GetMember("Sid")},_serialize:function(serializer){serializer.AddMember("Id",this.m_value);if(this.m_sidValue.length>0)serializer.AddMember("Sid",this.m_sidValue)},GetValue:function(){return UI.GetControlMap().GetMappedIdById(this.m_value, this.m_sidValue)}});D2L.LP.Web.UI.Html.LegacyIdAdapter.Create=function(id,sid){return new D2L.LP.Web.UI.Html.LegacyIdAdapter(id,sid)}; D2L.ControlMap.IntegrateInfo=D2L.Class.extend({Construct:function(mappedId){if(mappedId===undefined)mappedId="";arguments.callee.$.Construct.call(this);this.MappedId=mappedId;this.JsClass=undefined;this.SerializedDataMin={};this.SerializedData={};this.InstallEvents=false;this.DelayClientSideIntegration=true;this.Control=null},DeserializeMin:function(deserializer){this.MappedId=deserializer.GetMember();var jsClassName=deserializer.GetMember();if(jsClassName.indexOf(".")>-1)try{if(!D2L.LP.Web.UI.Flags.Flag("de31558-use-standard-json", false))this.JsClass=eval(jsClassName);else this.JsClass=jsClassName.split(".").reduce(function(ob,key){return ob[key]},window)}catch(e){throw"Class '"+jsClassName+"' is undefined.";}else try{this.JsClass=D2L.Control[jsClassName]}catch(e){throw"Class 'D2L.Control."+jsClassName+"' is undefined.";}this.SerializedDataMin=deserializer.GetMember();this.SerializedData=deserializer.GetMember();this.InstallEvents=deserializer.GetBoolean();this.DelayClientSideIntegration=deserializer.GetBoolean()}}); D2L.LP.Globalization.Calendars={}; D2L.LP.Globalization.Calendars.Calendar=D2L.Class.extend({Construct:function(calendarType){this.m_calendarType=calendarType;this.m_calendar=this.GetSpecificCalendar()},GetSpecificCalendar:function(){switch(this.m_calendarType){case D2L.LP.Globalization.Calendars.Calendar.Type.Gregorian:return new D2L.LP.Globalization.Calendars.Gregorian;case D2L.LP.Globalization.Calendars.Calendar.Type.Hijri:return new D2L.LP.Globalization.Calendars.Hijri;default:throw"Not supported calendar: "+this.m_calendarType; }},GetCalendarType:function(){return this.m_calendarType},TryGetGregorianLocalDateTime:function(calendarSpecificYear,calendarSpecificMonth,calendarSpecificDay){return this.m_calendar.TryGetGregorianLocalDateTime(calendarSpecificYear,calendarSpecificMonth,calendarSpecificDay)},GetCalendarSpecificLocalDateTime:function(localDateTime){return this.m_calendar.GetCalendarSpecificLocalDateTime(localDateTime)},Validate:function(calendarSpecificYear,calendarSpecificMonth,calendarSpecificDay){return this.m_calendar.Validate(calendarSpecificYear, calendarSpecificMonth,calendarSpecificDay)}});D2L.LP.Globalization.Calendars.Calendar.Type={Gregorian:0,Hijri:1}; D2L.LP.Globalization.Calendars.CalendarLocalDateTime=D2L.Class.extend({Construct:function(year,month,day,hour,minute,second){this.m_year=year;this.m_month=month;this.m_day=day;this.m_hour=hour!==undefined?hour:0;this.m_minute=minute!==undefined?minute:0;this.m_second=second!==undefined?second:0},_deserialize:function(deserializer){this.m_year=deserializer.GetMember("Year");this.m_month=deserializer.GetMember("Month");this.m_day=deserializer.GetMember("Day");this.m_hour=deserializer.GetMember("Hour"); this.m_minute=deserializer.GetMember("Minute");this.m_second=deserializer.GetMember("Second")},_serialize:function(serializer){serializer.AddMember("Year",this.m_year);serializer.AddMember("Month",this.m_month);serializer.AddMember("Day",this.m_day);serializer.AddMember("Hour",this.m_hour);serializer.AddMember("Minute",this.m_minute);serializer.AddMember("Second",this.m_second)},GetYear:function(){return this.m_year},GetMonth:function(){return this.m_month},GetDay:function(){return this.m_day},GetHour:function(){return this.m_hour}, GetMinute:function(){return this.m_minute},GetSecond:function(){return this.m_second}}); D2L.LP.Globalization.Calendars.Gregorian=D2L.Class.extend({Construct:function(){},TryGetGregorianLocalDateTime:function(calendarSpecificYear,calendarSpecificMonth,calendarSpecificDay){if(!this.Validate(calendarSpecificYear,calendarSpecificMonth,calendarSpecificDay))return null;return new D2L.LocalDateTime(calendarSpecificYear,calendarSpecificMonth,calendarSpecificDay,0,0,0)},GetCalendarSpecificLocalDateTime:function(localDateTime){return localDateTime},Validate:function(calendarSpecificYear,calendarSpecificMonth, calendarSpecificDay){var year=calendarSpecificYear;var month=calendarSpecificMonth;var day=calendarSpecificDay;if(isNaN(year)||year<1753||year>9999)return false;if(isNaN(month)||month<1||month>12)return false;if(isNaN(day)||day<1||day>31)return false;var allowedDays=31;if(month==2)if(year%4===0&&(!(year%100===0)||year%400===0))allowedDays=29;else allowedDays=28;else if(month==4||month==6||month==9||month==11)allowedDays=30;if(day>allowedDays)return false;return true}}); D2L.LP.Globalization.Calendars.Hijri=D2L.Class.extend({Construct:function(){},TryGetGregorianLocalDateTime:function(calendarSpecificYear,calendarSpecificMonth,calendarSpecificDay){if(!this.Validate(calendarSpecificYear,calendarSpecificMonth,calendarSpecificDay))return null;var gDate=D2LMicrosoftAjax.UmAlQura.toGregorian(calendarSpecificYear,calendarSpecificMonth-1,calendarSpecificDay);if(gDate==null)gDate=D2LMicrosoftAjax.Hijri.toGregorian(calendarSpecificYear,calendarSpecificMonth-1,calendarSpecificDay); if(gDate)return new D2L.LocalDateTime(gDate.getFullYear(),gDate.getMonth()+1,gDate.getDate(),0,0,0);else return null},GetCalendarSpecificLocalDateTime:function(localDateTime){var gDate=D2L.LocalDateTime.ToJavaScriptDate(localDateTime);var calendarDate=D2LMicrosoftAjax.UmAlQura.fromGregorian(gDate);if(calendarDate==null)calendarDate=D2LMicrosoftAjax.Hijri.fromGregorian(gDate);return new D2L.LocalDateTime(calendarDate[0],calendarDate[1]+1,calendarDate[2],0,0,0)},Validate:function(calendarSpecificYear, calendarSpecificMonth,calendarSpecificDay){var gDate=D2LMicrosoftAjax.UmAlQura.toGregorian(calendarSpecificYear,calendarSpecificMonth-1,calendarSpecificDay);if(gDate==null)gDate=D2LMicrosoftAjax.Hijri.toGregorian(calendarSpecificYear,calendarSpecificMonth-1,calendarSpecificDay);if(gDate==null)return false;var calendarDate=D2LMicrosoftAjax.UmAlQura.fromGregorian(gDate);if(calendarDate==null)calendarDate=D2LMicrosoftAjax.Hijri.fromGregorian(gDate);if(calendarDate==null)return false;return calendarSpecificYear== calendarDate[0]&&calendarSpecificMonth==calendarDate[1]+1&&calendarSpecificDay==calendarDate[2]}});D2L.LP.Globalization.Formatting.DateTime={};D2L.LP.Globalization.Formatting.DateTime.Exceptions={InvalidDateFormat:0,UnsupportedInputDateFormat:1};D2L.LP.Globalization.Formatting.DateTime.FormatPart=D2L.Class.extend({Construct:function(partType,partFormat){this.Type=partType;this.Format=partFormat}});D2L.LP.Globalization.Formatting.DateTime.FormatPart.Type={Day:0,Month:1,Year:2,Hour:3,Minute:4,Second:5}; D2L.LP.Globalization.Formatting.DateTime.DateTimeFormatTokenizer=D2L.Class.extend({Construct:function(dateFormat){this.m_dateFormatSeparator=null;this.m_dateFormatParts=null;this.m_dateFormat=dateFormat},GetSeparator:function(){if(this.m_dateFormatSeparator==null){var re=new RegExp("\\W");var match=re.exec(this.m_dateFormat);if(match!=null)this.m_dateFormatSeparator=match[0]}return this.m_dateFormatSeparator},GetParts:function(){var result=[];var separator=this.GetSeparator();if(separator==null)return null; var parts=this.m_dateFormat.split(separator);if(parts.length!=3)return null;var isNotSupported=false;for(var i=0;i<parts.length;i++){part=parts[i].trim();if(part=="dd"||part=="d")result.push(new D2L.LP.Globalization.Formatting.DateTime.FormatPart(D2L.LP.Globalization.Formatting.DateTime.FormatPart.Type.Day,part));else if(part=="MM"||part=="M")result.push(new D2L.LP.Globalization.Formatting.DateTime.FormatPart(D2L.LP.Globalization.Formatting.DateTime.FormatPart.Type.Month,part));else if(part=="yyyy")result.push(new D2L.LP.Globalization.Formatting.DateTime.FormatPart(D2L.LP.Globalization.Formatting.DateTime.FormatPart.Type.Year, part));else isNotSupported=true}if(isNotSupported)return null;else return result}}); D2L.LP.Globalization.Formatting.DateTime.DateTimeFormatter=D2L.Class.extend({Construct:function(dateTimeFormatDescriptor,fuzzyDateTimeDescriptor){fuzzyDateTimeDescriptor.ClientNow=new Date;this.m_dateTimeFormatDescriptor=dateTimeFormatDescriptor;this.m_fuzzyDateTimeDescriptor=fuzzyDateTimeDescriptor},FormatInputDate:function(gregorianLocalDateTime){var calendar=D2L.LP.Globalization.Locale.GetCalendar();var date=calendar.GetCalendarSpecificLocalDateTime(gregorianLocalDateTime);var inputDateTimeFormatTokenizer= new D2L.LP.Globalization.Formatting.DateTime.DateTimeFormatTokenizer(this.m_dateTimeFormatDescriptor.InputDateFormat);var separator=inputDateTimeFormatTokenizer.GetSeparator();var dateParts=inputDateTimeFormatTokenizer.GetParts();if(separator!=null&&dateParts!=null){var formattedDate="";for(var i=0;i<dateParts.length;i++){var datePart=dateParts[i];if(datePart.Type==D2L.LP.Globalization.Formatting.DateTime.FormatPart.Type.Day)formattedDate+=this.PrePadByZero(date.GetDay(),datePart.Format.length);else if(datePart.Type== D2L.LP.Globalization.Formatting.DateTime.FormatPart.Type.Month)formattedDate+=this.PrePadByZero(date.GetMonth(),datePart.Format.length);else if(datePart.Type==D2L.LP.Globalization.Formatting.DateTime.FormatPart.Type.Year)formattedDate+=date.GetYear().toString();if(i<dateParts.length-1)formattedDate+=separator}return formattedDate}},FormatDateTime:function(dateTime,format){var formats=D2L.LP.Globalization.Formatting.DateTime.Formats;var calendarDateTime=D2L.LP.Globalization.Locale.GetCalendar().GetCalendarSpecificLocalDateTime(dateTime); if(format===undefined)format=formats.LongDateTime;var dateTimeJs=D2L.LocalDateTime.ToJavaScriptDate(dateTime);switch(format){case formats.Time:var time=new D2L.LocalTime(dateTime.GetHour(),dateTime.GetMinute(),dateTime.GetSecond());return this.FormatTime(time);case formats.MonthAndDay:return this.FormatDateTime(dateTime,formats.ShortMonthName)+" "+calendarDateTime.GetDay();case formats.LongMonthAndDay:return this.FormatDateTime(dateTime,formats.LongMonthName)+" "+calendarDateTime.GetDay();case formats.ShortMonthName:return this.m_dateTimeFormatDescriptor.ShortMonthNames[calendarDateTime.GetMonth()- 1];case formats.LongMonthName:return this.m_dateTimeFormatDescriptor.LongMonthNames[calendarDateTime.GetMonth()-1];case formats.ShortDayOfWeek:var dayOfWeekIndex=dateTimeJs.getDay();return this.m_dateTimeFormatDescriptor.ShortDayOfWeekNames[dayOfWeekIndex];default:throw"Unsupported DateTime format: '"+format+"'.";}},FormatTime:function(time){var jsDate=new Date;jsDate.setHours(time.GetHour());jsDate.setMinutes(time.GetMinute());jsDate.setSeconds(time.GetSecond());return D2L.Intl.FormatTime(jsDate)}, FormatFuzzyDateTime:function(inputDate,nowDate){var fuzzy=this.m_fuzzyDateTimeDescriptor;var formats=D2L.LP.Globalization.Formatting.DateTime.Formats;var calendar=D2L.LP.Globalization.Locale.GetCalendar();if(nowDate===undefined)nowDate=fuzzy.Now;var thirtySec=30*1E3;var oneMin=60*1E3;var thirtyMin=30*oneMin;var fortyFiveMin=45*oneMin;var oneHour=60*oneMin;var sixHour=6*oneHour;var inputDateJs=D2L.LocalDateTime.ToJavaScriptDate(inputDate);var nowDateJs=D2L.LocalDateTime.ToJavaScriptDate(nowDate);var sameYear= calendar.GetCalendarSpecificLocalDateTime(inputDate).GetYear()===calendar.GetCalendarSpecificLocalDateTime(nowDate).GetYear();var sameDay=sameYear&&inputDate.GetMonth()===nowDate.GetMonth()&&inputDate.GetDay()===nowDate.GetDay();var midnight=new Date(nowDateJs.getFullYear(),nowDateJs.getMonth(),nowDateJs.getDate());var tomorrow=new Date(midnight.getTime()+24*oneHour);var yesterday=new Date(midnight.getTime()-24*oneHour);var threeDaysAgo=new Date(midnight.getTime()-3*24*oneHour);var timespan=nowDateJs.getTime()- inputDateJs.getTime();var text=this.FormatDateTime(inputDate,formats.MonthAndDay);if(!sameYear)text+=", "+inputDate.GetYear();text+=" "+this.FormatDateTime(inputDate,formats.Time);var timeout=-1;if(timespan<0)timeout=timespan*-1;else if(timespan<thirtySec){text=fuzzy.JustNow;timeout=thirtySec-timespan}else if(timespan<oneMin+thirtySec){text=fuzzy.OneMinuteAgo;timeout=oneMin+thirtySec-timespan}else if(timespan<2*oneMin+thirtySec){text=fuzzy.TwoMinutesAgo;timeout=2*oneMin+thirtySec-timespan}else if(timespan< fortyFiveMin){var seconds=timespan%oneMin;var nextMin=seconds<thirtySec?thirtySec-seconds:oneMin-(seconds-thirtySec);var timeUntilFortyFiveMin=fortyFiveMin-timespan;var minutesRounded=Math.round(timespan%oneHour/oneMin);text=fuzzy.MinutesAgoMany.replace("[0]",minutesRounded);timeout=Math.min(nextMin,timeUntilFortyFiveMin)}else if(timespan<sixHour||sameDay){var minutes=timespan%oneHour;var nextHour=minutes<thirtyMin?thirtyMin-minutes:oneHour-(minutes-thirtyMin);var timeUntilSixHour=sixHour-timespan; if(timespan<oneHour+thirtyMin)text=fuzzy.OneHourAgo;else if(timespan<oneHour*2+thirtyMin)text=fuzzy.TwoHoursAgo;else{var hoursRounded=Math.round(timespan%(oneHour*24)/oneHour);text=fuzzy.ManyHoursAgo.replace("[0]",hoursRounded)}timeout=!sameDay&&timeUntilSixHour>0?timeUntilSixHour:nextHour}else if(inputDateJs>threeDaysAgo){if(inputDateJs>yesterday)text=fuzzy.YesterdayTime.replace("[0]",this.FormatDateTime(inputDate,formats.Time));else text=fuzzy.DayOfWeekTime.replace("[0]",this.FormatDateTime(inputDate, formats.ShortDayOfWeek)).replace("[1]",this.FormatDateTime(inputDate,formats.Time));timeout=tomorrow.getTime()-nowDateJs.getTime()}else if(sameYear){var endOfYear=new Date(nowDateJs.getFullYear()+1,0,1);var timeUntilEndOfYear=endOfYear.getTime()-nowDateJs.getTime();timeout=timeUntilEndOfYear;text=fuzzy.MonthDayTime.replace("[0]",this.FormatDateTime(inputDate,formats.LongMonthAndDay)).replace("[1]",this.FormatDateTime(inputDate,formats.Time))}if(timeout>0)timeout=Math.max(timeout,1E3);return{timeout:timeout, text:text}},PrePadByZero:function(input,maxNum){input=input.toString();var zero="0";while(zero.length>0&&input.length<maxNum)input=zero+input;return input}}); D2L.LP.Globalization.Formatting.DateTime.DateTimeParser=D2L.Class.extend({Construct:function(dateTimeFormatDescriptor,numberParser){this.m_dateTimeFormatDescriptor=dateTimeFormatDescriptor;this.m_numberParser=numberParser},TryParseInputDate:function(dateString){var inputDateTimeFormatTokenizer=new D2L.LP.Globalization.Formatting.DateTime.DateTimeFormatTokenizer(this.m_dateTimeFormatDescriptor.InputDateFormat);var calendarSpecificYear=null;var calendarSpecificMonth=null;var calendarSpecificDay=null; dateString=dateString.toString().trim();var separator=inputDateTimeFormatTokenizer.GetSeparator();var dateFormatParts=inputDateTimeFormatTokenizer.GetParts();if(separator!=null&&dateFormatParts!=null){var dateParts=dateString.split(separator);if(dateParts.length!=dateFormatParts.length)throw D2L.LP.Globalization.Formatting.DateTime.Exceptions.InvalidDateFormat;for(var i=0;i<dateFormatParts.length;i++){var dateFormatPart=dateFormatParts[i];try{var partValue=this.m_numberParser.ParseInteger(dateParts[i])}catch(e){throw D2L.LP.Globalization.Formatting.DateTime.Exceptions.InvalidDateFormat; }if(dateFormatPart.Type==D2L.LP.Globalization.Formatting.DateTime.FormatPart.Type.Year)calendarSpecificYear=partValue;else if(dateFormatPart.Type==D2L.LP.Globalization.Formatting.DateTime.FormatPart.Type.Month)calendarSpecificMonth=partValue;else if(dateFormatPart.Type==D2L.LP.Globalization.Formatting.DateTime.FormatPart.Type.Day)calendarSpecificDay=partValue}var calendar=D2L.LP.Globalization.Locale.GetCalendar();var gregorianLocalDateTime=calendar.TryGetGregorianLocalDateTime(calendarSpecificYear, calendarSpecificMonth,calendarSpecificDay);return gregorianLocalDateTime}else throw D2L.LP.Globalization.Formatting.DateTime.Exceptions.UnsupportedInputDateFormat;},TryParseTime:function(input){var dateTime=D2L.Intl.ParseTime(input);if(dateTime===undefined||dateTime===null)return null;var time=new D2L.LocalTime(dateTime.getHours(),dateTime.getMinutes(),0);return time}}); D2L.LP.Globalization.Formatting.DateTime.Formats={LongDate:"LongDate",StandardDate:"StandardDate",ShortDate:"ShortDate",LongDateTime:"LongDateTime",StandardDateTime:"StandardDateTime",ShortDateTime:"ShortDateTime",Time:"Time",MonthAndYear:"MonthAndYear",MonthAndDay:"MonthAndDay",LongMonthAndDay:"LongMonthAndDay",LongMonthName:"LongMonthName",ShortMonthName:"ShortMonthName",LongDayOfWeek:"LongDayOfWeek",ShortDayOfWeek:"ShortDayOfWeek",InputDate:"InputDate"};D2L.LP.Globalization.Formatting.Number={}; D2L.LP.Globalization.Formatting.Number.NumberFormatDescriptor=D2L.Class.extend({Construct:function(decimalSeparator,groupSeparator,numberNegativePattern,percentPositivePattern,percentNegativePattern,percentSymbol,negativeSign,nativeDigits,useNativeDigits,groupSizes,integerRegex,decimalRegex){this.DecimalSeparator=decimalSeparator;this.GroupSeparator=groupSeparator;this.NumberNegativePattern=numberNegativePattern;this.PercentPositivePattern=percentPositivePattern;this.PercentNegativePattern=percentNegativePattern; this.PercentSymbol=percentSymbol;this.NegativeSign=negativeSign;this.NativeDigits=nativeDigits;this.UseNativeDigits=useNativeDigits;this.GroupSizes=groupSizes;this.IntegerRegex=integerRegex;this.DecimalRegex=decimalRegex},_deserialize:function(deserializer){this.DecimalSeparator=deserializer.GetMember("DecimalSeparator");this.GroupSeparator=deserializer.GetMember("GroupSeparator");this.NumberNegativePattern=deserializer.GetMember("NumberNegativePattern");this.PercentPositivePattern=deserializer.GetMember("PercentPositivePattern"); this.PercentNegativePattern=deserializer.GetMember("PercentNegativePattern");this.PercentSymbol=deserializer.GetMember("PercentSymbol");this.NegativeSign=deserializer.GetMember("NegativeSign");this.NativeDigits=deserializer.GetMember("NativeDigits");this.UseNativeDigits=deserializer.GetMember("UseNativeDigits");this.GroupSizes=deserializer.GetMember("GroupSizes");this.IntegerRegex=deserializer.GetMember("IntegerRegex");this.DecimalRegex=deserializer.GetMember("DecimalRegex")}}); D2L.LP.Globalization.Formatting.Domain.Default.NumberFormatDescriptor=D2L.LP.Globalization.Formatting.Number.NumberFormatDescriptor; D2L.LP.Globalization.Formatting.Number.NumberFormatter=D2L.Class.extend({Construct:function(){},FormatInteger:function(value){return D2L.Intl.FormatNumber(value,{maximumFractionDigits:0})},FormatDecimal:function(value,numOfDecimalPoints,trailingZeroes){var options={};if(numOfDecimalPoints!==undefined&&numOfDecimalPoints!==null){options.maximumFractionDigits=numOfDecimalPoints;if(trailingZeroes)options.minimumFractionDigits=numOfDecimalPoints}else options.maximumFractionDigits=15;return D2L.Intl.FormatNumber(value, options)}}); D2L.LP.Globalization.Formatting.Number.NumberParser=D2L.Class.extend({Construct:function(numberFormatDescriptor){this.m_numberFormatDescriptor=numberFormatDescriptor},ParseInteger:function(value){if(value===undefined||value===null)return 0;value=value.trim();if(value==""||value=="-")return 0;if(this.m_numberFormatDescriptor.GroupSeparator!=" ")value=value.replace(" ","");else value=value.replace(/^\s*|\s(?=\s)|\s*$/g,"");var re=new RegExp(this.m_numberFormatDescriptor.IntegerRegex);if(!re.test(value))throw"Invalid Integer";value= value.replace(new RegExp("["+this.m_numberFormatDescriptor.GroupSeparator+"]","g"),"");var num=D2L.Intl.ParseNumber(value);if(isNaN(num))throw"Invalid Integer";return num},ParseDecimal:function(value){if(value===undefined||value===null)return 0;value=value.trim();if(value=="")return 0;if(this.m_numberFormatDescriptor.GroupSeparator!=" ")value=value.replace(" ","");else value=value.replace(/^\s*|\s(?=\s)|\s*$/g,"");var re=new RegExp(this.m_numberFormatDescriptor.DecimalRegex);if(!re.test(value))throw"Invalid Decimal"; value=value.replace(new RegExp("["+this.m_numberFormatDescriptor.GroupSeparator+"]","g"),"");var num=D2L.Intl.ParseNumber(value);if(isNaN(num))throw"Invalid Decimal";return num}});D2L.LP.Globalization.Formatting.Text={};D2L.LP.Globalization.Formatting.Text.TextDirection={LeftToRight:1,RightToLeft:2};D2L.LP.Globalization.Locale={}; D2L.LP.Globalization.Locale.Init=function(calendarType,numberFormatDescriptor,dateTimeFormatDescriptor,textFormatDescriptor,cultureCode,fuzzyDateTimeDescriptor){D2L.LP.Globalization.Locale=new D2L.LP.Globalization.LocaleObject(calendarType,numberFormatDescriptor,dateTimeFormatDescriptor,textFormatDescriptor,cultureCode,fuzzyDateTimeDescriptor)}; D2L.LP.Globalization.LocaleObject=D2L.Class.extend({Construct:function(calendarType,numberFormatDescriptor,dateTimeFormatDescriptor,textFormatDescriptor,cultureCode,fuzzyDateTimeDescriptor){this.m_calendarType=calendarType;this.m_numberFormatDescriptor=numberFormatDescriptor;this.m_dateTimeFormatDescriptor=dateTimeFormatDescriptor;this.m_textFormatDescriptor=textFormatDescriptor;this.m_culture=cultureCode;this.m_fuzzyDateTimeDescriptor=fuzzyDateTimeDescriptor;this.m_numberParser=null;this.m_numberFormatter= null;this.m_dateTimeParser=null;this.m_dateTimeFormatter=null;this.m_calendar=null},GetNumberFormatDescriptor:function(){return this.m_numberFormatDescriptor},GetNumberParser:function(){if(this.m_numberParser===null)this.m_numberParser=new D2L.LP.Globalization.Formatting.Number.NumberParser(this.GetNumberFormatDescriptor());return this.m_numberParser},GetNumberFormatter:function(){if(this.m_numberFormatter===null)this.m_numberFormatter=new D2L.LP.Globalization.Formatting.Number.NumberFormatter;return this.m_numberFormatter}, GetDateTimeFormatDescriptor:function(){return this.m_dateTimeFormatDescriptor},GetFuzzyDateTimeDescriptor:function(){return this.m_fuzzyDateTimeDescriptor},GetDateTimeParser:function(){if(this.m_dateTimeParser===null)this.m_dateTimeParser=new D2L.LP.Globalization.Formatting.DateTime.DateTimeParser(this.GetDateTimeFormatDescriptor(),this.GetNumberParser());return this.m_dateTimeParser},GetDateTimeFormatter:function(){if(this.m_dateTimeFormatter===null)this.m_dateTimeFormatter=new D2L.LP.Globalization.Formatting.DateTime.DateTimeFormatter(this.GetDateTimeFormatDescriptor(), this.GetFuzzyDateTimeDescriptor());return this.m_dateTimeFormatter},GetTextFormatDescriptor:function(){return this.m_textFormatDescriptor},GetCultureCode:function(){return this.m_culture},GetCalendar:function(){if(this.m_calendar===null)this.m_calendar=new D2L.LP.Globalization.Calendars.Calendar(this.m_calendarType);return this.m_calendar}}); D2L.Culture=D2L.Class.extend({Construct:function(){this.decimalRegex="";this.integerRegex="";this.m_isRightToLeft=false;this.m_decimalSeparator=".";this.m_negativeFormat=1;this.m_negativeSign="-";this.m_groupSeparator=",";this.m_nativeDigits=["0","1","2","3","4","5","6","7","8","9"];this.m_percentSymbol="%";this.m_percentPositivePattern=0;this.m_percentNegativePattern=0;this.m_hasNativeDigitsSupport=false;this.m_groupSizes=[];this.m_numberFormatDescriptor=null;this.m_numberParser=null;this.m_numberFormatter= null},DeserializeMin:function(deserializer){this.decimalRegex=deserializer.GetMember();this.integerRegex=deserializer.GetMember();this.m_isRightToLeft=deserializer.GetBoolean();this.m_decimalSeparator=deserializer.GetMember();this.m_negativeFormat=deserializer.GetMember();this.m_negativeSign=deserializer.GetMember();this.m_groupSeparator=deserializer.GetMember();this.m_nativeDigits=deserializer.GetMember();this.m_percentSymbol=deserializer.GetMember();this.m_percentPositivePattern=deserializer.GetMember(); this.m_percentNegativePattern=deserializer.GetMember();this.m_hasNativeDigitsSupport=deserializer.GetBoolean();this.m_groupSizes=deserializer.GetMember()},GetNumberFormatDescriptor:function(){if(this.m_numberFormatDescriptor===null)this.m_numberFormatDescriptor=new D2L.LP.Globalization.Formatting.Number.NumberFormatDescriptor(this.m_decimalSeparator,this.m_groupSeparator,this.m_negativeFormat,this.m_percentPositivePattern,this.m_percentNegativePattern,this.m_percentSymbol,this.m_negativeSign,this.m_nativeDigits, this.m_hasNativeDigitsSupport,this.m_groupSizes,this.integerRegex,this.decimalRegex);return this.m_numberFormatDescriptor},GetNumberParser:function(){if(this.m_numberParser===null)this.m_numberParser=new D2L.LP.Globalization.Formatting.Number.NumberParser(this.GetNumberFormatDescriptor());return this.m_numberParser},GetNumberFormatter:function(){if(this.m_numberFormatter===null)this.m_numberFormatter=new D2L.LP.Globalization.Formatting.Number.NumberFormatter;return this.m_numberFormatter},FormatFileSize:function(size){var bytesPerKilo= 1024;var bytesPerMega=bytesPerKilo*1024;var bytesPerGiga=bytesPerMega*1024;if(size>=bytesPerGiga)return new D2L.LP.Text.LangTerm("Standard.FileSizeUnitShort.txtGigaBytesString",D2L.Util.Decimal.Format(Math.round(size/bytesPerGiga*100)/100,2,false));else if(size>=bytesPerMega)return new D2L.LP.Text.LangTerm("Standard.FileSizeUnitShort.txtMegaBytesString",D2L.Util.Decimal.Format(Math.round(size/bytesPerMega*100)/100,2,false));else if(size>=bytesPerKilo)return new D2L.LP.Text.LangTerm("Standard.FileSizeUnitShort.txtKiloBytesString", D2L.Util.Decimal.Format(Math.round(size/bytesPerKilo*100)/100,2,false));else if(size==1)return new D2L.LP.Text.LangTerm("Standard.FileSizeUnitShort.txtByteString",D2L.Util.Integer.Format(size));else return new D2L.LP.Text.LangTerm("Standard.FileSizeUnitShort.txtBytesString",D2L.Util.Integer.Format(size))},PluralizeText:function(num,singular,plural){return num==1?singular:plural},Pluralize:function(num,singular,plural){return num+" "+this.PluralizeText(num,singular,plural)},GetMarginPaddingPosition:function(marginPaddingPosition){if(marginPaddingPosition== D2L.Culture.MarginPaddingPosition.First)if(this.IsRightToLeft())return"Right";else return"Left";else if(this.IsRightToLeft())return"Left";else return"Right"},GetFloat:function(val){if(this.IsRightToLeft())if(val==D2L.Style.Float.Left)return D2L.Style.Float.Right;else if(val==D2L.Style.Float.Right)return D2L.Style.Float.Left;else return val;else return val},IsRightToLeft:function(){return this.m_isRightToLeft},DecimalSeparator:function(){return this.m_decimalSeparator},NegativeFormat:function(){return this.m_negativeFormat}, NegativeSign:function(){return this.m_negativeSign},GroupSeparator:function(){return this.m_groupSeparator},PercentSymbol:function(){return this.m_percentSymbol},PercentPositivePattern:function(){return this.m_percentPositivePattern},PercentNegativePattern:function(){return this.m_percentPositivePattern},GroupSizes:function(){return this.m_groupSizes},NativeDigits:function(){return this.m_nativeDigits},ConvertToNativeDigit:function(value){value=value.toString();if(this.m_hasNativeDigitsSupport){var toRet= new D2L.Util.StringBuilder;for(var i=0;i<value.length;i++){var x=parseInt(value.substr(i,1));if(!isNaN(x)&&x>=0&&x<=9)toRet.Append(this.m_nativeDigits[x]);else toRet.Append(value.substr(i,1))}return toRet.ToString()}else return value},LimitChars:function(value,numChars){if(numChars<1||value.length<=numChars)return value;if(value.length>=3)value=value.substr(0,numChars-3)+"...";return value}}); function d2l_TimeSpan(days,hours,minutes,seconds){this.Days=days;this.Hours=hours;this.Minutes=minutes;this.Seconds=seconds}D2L.Culture.MarginPaddingPosition={First:0,Last:1}; function FindEventController(){if(window.EventController)return window.EventController;else if(window.parent!=window)try{if(window.parent.window.EventController)return window.parent.window.EventController;else if(window.parent.window.FindEventController)return window.parent.window.FindEventController()}catch(e){}else try{if(window.opener&&!window.opener.closed)if(window.opener.window.EventController)return window.opener.window.EventController;else if(window.opener.window.FindEventController)return window.opener.window.FindEventController()}catch(e){}return null} function RaiseEvent(evtName,args){if(Events!==undefined&&Events[evtName]!==undefined)Events[evtName].Raise(args)} D2L.WindowEventManager=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.Click=new D2L.EventHandler;this.KeyPress=new D2L.EventHandler;this.Resize=new D2L.EventHandler;this.Transform=new D2L.EventHandler;this.BC=this.BubbleChangeEvent;this.BKP=this.BubbleKeyPressEvent;this.BE=this.BubbleExpandEvent;this.HideContextMenus=new D2L.EventHandler;this.m_iframes=new Array;var me=this;var clickFunc=function(evt){WindowEventManager.Click.Trigger(new D2L.Event("click",evt)); D2L.LP.Web.UI.Events.OnClick.Trigger(evt)};var handleResize=function(evt){try{me.Resize.Trigger(new D2L.Event("resize",evt));D2L.LP.Web.UI.Events.OnResize.Trigger()}catch(e){}};var onResizeTimer=function(evt){if(me.resizeTimer)clearTimeout(me.resizeTimer);me.resizeTimer=setTimeout(handleResize,100)};var handleMove=function(e){D2L.LP.Web.UI.Events.OnMouseMove.Trigger(e)};var handleUp=function(e){D2L.LP.Web.UI.Events.OnMouseUp.Trigger(e)};var handleDown=function(e){D2L.LP.Web.UI.Events.m_lastMouseDownPosition= D2L.LP.Web.UI.Html.Dom.GetMousePosition(window,e)};D2L.LP.Web.UI.Html.Dom.AddEventListener("mousemove",document,handleMove);D2L.LP.Web.UI.Html.Dom.AddEventListener("mouseup",document,handleUp);D2L.LP.Web.UI.Html.Dom.AddEventListener("mousedown",document,handleDown);D2L.LP.Web.UI.Html.Dom.AddEventListener("storage",window,function(e){if(D2L!==undefined&&D2L!==null)D2L.LP.Web.UI.Events.OnStorage.Trigger({Key:e.key,NewValue:e.newValue,OldValue:e.oldValue})});D2L.LP.Web.UI.Html.Dom.AddKeyPressEventListener(document, function(keyPressEventArg){D2L.LP.Web.UI.Events.OnKeyPress.Trigger(keyPressEventArg)});if(document.addEventListener){document.addEventListener("click",clickFunc,false);window.addEventListener("resize",handleResize,false)}else if(document.attachEvent){document.attachEvent("onclick",clickFunc);window.attachEvent("onresize",onResizeTimer)}this.InstallKpel(document,function(obj,evt){return WindowEventManager.KeyPress.Trigger(evt)});UI.OnPageLoad().RegisterMethod(function(){me.Transform.Trigger()})},InstallKpel:function(obj, callback){if(obj===undefined||obj===null)return;if(obj.addEventListener){obj.addEventListener("keypress",function(evt){var key=0;var character="";if(evt.charCode&&evt.charCode!==0){key=parseInt(evt.charCode);character=String.fromCharCode(evt.charCode)}else if(evt.keyCode&&evt.keyCode!==0)key=parseInt(evt.keyCode);return callback.call(obj,obj,new D2L.KeyPressEvent(key,character,evt,null))},false);if(UI.GetBrowserInfo().Type==D2L.UI.BrowserType.Safari||UI.GetBrowserInfo().Type==D2L.UI.BrowserType.Chrome|| UI.GetBrowserInfo().Type==D2L.UI.BrowserType.IE)obj.addEventListener("keydown",function(evt){var key=parseInt(evt.keyCode);if(D2L.KeyPressEvent.IsCharacter(key)&&key!==D2L.KeyPressEvent.Key.Enter)key=0;if(key!==0)return callback.call(obj,obj,new D2L.KeyPressEvent(key,"",evt,null));else return false},false)}else if(obj.attachEvent){var smush=0;obj.attachEvent("onkeydown",function(){if(window.event.keyCode==D2L.KeyPressEvent.Key.Backspace)return callback.call(obj,obj,new D2L.KeyPressEvent(window.event.keyCode, "",window.event,null));else smush=window.event.keyCode;return true});obj.attachEvent("onkeypress",function(){if(window.event&&window.event.keyCode)if(window.event.keyCode==D2L.KeyPressEvent.Key.Enter||window.event.keyCode>=32&&window.event.keyCode<=126){smush=0;return callback.call(obj,obj,new D2L.KeyPressEvent(window.event.keyCode,String.fromCharCode(window.event.keyCode),window.event,null))}return true});obj.attachEvent("onkeyup",function(){if(window.event&&window.event.keyCode==smush)return callback.call(obj, obj,new D2L.KeyPressEvent(window.event.keyCode,"",window.event,null));return true})}},BubbleChangeEvent:function(source,eventObj){var event=new D2L.ChangeEvent(source,eventObj);event.Bubble()},BubbleKeyPressEvent:function(source,eventObj){var event=new D2L.KeyPressEvent(eventObj.keyCode,eventObj.key,eventObj,source);event.Bubble()},BubbleExpandEvent:function(source,eventObj){var event=new D2L.ExpandEvent(source,eventObj);event.Bubble()},BubbleRemoveEvent:function(source){var e=new D2L.RemoveEvent(source); e.Bubble(false)}}); D2L.Event=D2L.Class.extend({Construct:function(type,source,eventObj){arguments.callee.$.Construct.call(this);this.type=type;this.source=source;this.m_doBubble=true;this.eventObj=eventObj},BubbleDownByClassName:function(className){if(D2L.Util.Html.IsDomNode(this.source)){var nodesCollection=D2L.Util.Dom.GetElementsByClassName(this.source,className);var nodes=[];for(var i=0;i<nodesCollection.length;i++)nodes.push(nodesCollection[i]);if(D2L.Util.Dom.HasClassName(className,this.source)>=0)nodes.push(this.source); if(nodes.length>0){var typeName="Default";for(var tn in D2L.Event.Type)if(D2L.Event.Type[tn]==this.type){typeName=tn;break}for(var i=0;i<nodes.length;i++){var node=nodes[i];var eventHandlerName="ID2LOn"+typeName;if(node[eventHandlerName])node[eventHandlerName].Trigger(this)}}}},Bubble:function(doBubbleUp){if(doBubbleUp===undefined)doBubbleUp=true;var typeName="Default";for(var tn in D2L.Event.Type)if(D2L.Event.Type[tn]==this.type){typeName=tn;break}var eventHandlerName="ID2LOn"+typeName;var me=this; var Up=function(node){if(node){if(node[eventHandlerName])node[eventHandlerName].Trigger(me);if(node.parentNode&&me.DoBubble())Up(node.parentNode)}};var Down=function(node){if(node[eventHandlerName]!==undefined)node[eventHandlerName].Trigger(me);if(me.DoBubble()){if(node.cells!==undefined)for(var i=0;i<node.cells.length;i++)Down(node.cells[i]);if(node.rows!==undefined)for(var i=0;i<node.rows.length;i++)Down(node.rows[i]);for(var i=0;i<node.childNodes.length;i++)Down(node.childNodes[i])}};if(doBubbleUp)Up(this.source); else Down(this.source)},GetDomEvent:function(){return this.eventObj},CancelBubbling:function(){this.m_doBubble=false},DoBubble:function(){return this.m_doBubble},ResumeBubbling:function(){this.m_doBubble=true}});D2L.Event.Type={Default:1,Change:2,KeyPress:3,Expand:4,Transform:5,Remove:7,Scroll:8,DisplayVisible:9};D2L.ChangeEvent=D2L.Event.extend({Construct:function(source,eventObj){arguments.callee.$.Construct.call(this,D2L.Event.Type.Change,source,eventObj);this.hasChangeBeenShown=false}}); D2L.KeyPressEvent=D2L.Event.extend({Construct:function(keyCode,character,evt,source){arguments.callee.$.Construct.call(this,D2L.Event.Type.KeyPress,source,evt);this.m_keyCode=keyCode;this.m_character=character},IsNumber:function(){var key=this.GetKey();return key>=48&&key<=57},GetKey:function(){return this.m_keyCode},GetCharacter:function(){return this.m_character},Cancel:function(){if(this.eventObj.preventDefault)this.eventObj.preventDefault()},StopPropagation:function(){if(this.eventObj.stopPropagation)this.eventObj.stopPropagation(); else if(this.eventObj.cancelBubble!==undefined)this.eventObj.cancelBubble=true}});D2L.KeyPressEvent.Key={Backspace:8,Enter:13,Escape:27,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Delete:46};D2L.KeyPressEvent.IsCharacter=function(key){return key!=D2L.KeyPressEvent.Key.Backspace&&key!=D2L.KeyPressEvent.Key.Escape&&key!=D2L.KeyPressEvent.Key.ArrowLeft&&key!=D2L.KeyPressEvent.Key.ArrowUp&&key!=D2L.KeyPressEvent.Key.ArrowRight&&key!=D2L.KeyPressEvent.Key.ArrowDown&&key!=D2L.KeyPressEvent.Key.Delete}; D2L.DisplayVisibleEvent=D2L.Event.extend({Construct:function(source){arguments.callee.$.Construct.call(this,D2L.Event.Type.DisplayVisible,source)},Bubble:function(){this.BubbleDownByClassName("D2LEventDV")}});D2L.ExpandEvent=D2L.Event.extend({Construct:function(source,eventObj){arguments.callee.$.Construct.call(this,D2L.Event.Type.Expand,source,eventObj)},Bubble:function(doBubbleUp){UI.GetDisplayGroupManager().Init();arguments.callee.$.Bubble.call(this,doBubbleUp)}}); D2L.RemoveEvent=D2L.Event.extend({Construct:function(source){arguments.callee.$.Construct.call(this,D2L.Event.Type.Remove,source)}});D2L.TransformEvent=D2L.Event.extend({Construct:function(source){arguments.callee.$.Construct.call(this,D2L.Event.Type.Transform,source)}}); D2L.EventHandler=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.methodListeners=new Array;this.objectListeners=new Array;this.jsListeners=new Array;this.ignoreEvents=false},RegisterJs:function(js){this.jsListeners.push(js)},RegisterMethod:function(method){var found=false;for(var i=0;i<this.methodListeners.length;i++)if(this.methodListeners[i]==method){found=true;break}if(!found)this.methodListeners.push(method)},Register:function(obj,method){var found=false;for(var i= 0;i<this.objectListeners.length;i++)if(this.objectListeners[i].object==obj&&this.objectListeners[i].method==method){found=true;break}if(!found){var pair=new Object;pair.object=obj;pair.method=method;this.objectListeners.push(pair)}},SetIgnoreEvents:function(bool){this.ignoreEvents=bool},Trigger:function(){if(this.ignoreEvents)return false;var result=true;var i;for(i=0;i<this.methodListeners.length;i++)try{result=this.methodListeners[i].apply(this.methodListeners[i],arguments);if(result===false)return false}catch(e){if(D2L.LP.Web.UI.Html.JavaScript.Console.IsEnabled())throw e; }var pair,object,method;for(i=0;i<this.objectListeners.length;i++){method=null;object=null;try{pair=this.objectListeners[i];object=pair.object;method=object[pair.method]}catch(e){}if(method!==undefined&&method!==null&&object!==undefined&&object!==null){result=method.apply(object,arguments);if(result===false)return false}}for(i=0;i<this.jsListeners.length;i++)eval(this.jsListeners[i]);return true}}); D2L.Files.FilterType={All:0,WordProcessing:6,Archive:2,Images:1,Web:3,Spreadsheet:7,Presentation:8,Media:4,Pdf:9,Executable:10,QuickTime:11,Xml:12,Text:13,TextIncludingTsv:14,JavaScript:15,Favicon:16};D2L.Files.Area={MyComputer:"mycomputer",OuFiles:"oufiles",SharedFiles:"sharedfiles",MyLocker:"mylocker",GroupLocker:"grouplocker",LearningPortfolio:"learningportfolio"};D2L.Files.MaxDirectoryNameCharacters=50;D2L.Files.MaxFileNameCharacters=128; D2L.Files.ValidDirectoryNameRegex='^([^\\\\/:*?"<>|]{0,'+(D2L.Files.MaxDirectoryNameCharacters-1)+'}[^\\\\./:*?"<>|])?$';D2L.Files.ValidFileNameRegex='^([^\\\\/:*?"<>|]{0,'+(D2L.Files.MaxFileNameCharacters-1)+'}[^\\./:*?"<>|])?$';D2L.Files.ValidFileNameNoMaxCharactersRegex='^([^\\\\/:*?"<>|]*[^\\\\./:*?"<>|])?$';D2L.Files.InvalidFileNameCharactersRegex='[\\\\/:*?"<>|]';D2L.Files.InvalidDirectoryNameCharacters='\\ / : * ? " < > |';D2L.Files.InvalidFileNameCharacters='\\ / : * ? " < > |'; D2L.Files.FileTypeInfo=D2L.Class.extend({Construct:function(image,description){arguments.callee.$.Construct.call(this);this.m_image=image;this.m_description=description},GetImageInfo:function(){return this.GetImage()},GetImage:function(){return this.m_image},GetDescription:function(){return this.m_description}}); D2L.Files.FileInfo=D2L.Class.extend({Construct:function(fileSystemType,fileId,fileName,size,description,previewUrl){arguments.callee.$.Construct.call(this);if(fileSystemType===undefined)fileSystemType="";if(fileId===undefined)fileId="";if(fileName===undefined)fileName="";if(size===undefined)size=0;size=parseInt(size);if(description===undefined)description="";this.FileSystemType=fileSystemType;this.FileId=fileId;this.FileName=fileName;this.Size=size;this.LastModified=0;this.PreviewUrl=previewUrl|| "";this.m_description=description},Deserialize:function(deserializer){this.FileSystemType=deserializer.GetMember("FileSystemType");this.FileId=deserializer.GetMember("FileId");this.FileName=deserializer.GetMember("FileName");this.Size=deserializer.GetMember("Size");this.LastModified=deserializer.GetMember("LastModified");this.m_description=deserializer.GetMember("Description");this.PreviewUrl=deserializer.GetMember("PreviewUrl")},DeserializeMin:function(deserializer){this.FileId=deserializer.GetMember(); this.FileSystemType=deserializer.GetMember();this.FileName=deserializer.GetMember();this.Size=deserializer.GetMember();this.LastModified=deserializer.GetMember();this.m_description=deserializer.GetMember();this.PreviewUrl=deserializer.GetMember()},Serialize:function(serializer){serializer.AddMember("FileSystemType",this.GetFileSystemType());serializer.AddMember("FileId",this.GetFileId());serializer.AddMember("FileName",this.GetFileName());serializer.AddMember("Size",this.GetSize());serializer.AddMember("LastModified", this.GetLastModified());serializer.AddMember("Description",this.GetDescription());serializer.AddMember("PreviewUrl",this.GetPreviewUrl())},Equals:function(fileInfo){if(fileInfo===null||fileInfo===undefined)return false;return this.GetFileSystemType()!=fileInfo.GetFileSystemType()||(this.GetFileId()!=fileInfo.GetFileId()||this.GetFileName()!=fileInfo.GetFileName()||this.GetSize()!=fileInfo.GetSize()||this.GetLastModified()!=fileInfo.GetLastModified()||this.GetDescription()!=fileInfo.GetDescription())|| this.GetPreviewUrl()!=fileInfo.GetPreviewUrl()},GetFileSystemType:function(){return this.FileSystemType},GetFileId:function(){return this.FileId},GetFileName:function(){return this.FileName},GetSize:function(){return this.Size},GetLastModified:function(){return this.LastModified},GetDescription:function(){return this.m_description},Rename:function(newFileName){this.FileName=newFileName},GetPreviewUrl:function(){return this.PreviewUrl}}); D2L.Files.HandleFileNameDuplicates=function(control,path,vFiles,vFile,showOverwrite){var dr=new D2L.Util.DelayedReturn;D2L.Files.HandleFileNameDuplicates.InProgress=true;if(showOverwrite===undefined)showOverwrite=true;var Finish=function(result){D2L.Files.HandleFileNameDuplicates.InProgress=false;dr.Trigger(result)};var fileNames=[];for(var i=0;i<control.Children().length;i++){var file=control.Children()[i].GetFile();if(file)fileNames.push(file.GetFileName());else if(control.Children()[i].GetFileName){var fileNameRaw= control.Children()[i].GetFileName(false);if(fileNameRaw!=null&&fileNameRaw.trim()!="")fileNames.push(fileNameRaw)}}var vFilesCallback=function(duplicateFileNames){var ShowDuplicateDialog=function(index){if(index>=duplicateFileNames.length)Finish(true);else{var fileName=duplicateFileNames[index];var item=null;for(var i=0;i<control.Children().length;i++){var fileD=control.Children()[i].GetFile();var fileNameD;if(fileD)fileNameD=fileD.GetFileName();else if(control.Children()[i].GetFileName){var fileNameRaw= control.Children()[i].GetFileName(false);if(fileNameRaw!=null&&fileNameRaw.trim()!="")fileNameD=fileNameRaw}if(fileNameD==fileName){item=control.Children()[i];break}}var DuplicateDialogCallback=function(dupDialogResponse){if(dupDialogResponse.GetType()==D2L.Dialog.ResponseType.Positive){if(item)item.m_overwriteFileName=true;dupDialogResponse.GetDialog().Close();ShowDuplicateDialog(++index)}else{dupDialogResponse.GetDialog().Close();Finish(false)}};if(!item.m_overwriteFileName)if(!showOverwrite){UI.Error(new D2L.LP.Text.LangTerm("FrameworkWebPages.DuplicateFileNameDialog.lblErrorPrimary", fileName,path));Finish(false)}else UI.Confirm(DuplicateDialogCallback,new D2L.LP.Text.LangTerm("FrameworkWebPages.DuplicateFileNameDialog.lblPrimary",fileName,path),new D2L.LP.Text.LangTerm("FrameworkWebPages.DuplicateFileNameDialog.lblSecondary"));else ShowDuplicateDialog(++index)}};if(duplicateFileNames.length===0)Finish(true);else ShowDuplicateDialog(0)};if(fileNames.length===0)Finish(true);else vFiles(fileNames,path).Register(vFilesCallback);return dr}; D2L.Files.HandleFileNameDuplicates.InProgress=false;D2L.Files.CleanFileName=function(fileName){var regExp=new RegExp(D2L.Files.InvalidFileNameCharactersRegex,"g");return fileName.replace(regExp,"")}; D2L.Files.GetFileTypeInfo=function(fileName){var dr=new D2L.Util.DelayedReturn;var Handle=function(){var ext=fileName.substr(fileName.lastIndexOf(".")).toLowerCase();if(D2L.Files.TypeInfos[ext])dr.Trigger(D2L.Files.TypeInfos[ext]);else{var oldDef=D2L.Files.TypeInfos["*"];dr.Trigger(new D2L.Files.FileTypeInfo(oldDef.GetImageInfo(),oldDef.GetDescription().replace("[0]",ext.substr(1).toUpperCase())))}};if(D2L.Files.TypeInfos===null){D2L.Files.TypeInfosDr=new D2L.Util.DelayedReturn;D2L.Files.TypeInfosDr.Register(Handle); D2L.LP.Web.UI.Html.JavaScript.IncludeScript("/d2l/common/language/fileTypeInfo.d2l",{"ou":Global.OrgUnitId})}else Handle();return dr};D2L.Images={}; D2L.Images.Image=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.ClassName="D2L.Images.Image";this.m_width=0;this.m_height=0;this.m_path=""},Assign:function(image,makeSizeRelative){this.GetSrc().Register(function(src){image.src=src});var width=this.GetWidth();var height=this.GetHeight();if(width>0&&height>0){image.style.width=width+"px";image.style.height=height+"px"}},Deserialize:function(deserializer){this.m_height=deserializer.GetMember("H");this.m_width=deserializer.GetMember("W"); var path=deserializer.GetMember("F");if(path.substr(0,1)!="/"&&!D2L.Util.Url.IsExternal(path))this.m_path="/d2l/img/"+path;else this.m_path=path},DeserializeMin:function(deserializer){this.m_path=deserializer.GetMember();if(this.m_path.substr(0,1)!="/"&&!D2L.Util.Url.IsExternal(this.m_path))this.m_path="/d2l/img/"+this.m_path+"?v="+Global.ImageVersion;if(deserializer.HasMember()){this.m_height=deserializer.GetMember();if(deserializer.HasMember())this.m_width=deserializer.GetMember();else this.m_width= this.m_height}else{this.m_height=16;this.m_width=16}},GetHeight:function(){return this.m_height},GetSrc:function(){if(this.m_path.length>0)return new D2L.Util.DelayedReturn(this.m_path);else return new D2L.Util.DelayedReturn("/d2l/img/lp/pixel.gif")},GetWidth:function(){return this.m_width},Serialize:function(serializer){serializer.AddMember("ClassName",this.ClassName);serializer.AddMember("W",this.m_width);serializer.AddMember("H",this.m_height);serializer.AddMember("F",this.m_path)}}); D2L.Images.ImageInfo=D2L.Images.Image.extend({Construct:function(imageFile,width,height){arguments.callee.$.Construct.call(this);if(imageFile===undefined)imageFile="";if(width===undefined)width=0;if(height===undefined)height=0;this.m_path=imageFile;this.m_width=width;this.m_height=height},GetImageFile:function(){return this.m_path}}); D2L.Images.ImageTerm=D2L.Images.Image.extend({Construct:function(termName){arguments.callee.$.Construct.call(this);if(termName===undefined)termName="";this.m_termName=termName.toLowerCase();this.m_image=null},GetSrc:function(){if(D2L.Images.ImageTerm.SrcCache[this.m_termName]!==undefined)return new D2L.Util.DelayedReturn(D2L.Images.ImageTerm.SrcCache[this.m_termName]);if(this.m_image!==null)return this.m_image.GetSrc();var dr=new D2L.Util.DelayedReturn;var me=this;UI.GetLanguageManager().GetImageTerm(this.m_termName).Register(function(image){me.m_image= image;image.GetSrc().Register(function(src){D2L.Images.ImageTerm.SrcCache[me.m_termName]=src;dr.Trigger(src)})});return dr},GetTermName:function(){return this.m_name}});D2L.Images.ImageTerm.SrcCache={};D2L.Images.ImageTerm.Assign=function(termName,image,makeSizeRelative){var term=new D2L.Images.ImageTerm(termName);term.Assign(image,makeSizeRelative)};D2L.LP.Web.ISF={};D2L.LP.Web.ISF.UploadValidationResults={Invalid:0,Valid:1,Exists:2}; D2L.Language={Collections:{},ImageCollections:{},PrefetchedTerms:{},PrefetchedImageTerms:{},ImageTerm:D2L.Images.ImageTerm,InitImg:function(collections,images){for(var collectionName in collections)D2L.Language.InitImgCol(collectionName,collections[collectionName]);for(var termName in images)D2L.Language.PrefetchedImageTerms[termName]=D2L.Serialization.JsonDeserializerMin.Deserialize(images[termName],D2L.Images.Image)},InitImgCol:function(collectionName,collection){var newCollection={};for(var termName in collection)newCollection[termName]= D2L.Serialization.JsonDeserializerMin.Deserialize(collection[termName],D2L.Images.Image);D2L.Language.ImageCollections[collectionName]=newCollection},InitLang:function(collections,terms){D2L.Language.Collections=collections;D2L.Language.PrefetchedTerms=terms}}; D2L.Language.LanguageManager=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_cachedImageObjects={};this.m_waitingCollections={};this.m_waitingImageCollections={};this.SmlProcessor=new D2L.Sml.SmlProcessor;var me=this;this.OnCollectionLoad=new D2L.EventHandler;this.OnCollectionLoad.RegisterMethod(function(collectionName){if(me.m_waitingCollections[collectionName])me.m_waitingCollections[collectionName].Trigger()});this.OnImageCollectionLoad=new D2L.EventHandler; this.OnImageCollectionLoad.RegisterMethod(function(collectionName){if(me.m_waitingImageCollections[collectionName])me.m_waitingImageCollections[collectionName].Trigger()})},GetCollection:function(collection){collection=collection.toLowerCase();if(D2L.Language.Collections[collection]!==undefined)return new D2L.Util.DelayedReturn(D2L.Language.Collections[collection]);var dr=new D2L.Util.DelayedReturn;if(this.m_waitingCollections[collection]===undefined){D2L.LP.Web.UI.Html.JavaScript.Console.Warn("Client-side fetch of language collection: '"+ collection+"'.");this.m_waitingCollections[collection]=new D2L.Util.DelayedReturn;D2L.LP.Web.UI.Html.JavaScript.IncludeScript("/d2l/common/language/language.d2l",{"ou":Global.OrgUnitId,"collection":collection,"lid":Global.Language.LanguageId,"v":Global.Language.LanguageVersion})}this.m_waitingCollections[collection].Register(function(){dr.Trigger(D2L.Language.Collections[collection])});return dr},GetCollectionName:function(term){return term.substring(0,term.lastIndexOf(".")).toLowerCase()},GetImageCollection:function(collection){collection= collection.toLowerCase();if(D2L.Language.ImageCollections[collection]!==undefined)return new D2L.Util.DelayedReturn(D2L.Language.ImageCollections[collection]);var dr=new D2L.Util.DelayedReturn;if(this.m_waitingImageCollections[collection]===undefined){D2L.LP.Web.UI.Html.JavaScript.Console.Warn("Client-side fetch of image collection: '"+collection+"'.");this.m_waitingImageCollections[collection]=new D2L.Util.DelayedReturn;D2L.LP.Web.UI.Html.JavaScript.IncludeScript("/d2l/common/language/image.d2l", {"ou":Global.OrgUnitId,"isi":Global.ImageSetId,"iv":Global.ImageVersion,"collection":collection})}this.m_waitingImageCollections[collection].Register(function(){dr.Trigger(D2L.Language.ImageCollections[collection])});return dr},GetPrefetchedTerm:function(term){term=term.toLowerCase();if(D2L.Language.PrefetchedTerms[term]!==undefined)return D2L.Language.PrefetchedTerms[term];else{var collectionName=this.GetCollectionName(term);var termName=this.GetTermName(term,collectionName);if(D2L.Language.Collections[collectionName]!== undefined&&D2L.Language.Collections[collectionName][termName]!==undefined)return D2L.Language.Collections[collectionName][termName]}return""},GetTerm:function(term){term=term.toLowerCase();var dr=new D2L.Util.DelayedReturn;var collectionName=this.GetCollectionName(term);var termName=this.GetTermName(term,collectionName);if(D2L.Language.PrefetchedTerms[term]!==undefined)dr.Trigger(D2L.Language.PrefetchedTerms[term]);else this.GetCollection(collectionName).Register(function(collection){if(collection[termName])dr.Trigger(collection[termName])}); return dr},GetTermName:function(term,collectionName){return term.substr(collectionName.length+1)},GetImageTerm:function(term){var dr=new D2L.Util.DelayedReturn;term=term.toLowerCase();var collectionName=this.GetCollectionName(term);var termName=this.GetTermName(term,collectionName);var me=this;if(this.m_cachedImageObjects[term]!==undefined)dr.Trigger(this.m_cachedImageObjects[term]);else if(D2L.Language.PrefetchedImageTerms[term]!==undefined){this.m_cachedImageObjects[term]=D2L.Language.PrefetchedImageTerms[term]; dr.Trigger(D2L.Language.PrefetchedImageTerms[term])}else this.GetImageCollection(collectionName).Register(function(collection){if(collection[termName]){me.m_cachedImageObjects[termName]=collection[termName];dr.Trigger(collection[termName])}});return dr},GetPrefetchedImageTerm:function(term){term=term.toLowerCase();var image=null;if(D2L.Language.PrefetchedImageTerms[term]!==undefined)image=D2L.Language.PrefetchedImageTerms[term];else{var collectionName=this.GetCollectionName(term);var termName=this.GetTermName(term, collectionName);if(D2L.Language.ImageCollections[collectionName]!==undefined)image=D2L.Language.ImageCollections[collectionName][termName]}if(image!==undefined&&image!==null)return new D2L.Images.ImageInfo(image.m_path);else return new D2L.Images.ImageInfo("/d2l/common/img/failed_cache_image.gif",16,16)},HasTerm:function(term){term=term.toLowerCase();var collectionName=this.GetCollectionName(term);var termName=this.GetTermName(term,collectionName);return D2L.Language.PrefetchedTerms[term]!==undefined|| D2L.Language.Collections[collectionName]!==undefined&&D2L.Language.Collections[collectionName][termName]!==undefined}});D2L.LP.LayeredArch={}; D2L.LP.LayeredArch.PagingInfo=D2L.Class.extend({Construct:function(pageSize,pageNumber){if(pageSize===undefined)pageSize=20;if(pageNumber===undefined)pageNumber=1;arguments.callee.$.Construct.call(this);this.m_pageSize=pageSize;this.m_pageNumber=pageNumber},Deserialize:function(deserializer){this.m_pageSize=deserializer.GetMember("PageSize");this.m_pageNumber=deserializer.GetMember("PageNumber")},GetPageSize:function(){return this.m_pageSize},GetPageNumber:function(){return this.m_pageNumber},Serialize:function(serializer){serializer.AddMember("PageSize", this.GetPageSize());serializer.AddMember("PageNumber",this.GetPageNumber())},SetPageSize:function(pageSize){this.m_pageSize=pageSize},SetPageNumber:function(pageNumber){this.m_pageNumber=pageNumber}});D2L.LP.LayeredArch.SelectionFilterTypes={None:0,All:1,AllExcept:2,Some:3}; D2L.LP.LayeredArch.SortingInfo=D2L.Class.extend({Construct:function(sortField,isAscending,collationCultureCode){if(sortField===undefined)sortField="";if(isAscending===undefined)isAscending=true;if(collationCultureCode===undefined)collationCultureCode=null;arguments.callee.$.Construct.call(this);this.m_collationCultureCode=null;this.m_isAscending=isAscending;this.m_sortField=sortField},Deserialize:function(deserializer){this.m_isAscending=deserializer.GetMember("IsAscending");this.m_sortField=deserializer.GetMember("SortField"); if(deserializer.HasMember("CollationCultureCode"))this.m_collationCultureCode=deserializer.GetMember("CollationCultureCode")},GetCollationCultureCode:function(){return this.m_collationCultureCode},GetSortField:function(){return this.m_sortField},IsAscending:function(){return this.m_isAscending},Serialize:function(serializer){serializer.AddMember("SortField",this.GetSortField());serializer.AddMember("IsAscending",this.IsAscending());serializer.AddMember("CollationCultureCode",this.GetCollationCultureCode())}, SetIsAscending:function(isAscending){this.m_isAscending=isAscending},SetSortField:function(sortField){this.m_sortField=sortField}});D2L.Layouts={}; D2L.Layouts.ViewModeIntegration=function(domNodeId){var tableNode=UI.GetById(domNodeId);var Transform=function(){setTimeout(function(){for(var i=0;i<tableNode.rows.length;i++){var row=tableNode.rows[i];for(var j=0;j<row.cells.length;j++){var cell=row.cells[j];for(var k=0;k<cell.childNodes.length;k++){var child=cell.childNodes[k];if(child.className&&child.className.indexOf("dlay_autofill")!=-1)child.style.height="auto";else if(child.firstChild&&child.firstChild.className&&child.firstChild.className.indexOf("dlay_autofill")!= -1)child.firstChild.style.height="auto"}}}D2L.Layouts.Adjustautofill(tableNode)},0)};WindowEventManager.Transform.RegisterMethod(function(){try{Transform()}catch(e){}});try{Transform()}catch(e){}}; D2L.Layouts.Adjustautofill=function(tableNode){for(var i=0;i<tableNode.rows.length;i++){var row=tableNode.rows[i];for(var j=0;j<row.cells.length;j++){var cell=row.cells[j];var panelsWithautofill=[];for(var k=0;k<cell.childNodes.length;k++){var child=cell.childNodes[k];if(child.className&&child.className.indexOf("dlay_autofill")!=-1)panelsWithautofill.push(child);else if(child.firstChild&&child.firstChild.className&&child.firstChild.className.indexOf("dlay_autofill")!=-1)panelsWithautofill.push(child.firstChild)}for(var k= 0;k<panelsWithautofill.length;k++)panelsWithautofill[k].style.height="auto";var originalCellHeight=cell.offsetHeight;if(panelsWithautofill.length>0){var originalHeight=panelsWithautofill[panelsWithautofill.length-1].offsetHeight;var increase=originalCellHeight+1;panelsWithautofill[panelsWithautofill.length-1].style.height=panelsWithautofill[panelsWithautofill.length-1].offsetHeight+increase+"px";var diff=increase-(cell.offsetHeight-originalCellHeight);var indDiff=diff/panelsWithautofill.length;for(var k= 0;k<panelsWithautofill.length-1;k++)panelsWithautofill[k].style.height=panelsWithautofill[k].offsetHeight+indDiff+"px";panelsWithautofill[panelsWithautofill.length-1].style.height=originalHeight+indDiff+"px"}}}};D2L.MultiEdit={}; D2L.MultiEdit.Manager=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_controls=[];this.m_includeUnchanged=false;var me=this;UI.GetFormManager().OnChangeReset.RegisterMethod(function(){for(var i=0;i<me.m_controls.length;i++)me.m_controls[i].Reset()})},DeserializeMin:function(deserializer){this.m_controls=deserializer.GetObjectArrayMin(D2L.MultiEdit.MultiEditControl);this.m_includeUnchanged=deserializer.GetBoolean()},Serialize:function(serializer){var controls= [];for(var i=0;i<this.m_controls.length;i++)if(this.m_controls[i].IsInDom()&&(this.m_controls[i].HasChanged()||this.m_includeUnchanged))controls.push(this.m_controls[i]);serializer.AddMember("Controls",controls)},AddMultiEditToForm:function(){var form=UI.GetForm();var hdn=UI.GetById("d2l_multiedit");if(!hdn){hdn=document.createElement("input");hdn.type="hidden";hdn.name="d2l_multiedit";hdn.id="d2l_multiedit";form.appendChild(hdn)}hdn.value=D2L.Serialization.JsonSerializer.Serialize(this)},GetMultiEditObject:function(key, fieldName){fieldName=fieldName.toLowerCase();for(var i=0;i<this.m_controls.length;i++)if(this.m_controls[i].GetKey()==key&&this.m_controls[i].GetField().toLowerCase()==fieldName)return this.m_controls[i];return null},GetMultiEditObjectsByField:function(fieldName){fieldName=fieldName.toLowerCase();var ret={};for(var i=0;i<this.m_controls.length;i++)if(this.m_controls[i].GetField().toLowerCase()==fieldName)ret[this.m_controls[i].GetKey()]=this.m_controls[i];return ret},GetMultiEditObjectsByKey:function(key){var ret= {};for(var i=0;i<this.m_controls.length;i++)if(this.m_controls[i].GetKey()==key)ret[this.m_controls[i].GetField()]=this.m_controls[i];return ret}});D2L.MultiEdit.GetManager=function(){return UI.GetMultiEditManager()}; D2L.MultiEdit.MultiEditControl=D2L.Class.extend({Construct:function(obj){arguments.callee.$.Construct.call(this);this.m_controlId=null;this.m_key="";this.m_originalValue="";this.m_field="";this.m_includeWhenUnchanged=false},DeserializeMin:function(deserializer){this.m_controlId=deserializer.GetObjectMin(D2L.Control.Id);this.m_key=deserializer.GetMember();this.m_originalValue=deserializer.GetMember();this.m_field=deserializer.GetMember();this.m_includeWhenUnchanged=deserializer.GetBoolean()},Serialize:function(serializer){serializer.AddMember("Key", this.GetKey());serializer.AddMember("Field",this.GetField());serializer.AddMember("Value",this.GetValue())},GetControl:function(){return UI.GetControl(this.m_controlId.ID(),this.m_controlId.SID())},GetField:function(){return this.m_field},GetKey:function(){return this.m_key},GetObject:function(){return this.GetControl()},GetValue:function(){return this.GetControl().GetMultiEditValue()},GetOriginalValue:function(){return this.m_originalValue},HasChanged:function(){return this.IncludeWhenUnchanged()|| this.GetOriginalValue()!=this.GetValue()},IncludeWhenUnchanged:function(){return this.m_includeWhenUnchanged},IsInDom:function(){var domNode=this.GetControl().GetDomNode();if(domNode!==null){while(domNode.parentNode!==null)domNode=domNode.parentNode;return domNode==document}return false},Reset:function(){this.m_originalValue=this.GetValue()},SetIncludeWhenUnchanged:function(includeWhenUnchanged){this.m_includeWhenUnchanged=includeWhenUnchanged}});D2L.Rpc={}; D2L.Rpc.Create=function(serverFunc,callback,src){return new D2L.RpcMethodProxy(D2L.Rpc.Type.Ajax,serverFunc,callback,src)};D2L.Rpc.CreateBeacon=function(serverFunc,src){return new D2L.RpcMethodProxy(D2L.Rpc.Type.Beacon,serverFunc,undefined,src)};D2L.Rpc.CreatePost=function(serverFunc,callback,src){return new D2L.RpcMethodProxy(D2L.Rpc.Type.Post,serverFunc,callback,src)};D2L.Rpc.CreateSynchronous=function(serverFunc,src){return new D2L.RpcMethodProxy(D2L.Rpc.Type.Synchronous,serverFunc,undefined,src)}; D2L.Rpc.ResponseType={Success:0,Error:1};D2L.Rpc.Type={Ajax:0,Post:1,Synchronous:2}; D2L.Rpc.Manager=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_xhrNum=0},Send:function(type,serverFunc,src,params){var me=this;me.m_xhrNum++;var obj={"Type":type,"ServerFunc":serverFunc,"Src":src,"Params":params,"Num":new Number(me.m_xhrNum)};if(type==D2L.Rpc.Type.Synchronous){var xhr=me.SendAjax(obj,D2L.LP.Web.Authentication.Xsrf.GetXsrfToken());if(xhr.responseText.substr(0,13)=="while(true){}"){D2L.LP.Web.UI.Html.JavaScript.Console.Log("Rpc "+obj.Num+": Received positive response '"+ xhr.responseText+"'.");return D2L.Serialization.JsonDeserializer.Deserialize(xhr.responseText.substr(13),D2L.Rpc.Response)}}else{obj.DR=new D2L.Util.DelayedReturn;me.SendAjax(obj,D2L.LP.Web.Authentication.Xsrf.GetXsrfToken());return obj.DR}},SendAjax:function(obj,xsrfToken){var extIndex=obj.Src.lastIndexOf(".d2l");if(extIndex>-1)obj.Src=obj.Src.substring(0,extIndex)+".d2lfile"+obj.Src.substr(extIndex+4);var xhr=this.GetXhr(obj,obj.Type==D2L.Rpc.Type.Ajax);UI.GenerateHitCode();obj.Params+="&"+D2L.LP.Web.Authentication.Xsrf.GetXsrfTokenParameterName()+ "="+xsrfToken+"&d2l_hitcode="+UI.GetHitCode()+"&d2l_action=rpc";xhr.open("POST",obj.Src+"&d2l_rh=rpc&d2l_rt=call",obj.Type==D2L.Rpc.Type.Ajax);xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhr.send(obj.Params);return xhr},GetXhr:function(obj,isAsynchronous){var xhr=function createXMLHttpRequest(){var ex;try{return new XMLHttpRequest}catch(ex){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(ex){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(ex){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(ex){}D2L.LP.Web.UI.Html.JavaScript.Console.Error("Rpc "+ obj.Num+": Could not initialize D2L.Rpc object.");return null}();if(isAsynchronous){var me=this;var timer=new Date;var response=new D2L.Rpc.Response;response.SetType(D2L.Rpc.ResponseType.Error);xhr.onreadystatechange=function(){var readyState=null;var d2l=null;try{var readyState=xhr.readyState;var d2l=D2L}catch(e){}if(readyState&&d2l){D2L.LP.Web.UI.Html.JavaScript.Console.Log("Rpc "+obj.Num+": Ready State:"+readyState);if(readyState==4){var status;try{status=xhr.status}catch(e){}if(status){D2L.LP.Web.UI.Html.JavaScript.Console.Log("Rpc "+ obj.Num+": Status is '"+status+"'.");if(status==200){try{if(xhr.responseText.substr(0,13)=="while(true){}"){response=D2L.Serialization.JsonDeserializer.Deserialize(xhr.responseText.substr(13),D2L.Rpc.Response);D2L.LP.Web.UI.Html.JavaScript.Console.Log("Rpc "+obj.Num+": Received positive response '"+xhr.responseText+"'.")}}catch(e){D2L.LP.Web.UI.Html.JavaScript.Console.Error("Rpc "+obj.Num+": Error evaluating response '"+xhr.responseText+"'.")}if(response.GetRedirectUrl().length>0)document.location.href= response.GetRedirectUrl();else{var messages=response.GetMessages();if(messages)if(messages.GetStatusType()!=D2L.Control.MessageArea.Status.None||messages.HasCustomStatus()||messages.HasErrors()){UI.GetMessageArea().SetMessages(messages);if(messages.GetStatusType()==D2L.Control.MessageArea.Status.Saved)FormManager.ResetChanges()}response.SetDuration((new Date).valueOf()-timer.valueOf());obj.DR.Trigger(response)}}else{D2L.LP.Web.UI.Html.JavaScript.Console.Error(xhr.responseText);obj.DR.Trigger(response)}}delete xhr.onreadystatechange}}}}return xhr}}); D2L.RpcMethodProxy=D2L.Util.MethodProxy.extend({Construct:function(type,serverFunc,callback,src){this.m_skipValidation=true;if(type==D2L.Rpc.Type.Post)this.m_skipValidation=false;this.m_sessionKeepAlive=true;if(src===undefined||src.length===0)src=document.location.href;src=src.split("#")[0];if(src.indexOf("ou=")==-1){if(src.indexOf("?")==-1)src+="?";else src+="&";src+="ou="+Global.OrgUnitId}var me=this;var CallAjax=function(){var args={Arguments:arguments,Serialize:function(serializer){for(var i= 0;i<this.Arguments.length;i++)serializer.AddMember("param"+(i+1),this.Arguments[i])}};var params="d2l_rf="+serverFunc+"¶ms="+D2L.Util.Url.Encode(D2L.Serialization.JsonSerializer.Serialize(args));if(!me.m_sessionKeepAlive)params+="&d2l_nokeepalive=1&X-D2L-Session=";if(me.m_includeState!==null){params+="&d2l_stateGroups="+D2L.Util.Url.Encode(me.m_includeState.Groups);params+="&d2l_stateScopes="+D2L.Util.Url.Encode(me.m_includeState.Scopes);params+="&d2l_statePageId="+D2L.Util.Url.Encode(UI.pageId); for(var currStateGroup in me.m_includeState.State)params+="&d2l_state_"+currStateGroup+"="+D2L.Util.Url.Encode(me.m_includeState.State[currStateGroup])}return RpcManager.Send(type,serverFunc,src,params)};var CallPost=function(){var dr=new D2L.Util.DelayedReturn;var iframeName=UI.GetUniqueHtmlId();if(document.body.insertAdjacentHTML)document.body.insertAdjacentHTML("beforeEnd","<iframe id='"+iframeName+"' name='"+iframeName+"' style='display:none'></iframe>");else{var iframe=document.createElement("iframe"); iframe.id=iframeName;iframe.name=iframeName;iframe.style.position="absolute";iframe.style.left="-200px";iframe.style.top="-200px";iframe.style.width="1px";iframe.style.height="1px";document.body.appendChild(iframe)}var cbName=UI.GetUniqueHtmlId();window[cbName]=function(responseText){var response=D2L.Serialization.JsonDeserializer.Deserialize(responseText,D2L.Rpc.Response);if(response.GetRedirectUrl().length>0)document.location.href=response.GetRedirectUrl();else{if(!me.m_skipValidation){var messages= response.GetMessages();if(messages!==null){UI.GetMessageArea().SetMessages(messages);if(messages.GetStatusType()==D2L.Control.MessageArea.Status.Saved)FormManager.ResetChanges()}}D2L.LP.Web.UI.Html.JavaScript.Console.Log("Post-Rpc: Received positive response '"+responseText+"'.");dr.Trigger(response)}};arguments.Serialize=function(serializer){for(var i=0;i<this.length;i++)serializer.AddMember("param"+(i+1),this[i])};var ni=new D2L.NavInfo;ni.navigation=src;ni.target=iframeName;ni.action="RPC";ni.SetParam("d2l_rh", "rpc");ni.SetParam("d2l_rt","post");ni.SetParam("d2l_rcb",cbName);ni.SetParam("d2l_rf",serverFunc);ni.SetParam("params",D2L.Serialization.JsonSerializer.Serialize(arguments));D2L.LP.Web.UI.Html.JavaScript.Console.Log("Post-Rpc: posting to function '"+serverFunc+"' on Src '"+src+"'...");Nav.Go(ni,me.m_skipValidation);return dr};var CallBeacon=function(){var args={Arguments:arguments,Serialize:function(serializer){for(var i=0;i<this.Arguments.length;i++)serializer.AddMember("param"+(i+1),this.Arguments[i])}}; var formData=new FormData;formData.append("d2l_rf",serverFunc);formData.append("params",D2L.Serialization.JsonSerializer.Serialize(args));if(me.m_includeState!==null){formData.append("d2l_stateGroups",me.m_includeState.Groups);formData.append("d2l_stateScopes",me.m_includeState.Scopes);formData.append("d2l_statePageId",UI.pageId);for(var currStateGroup in me.m_includeState.State)formData.append("d2l_state_"+currStateGroup,me.m_includeState.State[currStateGroup])}formData.append(D2L.LP.Web.Authentication.Xsrf.GetXsrfTokenParameterName(), D2L.LP.Web.Authentication.Xsrf.GetXsrfToken());formData.append("d2l_hitcode",UI.GetHitCode());formData.append("d2l_action","rpc");var extIndex=src.lastIndexOf(".d2l");var realSrc=src.substring(0,extIndex)+".d2lfile"+src.substr(extIndex+4);navigator.sendBeacon(realSrc+"&d2l_rh=rpc&d2l_rt=call",formData)};var beginFunc=type==D2L.Rpc.Type.Post?CallPost:CallAjax;if(type==D2L.Rpc.Type.Beacon)beginFunc=CallBeacon;arguments.callee.$.Construct.call(this,beginFunc,callback,type!=D2L.Rpc.Type.Synchronous); this.m_includeState=null},SetSessionKeepAlive:function(keepAlive){this.m_sessionKeepAlive=keepAlive},SetSkipValidation:function(skipValidation){this.m_skipValidation=skipValidation},SetIncludeState:function(state){this.m_includeState=state}}); D2L.Rpc.Response=D2L.Class.extend({Construct:function(duration){if(duration===undefined)duration=0;this.m_duration=duration;this.m_isResultMin=false;this.m_messages=null;this.m_redirectUrl="";this.m_responseType=D2L.Rpc.ResponseType.Success;this.m_result=null},Deserialize:function(deserializer){if(deserializer.HasMember("MessageArea"))this.m_messages=deserializer.GetObject("MessageArea",D2L.Control.MessageArea.Messages);this.m_isResultMin=deserializer.GetMember("IsResultMin");this.m_responseType= deserializer.GetMember("ResponseType");this.m_redirectUrl=deserializer.GetMember("RedirectUrl");this.m_result=deserializer.GetMember("Result")},GetDuration:function(){return this.m_duration},GetMessages:function(){return this.m_messages},GetRedirectUrl:function(){return this.m_redirectUrl},GetResponseType:function(){return this.GetType()},GetType:function(){return this.m_responseType},GetResult:function(type){if(this.m_isResultMin)return D2L.Serialization.JsonDeserializerMin.Deserialize(this.m_result, type);else{var hasType=type!==undefined||this.m_result instanceof Array&&this.m_result.length>0&&this.m_result[0]!==null&&this.m_result[0].ClassName!==undefined||this.m_result!==undefined&&this.m_result!==null&&this.m_result.ClassName!==undefined;if(hasType)return D2L.Serialization.JsonDeserializer.Deserialize(this.m_result,type);else return this.m_result}},SetDuration:function(duration){this.m_duration=duration},SetType:function(type){this.m_responseType=type}});D2L.Rpc.Response.Timeout="timeout"; D2L.Serialization={}; D2L.Serialization.JsonDeserializer=D2L.Class.extend({Construct:function(json){arguments.callee.$.Construct.call(this);if(json!==undefined){this.m_data=json;if(json!==null&&json.isString)if(!D2L.LP.Web.UI.Flags.Flag("de31558-use-standard-json",false))this.m_data=eval("("+json+")");else this.m_data=JSON.parse(json)}this.m_keys=[];for(var key in this.m_data)this.m_keys.push(key)},Keys:function(){return this.m_keys},GetDictionary:function(name,keyType,valueType){var ret={};if(this.m_data!==undefined&& this.m_data!==null&&this.m_data[name]!==undefined){var dic=this.m_data[name];for(var key in dic){var dKey=key;if(typeof key=="object")dKey=D2L.Serialization.JsonDeserializerMin.Deserialize(key,keyType);else if(keyType=="number")dKey=parseFloat(key);if(typeof dic[key]=="object")ret[dKey]=D2L.Serialization.JsonDeserializerMin.Deserialize(dic[key],valueType);else ret[dKey]=dic[key]}}return ret},GetMember:function(name,defaultValue){if(this.m_data!==undefined&&this.m_data!==null){if(this.m_data[name]=== undefined)return defaultValue;return this.m_data[name]}return defaultValue},GetMemberAsFunction:function(name){if(!D2L.LP.Web.UI.Flags.Flag("de31558-use-standard-json",false))return this.GetMember(name);var type=undefined;if(this.m_data!==undefined&&this.m_data!==null)if(this.m_data[name]!==undefined){type=this.m_data[name];try{type=type.split(".").reduce(function(ob,key){return ob[key]},window)}catch(e){type=undefined}}return type},GetObject:function(name,type){if(this.m_data[name]!==undefined)return D2L.Serialization.JsonDeserializer.Deserialize(this.m_data[name], type);return undefined},GetObjectArray:function(name,type){var ret=[];if(this.m_data[name]!==undefined)for(var i=0;i<this.m_data[name].length;i++)ret.push(D2L.Serialization.JsonDeserializer.Deserialize(this.m_data[name][i],type));return ret},HasMember:function(name){return this.m_data!==undefined&&this.m_data!==null&&this.m_data[name]!==undefined},IsArray:function(name){return D2L.Util.JavaScript.IsArray(this.m_data[name])}}); D2L.Serialization.JsonDeserializer.Deserialize=function(json,type){var obj=json;if(json!==undefined&&json!==null&&json.isString)if(!D2L.LP.Web.UI.Flags.Flag("de31558-use-standard-json",false))obj=eval("("+json+")");else obj=JSON.parse(json);if(obj===null)return null;if(obj instanceof Array){var l=obj.length;for(var i=0;i<l;i++)obj[i]=D2L.Serialization.JsonDeserializer.Deserialize(obj[i],type)}else{var deserializer=new D2L.Serialization.JsonDeserializer(json);if(type===undefined&&deserializer.HasMember("ClassName")){type= deserializer.GetMember("ClassName");if(type.isString)if(!D2L.LP.Web.UI.Flags.Flag("de31558-use-standard-json",false))type=eval(type);else type=type.split(".").reduce(function(ob,key){return ob[key]},window)}if(type!==undefined){obj=new type;if(obj.Deserialize!==undefined)obj.Deserialize(deserializer)}}return obj}; D2L.Serialization.JsonDeserializerMin=D2L.Class.extend({Construct:function(json){arguments.callee.$.Construct.call(this);this.m_data=[];this.m_index=-1;if(json!==undefined){this.m_data=json;if(json!==undefined&&json!==null&&json.isString)if(!D2L.LP.Web.UI.Flags.Flag("de31558-use-standard-json",true))this.m_data=eval("("+json+")");else this.m_data=JSON.parse(json)}},GetBoolean:function(){if(this.m_data!==undefined&&this.m_data!==null&&this.m_data.length>this.m_index+1){this.m_index++;return this.m_data[this.m_index]== 1}return false},GetMember:function(){if(this.m_data!==undefined&&this.m_data!==null&&this.m_data.length>this.m_index+1){this.m_index++;return this.m_data[this.m_index]}return undefined},GetMemberAsFunction:function(){if(!D2L.LP.Web.UI.Flags.Flag("de31558-use-standard-json",false))return this.GetMember();var type=undefined;if(this.m_data!==undefined&&this.m_data!==null&&this.m_data.length>this.m_index+1){this.m_index++;var type=this.m_data[this.m_index];try{type=type.split(".").reduce(function(ob, key){return ob[key]},window)}catch(e){type=undefined}}return type},GetObject:function(type){if(this.m_data!==undefined&&this.m_data!==null&&this.m_data.length>this.m_index+1){this.m_index++;return D2L.Serialization.JsonDeserializer.Deserialize(this.m_data[this.m_index],type)}return undefined},GetObjectMin:function(type){if(this.m_data!==undefined&&this.m_data!==null&&this.m_data.length>this.m_index+1){this.m_index++;return D2L.Serialization.JsonDeserializerMin.Deserialize(this.m_data[this.m_index], type)}return undefined},GetObjectArray:function(type){var ret=[];if(this.m_data!==undefined&&this.m_data!==null&&this.m_data.length>this.m_index+1){this.m_index++;for(var i=0;i<this.m_data[this.m_index].length;i++)ret.push(D2L.Serialization.JsonDeserializer.Deserialize(this.m_data[this.m_index][i],type))}return ret},GetObjectArrayMin:function(type){var ret=[];if(this.m_data!==undefined&&this.m_data!==null&&this.m_data.length>this.m_index+1){this.m_index++;for(var i=0;i<this.m_data[this.m_index].length;i++)ret.push(D2L.Serialization.JsonDeserializerMin.Deserialize(this.m_data[this.m_index][i], type))}return ret},GetDictionaryMin:function(keyType,valueType){var ret={};if(this.m_data!==undefined&&this.m_data!==null&&this.m_data.length>this.m_index+1){this.m_index++;var dic=this.m_data[this.m_index];for(var key in dic){var dKey=key;if(typeof key=="object")dKey=D2L.Serialization.JsonDeserializerMin.Deserialize(key,keyType);else if(keyType=="number")dKey=parseFloat(key);if(typeof dic[key]=="object")ret[dKey]=D2L.Serialization.JsonDeserializerMin.Deserialize(dic[key],valueType);else ret[dKey]= dic[key]}}return ret},HasMember:function(){return this.m_data!==undefined&&this.m_data!==null&&this.m_data.length>this.m_index+1}}); D2L.Serialization.JsonDeserializerMin.Deserialize=function(json,type){var obj=json;if(json!==undefined&&json!==null&&json.isString)if(!D2L.LP.Web.UI.Flags.Flag("de31558-use-standard-json",true))obj=eval("("+json+")");else obj=JSON.parse(json);if(obj===null)return null;var deserializer=new D2L.Serialization.JsonDeserializerMin(obj);if(type!==undefined){var t=typeof type;if(t!="string")obj=new type}if(obj.DeserializeMin!==undefined)obj.DeserializeMin(deserializer);return obj}; D2L.Serialization.JsonSerializer=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_text=new D2L.Util.StringBuilder;this.m_comma=""},DoSerialize:function(obj,serializeMethod,noStringEncode,param1,param2){if(serializeMethod===undefined){serializeMethod="Serialize";if(obj&&obj[serializeMethod]===undefined&&obj["_serialize"]!==undefined)serializeMethod="_serialize"}if(noStringEncode===undefined)noStringEncode=false;if(obj===undefined||obj===null)this.m_text.Append("null"); else if(typeof obj=="boolean")this.m_text.Append(obj);else if(typeof obj=="string")if(noStringEncode)this.m_text.Append(obj);else if(!D2L.LP.Web.UI.Flags.Flag("de31558-use-standard-json",false))this.m_text.Append("'"+obj.jsString()+"'");else this.m_text.Append(JSON.stringify(obj));else if(typeof obj=="number")this.m_text.Append(obj);else if(typeof obj=="object")if(D2L.Util.JavaScript.IsArray(obj)){this.m_text.Append("[");var l=obj.length;var comma="";for(var i=0;i<l;i++){this.m_text.Append(comma); this.DoSerialize(obj[i],serializeMethod);comma=","}this.m_text.Append("]")}else if(obj[serializeMethod]){this.m_text.Append("{");var oldComma=this.m_comma;this.m_comma="";obj[serializeMethod](this,param1,param2);this.m_text.Append("}");this.m_comma=oldComma}else{var useProperJson=D2L.LP.Web.UI.Flags.Flag("de31558-use-standard-json",false);this.m_text.Append("{");var comma="";var i=0;for(var key in obj){this.m_text.Append(comma);if(!useProperJson)this.m_text.Append(key+":");else this.m_text.Append(JSON.stringify(key)+ ":");this.DoSerialize(obj[key],serializeMethod);comma=","}this.m_text.Append("}")}else this.m_text.Append("null")},AddMember:function(name,member,serializeMethod,noStringEncode,param1,param2){if(name===undefined||name===null||name.length===0)return;var quotedName;if(!D2L.LP.Web.UI.Flags.Flag("de31558-use-standard-json",false))quotedName="'"+name.jsString()+"'";else quotedName=JSON.stringify(name);this.m_text.Append(this.m_comma+quotedName+":"+D2L.Serialization.JsonSerializer.Serialize(member,serializeMethod, noStringEncode,param1,param2));this.m_comma=","},ToString:function(){return this.m_text.ToString()}});D2L.Serialization.JsonSerializer.Serialize=function(obj,serializeMethod,noStringEncode,param1,param2){var serializer=new D2L.Serialization.JsonSerializer;serializer.DoSerialize(obj,serializeMethod,noStringEncode,param1,param2);return serializer.ToString()};D2L.Sml={}; D2L.Sml.SmlProcessor=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this)},Encode:function(input){if(!input)return"";return input.replace(/(\\|\[|\])/g,"\\$1")},Process:function(input,type){if(input===undefined||input===null)return"";var st=new D2L.Sml.SmlTokenizer(input);var stack=new Array;var ret="";var isEmpty=true;while(!st.IsDone()){var token=st.GetToken();if(token.m_type==D2L.Sml.SmlTokenType.Text){isEmpty=false;if(type==D2L.Sml.SmlProcessor.Mode.Html)ret+=D2L.Util.Html.Encode(token.m_text); else ret+=token.m_text}else if(token.m_type==D2L.Sml.SmlTokenType.Unknown){isEmpty=false;ret+="["+token.m_text+"]"}else if(token.m_isOpen)if(token.m_isContainer){stack.push(token);if(type==D2L.Sml.SmlProcessor.Mode.Html)ret+=this.WriteOpenTag(token);else if(type==D2L.Sml.SmlProcessor.Mode.PlainText&&token.m_type==D2L.Sml.SmlTokenType.Abbr)ret+=token.m_text.substring(5,token.m_text.length)+" ("}else if(token.m_type==D2L.Sml.SmlTokenType.Break){isEmpty=false;if(type==D2L.Sml.SmlProcessor.Mode.Html)ret+= "<br/>";else ret+="\n"}else{if(token.m_type==D2L.Sml.SmlTokenType.Space){isEmpty=false;if(token.m_text.indexOf(":")>0){var spaces=token.m_text.substring(token.m_text.indexOf(":")+1,token.m_text.length);for(var i=0;i<spaces;i++)if(type==D2L.Sml.SmlProcessor.Mode.Html)ret+=" ";else ret+=" "}else if(type==D2L.Sml.SmlProcessor.Mode.Html)ret+=" ";else ret+=" "}}else if(stack.length!=0)if(stack[stack.length-1].m_type!=token.m_type){var contained=false;for(x in stack)if(stack[x].m_type==token.m_type){contained= true;break}if(contained){while(stack[stack.length-1].m_type!=token.m_type)if(type==D2L.Sml.SmlProcessor.Mode.Html)ret+=this.WriteCloseTag(stack.pop());else{stack.pop();if(type==D2L.Sml.SmlProcessor.Mode.PlainText&&token.m_type==D2L.Sml.SmlTokenType.Abbr)ret+=")"}if(type==D2L.Sml.SmlProcessor.Mode.Html)ret+=this.WriteCloseTag(stack.pop());else{stack.pop();if(type==D2L.Sml.SmlProcessor.Mode.PlainText&&token.m_type==D2L.Sml.SmlTokenType.Abbr)ret+=")"}}}else if(type==D2L.Sml.SmlProcessor.Mode.Html)ret+= this.WriteCloseTag(stack.pop());else{stack.pop();if(type==D2L.Sml.SmlProcessor.Mode.PlainText&&token.m_type==D2L.Sml.SmlTokenType.Abbr)ret+=")"}}while(stack.length!=0)if(type==D2L.Sml.SmlProcessor.Mode.Html)ret+=this.WriteCloseTag(stack.pop());else stack.pop();if(isEmpty)return"";else return ret},WriteOpenTag:function(token){var ret="";var daylightEnabled=D2L.LP.Web.UI.Daylight.IsEnabled();switch(token.m_type){case D2L.Sml.SmlTokenType.Abbr:var title=token.m_text.substring(5,token.m_text.length); title=D2L.Util.Html.Encode(title);ret=title?'<abbr title="'+title+'">':"<abbr>";break;case D2L.Sml.SmlTokenType.Alert:ret='<span class="ds_a">';break;case D2L.Sml.SmlTokenType.Bold:ret="<strong>";break;case D2L.Sml.SmlTokenType.Help:var value=token.m_text.substring(5,token.m_text.length);var titleTerm="";var descTerm="";var cssClass="";var commaIndex=value.indexOf(",");if(commaIndex>-1){titleTerm=value.substring(0,commaIndex);descTerm=value.substring(commaIndex+1)}else{titleTerm="Framework.PopupHelp."+ value;descTerm="Framework.PopupHelpDesc."+value}titleTerm=D2L.Util.Html.Encode(D2L.Util.Html.JsString(titleTerm.trim()));descTerm=D2L.Util.Html.Encode(D2L.Util.Html.JsString(descTerm.trim()));cssClass=daylightEnabled?"d2l-link":"vui-link d2l-link";var onclick=value?" onclick=\"D2L.LP.Web.UI.Desktop.Controls.InlineHelp.PopupHelp('"+titleTerm+"','"+descTerm+"');return false;\"":"";ret='<a href="javascript:void(0);"'+onclick+' class="'+cssClass+'">';break;case D2L.Sml.SmlTokenType.Italic:ret="<em>"; break;case D2L.Sml.SmlTokenType.Light:ret='<span class="ds_b">';break;case D2L.Sml.SmlTokenType.Info:ret='<span class="ds_c">';break;case D2L.Sml.SmlTokenType.Colour:var clr=token.m_text.substring(4,token.m_text.length).trim();var style="";if(clr){clr=D2L.Util.Html.Encode(clr);style=clr.match(this._regexes.cssColours)?' style="color:'+clr+'"':' data-invalid-color="'+clr+'"'}ret="<span"+style+">";break;case D2L.Sml.SmlTokenType.Underline:ret='<span class="ds_d">';break;case D2L.Sml.SmlTokenType.Large:ret= '<span class="ds_e">';break;case D2L.Sml.SmlTokenType.Larger:ret='<span class="ds_f">';break;case D2L.Sml.SmlTokenType.Small:ret='<span class="ds_g">';break;case D2L.Sml.SmlTokenType.Smaller:ret='<span class="ds_h">';break;case D2L.Sml.SmlTokenType.Medium:ret='<span class="ds_m">';break;case D2L.Sml.SmlTokenType.Normal:ret='<span class="ds_i">';break;case D2L.Sml.SmlTokenType.Link:var tagValue=token.m_text.substr(5,token.m_text.length-5);var linkUrl="";var linkTitle="";var linkTarget="";var firstIndex= tagValue.indexOf(" ");if(firstIndex>=0){linkUrl=tagValue.substr(0,firstIndex).trim();var titleOrTarget;var afterFirstIndex=tagValue.substr(firstIndex,tagValue.length-firstIndex).trim();var secondIndex=afterFirstIndex.indexOf(" ");if(secondIndex>=0)titleOrTarget=afterFirstIndex.substr(0,secondIndex).trim();else titleOrTarget=afterFirstIndex.trim();if(titleOrTarget.toLowerCase()=="_top"||titleOrTarget.toLowerCase()=="_blank"||titleOrTarget.toLowerCase()=="_self"||titleOrTarget.toLowerCase()=="_parent"){linkTarget= titleOrTarget;linkTitle=afterFirstIndex.substr(titleOrTarget.length,afterFirstIndex.length-titleOrTarget.length).trim()}else linkTitle=afterFirstIndex}else linkUrl=tagValue.trim();if(linkUrl&&linkUrl.match(this._regexes.validUrl))linkUrl=' href="'+D2L.Util.Html.Encode(linkUrl)+'"';else linkUrl="";if(linkTitle.length>0)linkTitle=' title="'+D2L.Util.Html.Encode(linkTitle)+'"';if(linkTarget.length>0)linkTarget=' target="'+linkTarget+'"';var linkCssClass=daylightEnabled?"d2l-link":"vui-link d2l-link"; ret='<a class="'+linkCssClass+'"'+linkUrl+linkTarget+linkTitle+">";break}return ret},WriteCloseTag:function(token){var ret="";switch(token.m_type){case D2L.Sml.SmlTokenType.Abbr:ret="</abbr>";break;case D2L.Sml.SmlTokenType.Bold:ret="</strong>";break;case D2L.Sml.SmlTokenType.Italic:ret="</em>";break;case D2L.Sml.SmlTokenType.Help:ret="</a>";break;case D2L.Sml.SmlTokenType.Link:ret="</a>";break;default:ret="</span>";break}return ret},_regexes:{cssColours:new RegExp("^("+"#[a-z0-9]{3,8}"+"|(rgb|hsl)a?\\((\\s*[0-9]{1,3}\\.?[0-9]*%?\\s*,?){3,4}\\)"+ "|[a-z]+"+")$","i"),validUrl:new RegExp("^s*((mailto:|http://|https://|ftp://|rtsp://|news://|snews://|nntp://|//).*|^/(?!/).*|^(?!/)[^:/#\\\\]*(?:[/#\\\\].*)?)$")}});D2L.Sml.SmlProcessor.Mode={PlainText:0,Html:1};D2L.Sml.SmlToken=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_type=D2L.Sml.SmlTokenType.Text;this.m_isOpen=true;this.m_isContainer=true;this.m_text=""}}); D2L.Sml.SmlTokenizer=D2L.Class.extend({Construct:function(input){this.m_input=input?input:"";this.m_length=input?input.length:0;this.m_pos=0},GetText:function(start,end){var ret=this.m_input.substring(start,end);return ret.replace(/\\(\\|\[|\])/g,"$1")},GetToken:function(){var ret=new D2L.Sml.SmlToken;var returnstart=this.m_pos;var returnend=0;if(this.m_pos>=this.m_length)ret.m_type=D2L.Sml.SmlTokenType.EndOfInput;else if(this.m_input.charAt(this.m_pos)=="["){this.m_pos++;if(this.m_pos<this.m_length){if(this.m_input.charAt(this.m_pos)== "/"){ret.m_isOpen=false;this.m_pos++}var contentstart=this.m_pos;var openTags=1;while(this.m_pos<this.m_length)switch(this.m_input.charAt(this.m_pos)){case "[":openTags++;this.m_pos++;break;case "]":openTags--;if(openTags==0){ret.m_text=this.GetText(contentstart,this.m_pos);this.ParseTag(ret,ret.m_text);this.m_pos++;return ret}else{this.m_pos++;break}case "\\":this.m_pos+=2;break;default:this.m_pos++;break}}}else while(this.m_pos<this.m_length){var c=this.m_input.charAt(this.m_pos);if(c=="[")break; else if(c=="\\")this.m_pos+=2;else this.m_pos++}returnend=this.m_pos>this.m_length?this.m_length:this.m_pos;ret.m_text=this.GetText(returnstart,returnend);return ret},IsDone:function(){return this.m_pos>=this.m_input.length},ParseTag:function(token,tag){switch(tag.charAt(0)){case "b":if(tag=="b")token.m_type=D2L.Sml.SmlTokenType.Bold;else if(tag=="br"){token.m_type=D2L.Sml.SmlTokenType.Break;token.m_isContainer=false}break;case "h":if(tag.substring(0,4)=="help")token.m_type=D2L.Sml.SmlTokenType.Help; break;case "i":if(tag=="i")token.m_type=D2L.Sml.SmlTokenType.Italic;else if(tag=="info")token.m_type=D2L.Sml.SmlTokenType.Info;break;case "a":if(tag=="alert")token.m_type=D2L.Sml.SmlTokenType.Alert;else if(tag.substring(0,4)=="abbr")token.m_type=D2L.Sml.SmlTokenType.Abbr;break;case "l":if(tag=="light")token.m_type=D2L.Sml.SmlTokenType.Light;else if(tag=="large")token.m_type=D2L.Sml.SmlTokenType.Large;else if(tag=="larger")token.m_type=D2L.Sml.SmlTokenType.Larger;else if(tag.substring(0,4)=="link")token.m_type= D2L.Sml.SmlTokenType.Link;break;case "c":if(tag.substring(0,3)=="clr")token.m_type=D2L.Sml.SmlTokenType.Colour;break;case "u":if(tag=="u")token.m_type=D2L.Sml.SmlTokenType.Underline;break;case "s":if(tag=="small")token.m_type=D2L.Sml.SmlTokenType.Small;else if(tag=="smaller")token.m_type=D2L.Sml.SmlTokenType.Smaller;else if(tag.substring(0,2)=="sp"){token.m_type=D2L.Sml.SmlTokenType.Space;token.m_isContainer=false}break;case "n":if(tag=="normal")token.m_type=D2L.Sml.SmlTokenType.Normal;break;case "m":if(tag== "medium")token.m_type=D2L.Sml.SmlTokenType.Medium;break;default:token.m_type=D2L.Sml.SmlTokenType.Unknown;token.m_isContainer=false;break}}});D2L.Sml.SmlTokenType={Text:1,Bold:2,Italic:3,Underline:4,Light:5,Normal:6,Info:7,Alert:8,Break:9,Colour:10,Large:11,Larger:12,Small:13,Smaller:14,Space:15,Unknown:16,EndOfInput:17,Abbr:18,Medium:19,Help:20,Link:21};D2L.State={};D2L.State.StateScopeTypes={NoPersistence:0,OrgUnitSession:1,OrgUnitUser:2,User:3}; D2L.State.StateManager=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_stateScopes={};this.m_stateGroups=[];this.m_saveStateOnUnload=true;var me=this;UI.OnPageUnload().RegisterMethod(function(){me.SaveState()});UI.OnPageLoad().RegisterMethod(function(){var searchStateGroup=me.GetStateGroup("Search");if(searchStateGroup!==null)searchStateGroup.SetIsActive(false)})},DeserializeMin:function(deserializer){this.m_stateScopes=deserializer.GetDictionaryMin();this.m_stateGroups= deserializer.GetObjectArrayMin(D2L.State.StateGroup)},AddStateToNavInfo:function(navInfo){if(!navInfo.IgnoreState()){var state=this.GenerateState(true,true);navInfo.SetParam("d2l_stateScopes",state.Scopes);navInfo.SetParam("d2l_stateGroups",state.Groups);navInfo.SetParam("d2l_statePageId",UI.pageId);for(var stateGroup in state.State)navInfo.SetParam("d2l_state_"+stateGroup,state.State[stateGroup])}},AddStateToForm:function(){var state=this.GenerateState(true,true);var form=UI.GetForm();var CreateHidden= function(name,value,parent){var hdn=UI.GetById(name);if(!hdn){hdn=document.createElement("input");hdn.type="hidden";hdn.name=name;hdn.id=name;parent.appendChild(hdn)}hdn.value=value};CreateHidden("d2l_stateScopes",state.Scopes,form);CreateHidden("d2l_stateGroups",state.Groups,form);CreateHidden("d2l_statePageId",UI.pageId,form);for(var i=0;i<form.childNodes.length;i++)if(form.childNodes[i].name!==undefined&&form.childNodes[i].name.indexOf("d2l_state_")==0){D2L.Util.Dom.Purge(form.childNodes[i]);form.removeChild(form.childNodes[i])}for(var stateGroup in state.State)CreateHidden("d2l_state_"+ stateGroup,state.State[stateGroup],form)},CreateStateGroup:function(name){var stateGroup=this.GetStateGroup(name);if(stateGroup===null){stateGroup=new D2L.State.StateGroup(name);this.m_stateGroups.push(stateGroup)}return stateGroup},GetStateGroup:function(name){name=name.toLowerCase();for(var i=0;i<this.m_stateGroups.length;i++)if(this.m_stateGroups[i].GetName()==name)return this.m_stateGroups[i];return null},GenerateState:function(includeDbState,includePostState){var ret={Scopes:D2L.Serialization.JsonSerializer.Serialize(this.m_stateScopes), Groups:"",State:{}};var groups=[];for(var i=0;i<this.m_stateGroups.length;i++){var inDbScope=false;if(includeDbState)for(var scopeType in this.m_stateScopes){for(var j=0;j<this.m_stateScopes[scopeType].length;j++)if(this.m_stateScopes[scopeType][j]==this.m_stateGroups[i].GetName()){inDbScope=true;break}if(inDbScope)break}if(includeDbState&&inDbScope||includePostState){groups.push(this.m_stateGroups[i].GetName());ret.State[this.m_stateGroups[i].GetName()]=D2L.Serialization.JsonSerializer.Serialize(this.m_stateGroups[i])}}if(groups.length> 0)ret.Groups=D2L.Serialization.JsonSerializer.Serialize(groups);return ret},SaveState:function(){if(this.m_saveStateOnUnload){var state=this.GenerateState(true,false);if(state.Groups.length>0){var rpc;if(navigator.sendBeacon)rpc=D2L.Rpc.CreateBeacon("Save","/d2l/common/rpc/state/saveState.d2l");else rpc=D2L.Rpc.CreateSynchronous("Save","/d2l/common/rpc/state/saveState.d2l");rpc.SetIncludeState(state);rpc.Call()}}},SetSaveStateOnUnload:function(saveStateOnUnload){this.m_saveStateOnUnload=saveStateOnUnload}}); D2L.State.StateGroup=D2L.Class.extend({Construct:function(name){arguments.callee.$.Construct.call(this);if(name===undefined)name="";this.m_controls=[];this.m_isActive=true;this.m_isCleared=false;this.m_inactiveState="";this.m_name=name.toLowerCase()},DeserializeMin:function(deserializer){this.m_name=deserializer.GetMember().toLowerCase();this.m_controls=deserializer.GetObjectArrayMin(D2L.State.StateControlInfo)},Serialize:function(serializer){serializer.AddMember("Name",this.GetName());if(!this.m_isCleared)if(!this.IsActive())serializer.AddMember("Controls", this.m_inactiveState,undefined,true);else serializer.AddMember("Controls",this.m_controls)},Clear:function(){this.m_isCleared=true},GetName:function(){return this.m_name},IsActive:function(){return this.m_isActive},SetIsActive:function(isActive){if(isActive!=this.m_isActive){if(isActive)this.m_inactiveState="";else this.m_inactiveState=D2L.Serialization.JsonSerializer.Serialize(this.m_controls);this.m_isActive=isActive}}}); D2L.State.StateControlInfo=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.ControlId=null;this.Name="";this.StateType="";this.Key=""},DeserializeMin:function(deserializer){this.ControlId=deserializer.GetObjectMin(D2L.Control.Id);this.StateType=deserializer.GetMember();this.Key=deserializer.GetMember();if(deserializer.HasMember())this.Name=deserializer.GetMember()},Serialize:function(serializer){serializer.AddMember("ControlId",this.ControlId);serializer.AddMember("StateType", this.StateType);serializer.AddMember("Key",this.Key);if(this.Name.length>0)serializer.AddMember("Name",this.Name);var control=UI.GetControl(this.ControlId.ID(),this.ControlId.SID());if(control!==undefined&&control!==null&&control.GetState)serializer.AddMember("State",control,"GetState",false,this.StateType,this.Key)}});D2L.Style={}; D2L.Style.BorderInfo=D2L.Class.extend({Construct:function(style,colour,width){if(style===undefined)style=D2L.Style.BorderStyle.None;if(colour===undefined)colour="#000000";if(width===undefined)width=0;this.m_style=style;this.m_colour=colour;this.m_width=width},DeserializeMin:function(deserializer){this.m_style=deserializer.GetMember();this.m_colour=deserializer.GetMember();this.m_width=deserializer.GetMember()},GetColour:function(){return this.m_colour},GetStyle:function(){return this.m_style},GetWidth:function(){return this.m_width}, SetColour:function(colour){this.m_colour=colour},SetStyle:function(style){this.m_style=style},SetWidth:function(width){this.m_width=width},ToCss:function(){if(this.m_style==D2L.Style.BorderStyle.None||this.m_width<1||this.m_colour.length===0)return"none";else{var style="none";switch(this.m_style){case D2L.Style.BorderStyle.Hidden:style="hidden";break;case D2L.Style.BorderStyle.Dotted:style="dotted";break;case D2L.Style.BorderStyle.Dashed:style="dashed";break;case D2L.Style.BorderStyle.Solid:style= "solid";break;case D2L.Style.BorderStyle.Double:style="double";break;case D2L.Style.BorderStyle.Groove:style="groove";break;case D2L.Style.BorderStyle.Ridge:style="ridge";break;case D2L.Style.BorderStyle.Inset:style="inset";break;case D2L.Style.BorderStyle.Outset:style="outset";break;default:style="none"}return this.m_width+"px "+style+" "+this.m_colour}}});D2L.Style.FontFace={Arial:1,Courier:2,Georgia:3,Times:4,Trebuchet:5,Verdana:6,Comic:7,Tahoma:8,UserPreference:9}; D2L.Style.FontSize={XXLarge:5,XLarge:10,Large:20,Medium:30,Small:40,XSmall:50};D2L.Style.TextAlignment={Left:1,Middle:2,Right:3,Justify:4};D2L.Style.ImageRepeat={NoRepeat:1,RepeatY:2,RepeatX:3,RepeatBoth:4};D2L.Style.ImagePosition={TopLeft:1,Top:2,TopRight:3,Left:4,Center:5,Right:6,BottomLeft:7,Bottom:8,BottomRight:9};D2L.Style.BorderStyle={None:1,Hidden:2,Dotted:3,Dashed:4,Solid:5,Double:6,Groove:7,Ridge:8,Inset:9,Outset:10};D2L.Style.BorderWidth={Thin:1,Medium:2,Thick:3}; D2L.Style.PointFontSize={pt30:1,pt28:2,pt26:3,pt24:4,pt22:5,pt20:7,pt18:10,pt16:15,pt14:20,pt12:25,pt10:30,pt9:40,pt8:50};D2L.Style.Float={None:0,Left:1,Right:2};D2L.Style.AnimationMode={None:0,Slide:1,Fade:2};D2L.Style.WidthType={None:0,Em:1,Percent:2,Pixels:3};D2L.Animation={};D2L.Animation.Mode=D2L.Style.AnimationMode;D2L.Style.Measurement={}; D2L.Style.Measurement.Unit=D2L.Class.extend({Construct:function(unitType,value){arguments.callee.$.Construct.call(this);if(unitType===undefined)unitType=D2L.Style.Measurement.UnitType.Pixel;if(value===undefined)value=0;this.m_unitType=unitType;this.m_value=value;this.m_onChange=new D2L.EventHandler},Deserialize:function(deserializer){this.m_unitType=deserializer.GetMember("Type",D2L.Style.Measurement.UnitType.Pixel);this.m_value=deserializer.GetMember("Val",0)},DeserializeMin:function(deserializer){this.m_unitType= deserializer.GetMember();this.m_value=deserializer.GetMember()},Serialize:function(serializer){serializer.AddMember("Val",this.m_value);serializer.AddMember("Type",this.m_unitType)},GetUnitType:function(){return this.m_unitType},GetValue:function(){return this.m_value},OnChange:function(){return this.m_onChange},SetUnitType:function(unitType){if(unitType!==this.m_unitType){this.m_unitType=unitType;this.OnChange().Trigger()}},SetValue:function(value){if(value!==this.m_value){this.m_value=value;this.OnChange().Trigger()}}, ToCss:function(){var value="";var unit="";if(this.m_unitType==D2L.Style.Measurement.UnitType.Pixel){value=this.m_value.toString();unit="px"}else if(this.m_unitType==D2L.Style.Measurement.UnitType.Em){value=this.m_value.toString();unit="em"}else if(this.m_unitType==D2L.Style.Measurement.UnitType.Percentage){value=this.m_value.toString();unit="%"}else if(this.m_unitType==D2L.Style.Measurement.UnitType.Auto)unit="auto";return value+unit}}); D2L.Style.Measurement.UnitType={Pixel:0,Em:1,Percentage:2,Wildcard:3,Auto:4}; D2L.Style.Spacing=D2L.Class.extend({Construct:function(spacingType,defaultUnitType,defaultUnitValue){arguments.callee.$.Construct.call(this);if(spacingType===undefined)spacingType=D2L.Style.Spacing.Type.Padding;if(defaultUnitType===undefined)defaultUnitType=D2L.Style.Spacing.UnitType.Pixel;if(defaultUnitValue===undefined)defaultUnitValue=0;this.m_spacingType=spacingType;this.m_top=new D2L.Style.Spacing.Unit(defaultUnitType,defaultUnitValue);this.m_right=new D2L.Style.Spacing.Unit(defaultUnitType, defaultUnitValue);this.m_bottom=new D2L.Style.Spacing.Unit(defaultUnitType,defaultUnitValue);this.m_left=new D2L.Style.Spacing.Unit(defaultUnitType,defaultUnitValue);this.m_onChange=new D2L.EventHandler;this.m_ignoreChange=false;this.SetupOnChange()},Deserialize:function(deserializer){this.m_spacingType=deserializer.GetMember("Type",D2L.Style.Spacing.Type.Padding);this.m_top=deserializer.GetObject("Top",D2L.Style.Spacing.Unit);this.m_right=deserializer.GetObject("Right",D2L.Style.Spacing.Unit);this.m_bottom= deserializer.GetObject("Bottom",D2L.Style.Spacing.Unit);this.m_left=deserializer.GetObject("Left",D2L.Style.Spacing.Unit);this.SetupOnChange()},DeserializeMin:function(deserializer){this.m_spacingType=deserializer.GetMember();this.m_top=deserializer.GetObjectMin(D2L.Style.Spacing.Unit);this.m_right=deserializer.GetObjectMin(D2L.Style.Spacing.Unit);this.m_bottom=deserializer.GetObjectMin(D2L.Style.Spacing.Unit);this.m_left=deserializer.GetObjectMin(D2L.Style.Spacing.Unit);this.SetupOnChange()},Serialize:function(serializer){serializer.AddMember("Type", this.m_spacingType);serializer.AddMember("Top",this.m_top);serializer.AddMember("Right",this.m_right);serializer.AddMember("Bottom",this.m_bottom);serializer.AddMember("Left",this.m_left)},SetupOnChange:function(){var me=this;var HandleChange=function(){if(!me.m_ignoreChange)me.m_onChange.Trigger()};this.m_top.OnChange().RegisterMethod(HandleChange);this.m_right.OnChange().RegisterMethod(HandleChange);this.m_bottom.OnChange().RegisterMethod(HandleChange);this.m_left.OnChange().RegisterMethod(HandleChange)}, GetTop:function(){return this.m_top},GetRight:function(){return this.m_right},GetBottom:function(){return this.m_bottom},GetLeft:function(){return this.m_left},GetType:function(){return this.m_spacingType},OnChange:function(){return this.m_onChange},SetAllValues:function(val){this.m_ignoreChange=true;this.GetTop().SetValue(val);this.GetRight().SetValue(val);this.GetBottom().SetValue(val);this.GetLeft().SetValue(val);this.m_ignoreChange=false;this.OnChange().Trigger()},SetAllUnitTypes:function(unitType){this.m_ignoreChange= true;this.GetTop().SetUnitType(unitType);this.GetRight().SetUnitType(unitType);this.GetBottom().SetUnitType(unitType);this.GetLeft().SetUnitType(unitType);this.m_ignoreChange=false;this.OnChange().Trigger()},ToCss:function(){return this.m_top.ToCss()+" "+this.m_right.ToCss()+" "+this.m_bottom.ToCss()+" "+this.m_left.ToCss()},ApplyToDomNode:function(domNode){if(this.m_spacingType==D2L.Style.Spacing.Type.Spacing)domNode.style.margin=this.ToCss();else domNode.style.padding=this.ToCss()}}); D2L.Style.Spacing.Unit=D2L.Style.Measurement.Unit;D2L.Style.Spacing.UnitType=D2L.Style.Measurement.UnitType;D2L.Style.Spacing.Type={Spacing:0,Padding:1};D2L.Style.Utility={};D2L.Style.Utility.PixelToEm=function(base,pixel){var em=pixel/base;return Math.round(em*1E4)/1E4}; D2L.Style.Utility.TextAlignToCss=function(align){var style="left";if(align==D2L.Style.TextAlignment.Middle)style="center";else if(align==D2L.Style.TextAlignment.Right)style="right";else if(align==D2L.Style.TextAlignment.Justify)style="justify";return style}; D2L.Style.Utility.CssToTextAlign=function(style){var align=D2L.Style.TextAlignment.Left;if(style=="center")align=D2L.Style.TextAlignment.Middle;else if(style=="right")align=D2L.Style.TextAlignment.Right;else if(style=="justify")align=D2L.Style.TextAlignment.Justify;return align}; D2L.Style.Utility.ParseMeasurementUnit=function(sVal){sVal=sVal.toLowerCase();var unitValue;var unitType;var unitIndex;var tempUnitIndex=sVal.indexOf("%");if(tempUnitIndex>-1){unitType=D2L.Style.Measurement.UnitType.Percentage;unitIndex=tempUnitIndex}tempUnitIndex=sVal.indexOf("px");if(tempUnitIndex>-1){unitType=D2L.Style.Measurement.UnitType.Px;unitIndex=tempUnitIndex}tempUnitIndex=sVal.indexOf("em");if(tempUnitIndex>-1){unitType=D2L.Style.Measurement.UnitType.Em;unitIndex=tempUnitIndex}tempUnitIndex= sVal.indexOf("*");if(tempUnitIndex>-1){unitType=D2L.Style.Measurement.UnitType.Wildcard;unitIndex=tempUnitIndex}tempUnitIndex=sVal.indexOf("auto");if(tempUnitIndex>-1){unitType=D2L.Style.Measurement.UnitType.Auto;unitIndex=tempUnitIndex}if(unitIndex>-1){unitValue=sVal.substring(0,unitIndex);if(unitValue!="")unitValue=parseFloat(unitValue);else if(unitType==D2L.Style.Measurement.UnitType.Wildcard)unitValue=1}var mUnit=new D2L.Style.Measurement.Unit(unitType,unitValue);return mUnit};D2L.LP.Text={}; D2L.LP.Text.IText=D2L.Class.extend({Construct:function(val){if(val===undefined||val===null)val="";if(typeof val=="number")val=val.toString();arguments.callee.$.Construct.call(this);this.ClassName="D2L.LP.Text.IText";this.m_characterLimit=-1;this.m_value=val;this.m_cleanedValue=null;this.m_subject="";this.m_subjectTwo="";this.m_isHtml=false;this.m_isLangTerm=false;this.m_isTrusted=true;this.m_isLegacy=false;this.m_replace=[];for(var i=1;i<arguments.length;i++)this.m_replace.push(arguments[i])},AssignHtml:function(obj, attrName){this.GetHtml().Register(function(val){obj[attrName]=val})},AssignText:function(obj,attrName,doHtmlEncode){if(doHtmlEncode===undefined)doHtmlEncode=false;this.GetText().Register(function(val){if(doHtmlEncode)val=D2L.Util.Html.Encode(val);obj[attrName]=val})},DoReplacements:function(val,mode,doEncodeHtml){var dr=new D2L.Util.DelayedReturn;var me=this;var Replace=function(i){if(i<me.m_replace.length){var rtm="";if(Culture.IsRightToLeft())rtm="\u200f";if(me.m_replace[i]!==undefined&&me.m_replace[i]!== null&&me.m_replace[i].GetHtml)if(mode===D2L.Sml.SmlProcessor.Mode.Html)me.m_replace[i].GetHtml().Register(function(rep){val=val.replace("["+i+"]",rtm+rep);Replace(++i)});else me.m_replace[i].GetPlainText().Register(function(rep){val=val.replace("["+i+"]",rtm+rep);Replace(++i)});else{if(doEncodeHtml)val=val.replace("["+i+"]",rtm+D2L.Util.Html.Encode(me.m_replace[i]));else val=val.replace("["+i+"]",rtm+me.m_replace[i]);Replace(++i)}}else dr.Trigger(val)};Replace(0);return dr},GetValueHelper:function(mode, callback,doEncodeHtml){var dr=new D2L.Util.DelayedReturn;var me=this;var Finish=function(val){if(me.m_isLegacy){if(mode==D2L.Sml.SmlProcessor.Mode.PlainText)val=D2L.Util.Html.Decode(val)}else if(me.m_isTrusted&&val.indexOf("[")!=-1)val=UI.LanguageManager.SmlProcessor.Process(val,mode);else if(mode==D2L.Sml.SmlProcessor.Mode.Html&&!me.m_isHtml)val=D2L.Util.Html.Encode(val);else if(mode==D2L.Sml.SmlProcessor.Mode.PlainText&&me.m_isHtml)val=val.stripHtml();if(!me.m_isHtml&&me.m_characterLimit>-1){if(mode== D2L.Sml.SmlProcessor.Mode.Html)val=val.stripHtml();val=UI.GetCulture().LimitChars(val,me.m_characterLimit)}var ReturnResult=function(result){if(me.m_isLangTerm&&me.m_replace.length==0&&UI.GetD2LTextCacheManager().Get(me,mode)===null)UI.GetD2LTextCacheManager().Add(me,mode,result);if(me.m_isTrusted){if(me.m_subject.length>0){if(result.indexOf("{subject}")!=-1)result=result.replace("{subject}",me.m_subject);if(result.indexOf("{subjectone}")!=-1)result=result.replace("{subjectone}",me.m_subject)}if(me.m_subjectTwo.length> 0&&result.indexOf("{subjecttwo}")!=-1)result=result.replace("{subjecttwo}",me.m_subjectTwo);result=result.replace("{subject}","");result=result.replace("{subjectone}","");result=result.replace("{subjecttwo}","")}dr.Trigger(result);if(callback!==undefined)callback.call(callback,result)};if(me.m_isTrusted&&me.m_replace.length>0)me.DoReplacements(val,mode,!doEncodeHtml).Register(function(repVal){ReturnResult(repVal)});else ReturnResult(val)};if(this.m_isLangTerm)if(this.m_value!==undefined)Finish(this.m_value); else UI.LanguageManager.GetTerm(this.m_name).Register(function(val){me.m_value=val;Finish(val)});else if(this.m_isHtml)if(this.m_cleanedValue!==null)Finish(this.m_cleanedValue);else D2L.LP.Text.HtmlText.Filter(this.m_value).Register(function(val){me.m_cleanedValue=val.m_cleanedValue;Finish(val.m_cleanedValue)});else Finish(this.m_value);return dr},GetHtml:function(){var cacheResult=UI.GetD2LTextCacheManager().Get(this,D2L.Sml.SmlProcessor.Mode.Html);if(cacheResult===null)return this.GetValueHelper(D2L.Sml.SmlProcessor.Mode.Html, undefined,false);else return new D2L.Util.DelayedReturn(cacheResult)},GetPlainText:function(callback){var cacheResult=UI.GetD2LTextCacheManager().Get(this,D2L.Sml.SmlProcessor.Mode.PlainText);if(cacheResult===null)return this.GetValueHelper(D2L.Sml.SmlProcessor.Mode.PlainText,callback,true);else{if(callback!==undefined)callback.call(callback,cacheResult);return new D2L.Util.DelayedReturn(cacheResult)}},GetSubject:function(){return this.m_subject},GetSubjectTwo:function(){return this.m_subject},GetText:function(callback){return this.GetPlainText(callback)}, Deserialize:function(deserializer){this.m_isHtml=deserializer.GetMember("IsHtml",false);this.m_isTrusted=deserializer.GetMember("IsTrusted",true);this.m_isLangTerm=deserializer.GetMember("IsLangTerm",false);this.m_name=deserializer.GetMember("TermName","");this.m_value=deserializer.GetMember("Value","");if(this.m_isHtml)this.m_cleanedValue=this.m_value;this.m_subject=deserializer.GetMember("Subject","");this.m_replace=deserializer.GetMember("Replace",[])},DeserializeMin:function(deserializer){this.m_isHtml= deserializer.GetBoolean();this.m_isTrusted=deserializer.GetBoolean();this.m_isLangTerm=deserializer.GetBoolean();this.m_value=deserializer.GetMember();if(this.m_isHtml)this.m_cleanedValue=this.m_value;this.m_subject=deserializer.GetMember();this.m_replace=deserializer.GetMember()},Serialize:function(serializer){serializer.AddMember("ClassName",this.ClassName);serializer.AddMember("IsHtml",this.m_isHtml);serializer.AddMember("IsTrusted",this.m_isTrusted);serializer.AddMember("IsLangTerm",this.m_isLangTerm); if(this.m_isLangTerm)serializer.AddMember("Value",this.m_name);else serializer.AddMember("Value",this.m_value);serializer.AddMember("Subject",this.GetSubject());serializer.AddMember("Replace",this.m_replace)},SetCharacterLimit:function(numChars){this.m_characterLimit=numChars},SetReplace:function(){this.m_replace=[];for(var i=0;i<arguments.length;i++)this.m_replace.push(arguments[i])},SetSubject:function(subject){this.m_subject=subject},SetSubjectTwo:function(subjectTwo){this.m_subjectTwo=subjectTwo}}); D2L.LP.Text.IText.Normalize=function(text,objectName,methodName,paramName){if(text!==undefined&&text!==null){if(typeof text=="number")text=text.toString();if(typeof text=="string"){if(objectName!==undefined)UI.GetMessageArea().AddWarningMessage(new D2L.LP.Text.SmlText("[0].[1]() expects parameter "+'"[2]" to be of type D2L.LP.Text.IText.',objectName,methodName,paramName),true);var itext=new D2L.LP.Text.IText(text);itext.m_isLegacy=true;return itext}}else return new D2L.LP.Text.PlainText("");return text}; D2L.Text=D2L.LP.Text.IText; D2L.LP.Text.Cache=D2L.Class.extend({Construct:function(val){arguments.callee.$.Construct.call(this);this.m_cacheArray=[];this.m_cacheMaxSize=100},Add:function(textObj,mode,cValue){var cacheToken=new D2L.LP.Text.CacheToken(textObj,mode,cValue);if(this.m_cacheArray.length<this.m_cacheMaxSize)this.m_cacheArray.push(cacheToken)},Get:function(textObj,mode){for(var i=0;i<this.m_cacheArray.length;i++){var cacheToken=this.m_cacheArray[i];if(cacheToken.GetTextObject().m_isLangTerm==textObj.m_isLangTerm&&cacheToken.GetMode()== mode)if(textObj.m_isLangTerm&&textObj.m_name!==undefined&&cacheToken.GetTextObject().m_name===textObj.m_name)if(cacheToken.GetTextObject().m_replace.length==textObj.m_replace.length){var replaceMatches=true;for(var j=0;j<cacheToken.GetTextObject().m_replace.length;j++)if(cacheToken.GetTextObject().m_replace[j]!=textObj.m_replace[j]){replaceMatches=false;break}if(replaceMatches){var cachedVal=cacheToken.GetCachedValue();if(textObj.m_subject.length>0)cachedVal=cachedVal.replace("{subject}",textObj.m_subject); else cachedVal=cachedVal.replace("{subject}","");return cachedVal}}}return null}});D2L.LP.Text.CacheToken=D2L.Class.extend({Construct:function(textObj,mode,cValue){arguments.callee.$.Construct.call(this);this.m_textObj=textObj;this.m_mode=mode;this.m_cachedValue=cValue},GetMode:function(){return this.m_mode},GetTextObject:function(){return this.m_textObj},GetCachedValue:function(){return this.m_cachedValue}}); D2L.LP.Text.HtmlText=D2L.LP.Text.IText.extend({Construct:function(value,doFilter){if(doFilter==undefined)doFilter=true;arguments.callee.$.Construct.call(this,value);this.m_isTrusted=false;this.m_isHtml=true;if(!doFilter)this.m_cleanedValue=value}}); D2L.LP.Text.HtmlText.Filter=function(val){var result=new D2L.Util.DelayedReturn;var HandleRpc=function(rpcResponse){if(rpcResponse.GetType()==D2L.Rpc.ResponseType.Success)result.Trigger(rpcResponse.GetResult(D2L.LP.Text.HtmlText));else result.Trigger(new D2L.LP.Text.HtmlText(""))};D2L.Rpc.Create("Filter",HandleRpc,"/d2l/common/rpc/text/text.d2l").Call(val);return result}; D2L.LP.Text.LangTerm=D2L.LP.Text.IText.extend({Construct:function(termName){arguments.callee.$.Construct.call(this,undefined);this.m_name=termName.toLowerCase();this.m_isLangTerm=true;this.m_value=undefined;for(var i=1;i<arguments.length;i++)this.m_replace.push(arguments[i])}});D2L.LP.Text.LangTerm.AssignHtml=function(name,obj,attrName){var term=new D2L.LP.Text.LangTerm(name);term.AssignHtml(obj,attrName)}; D2L.LP.Text.LangTerm.AssignText=function(name,obj,attrName,doHtmlEncode){var term=new D2L.LP.Text.LangTerm(name);term.AssignText(obj,attrName,doHtmlEncode)};D2L.Language.Term=D2L.LP.Text.LangTerm;D2L.LP.Text.PlainText=D2L.LP.Text.IText.extend({Construct:function(value){arguments.callee.$.Construct.call(this,value);this.m_isTrusted=false}});D2L.LP.Text.SmlText=D2L.LP.Text.IText.extend({Construct:function(value){arguments.callee.$.Construct.call(this,value);for(var i=1;i<arguments.length;i++)this.m_replace.push(arguments[i])}}); D2L_Control_ActionButtons_Navigate=function(item){var itemKey=typeof item==="string"?item:item.GetKey();if(itemKey==null||itemKey.indexOf(";")==-1)return;var location=itemKey.substr(itemKey.indexOf(";")+1);if(location.length==0)return;var ni=new D2L.NavInfo;ni.SetNavigation(location);Nav.Go(ni)}; D2L.Control.Band=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_text=null},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);this.m_text=new D2L.LP.Text.PlainText(YAHOO.util.Dom.getFirstChild(this.GetDomNode()).innerHTML)},SetText:function(text){if(text){this.m_text=D2L.LP.Text.IText.Normalize(text,"D2L.Control.Band","SetText","text");if(this.GetDomNode()&&YAHOO.util.Dom.getFirstChild(this.GetDomNode())){var me= this;this.m_text.GetText().Register(function(val){if(val.length>0)if(YAHOO.util.Dom.getFirstChild(me.GetDomNode()).firstChild)YAHOO.util.Dom.getFirstChild(me.GetDomNode()).firstChild.nodeValue=val;else YAHOO.util.Dom.getFirstChild(me.GetDomNode()).appendChild(me.CreateTextNode(val))})}}}});D2L.Control.Behaviour={}; D2L.Control.Behaviour.GetContainer=function(control){var container=control.CreateElement("div");container.className="dbvr";if(UI.GetBrowserInfo().Type==D2L.UI.BrowserType.IE)container.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=50)";else container.style.opacity="0.5";container.style.left=D2L.Util.Dom.FindPosX(control.IDomNode)+"px";container.style.top=D2L.Util.Dom.FindPosY(control.IDomNode)+"px";container.style.width=control.IDomNode.offsetWidth+"px";container.style.height=control.IDomNode.offsetHeight+ "px";container.style.zIndex=control.GetWindow()["UI"].GetZIndex();control.GetWindow()["UI"].GetById("d2l_body").appendChild(container);return container}; D2L.Control.Behaviour.Drag=function(evt,control){var theW=control.GetWindow();var theUI=theW["UI"];var cursorStartX=theUI.GetCursorX(theW,evt);var cursorStartY=theUI.GetCursorY(theW,evt);var nodeStartL=control.GetPosX();var nodeStartT=control.GetPosY();var newL=nodeStartL;var newT=nodeStartT;var minX=0;var maxX=Math.max(theUI.GetPageWidth(theW),theUI.GetWindowWidth(theW))-control.GetWidth()-10;var minY=0;var maxY=Math.max(theUI.GetPageHeight(theW),theUI.GetWindowHeight(theW))-control.GetHeight()- 10;var container=D2L.Control.Behaviour.GetContainer(control);container.style.cursor="move";control.SetPos(control.GetWidth()*-1-100,control.GetHeight()*-1-100);var start=function(evt){var newX=theUI.GetCursorX(theW,evt);var newY=theUI.GetCursorY(theW,evt);newL=nodeStartL+newX-cursorStartX;newT=nodeStartT+newY-cursorStartY;if(newL<=minX)newL=minX;if(newL>maxX)newL=maxX;if(newT<=minY)newT=minY;if(newT>maxY)newT=maxY;container.style.left=newL+"px";container.style.top=newT+"px";if(theW.event){theW.event.cancelBubble= true;theW.event.returnValue=false}else evt.preventDefault()};var stop=function(evt){D2L.Util.Dom.Purge(container);container.parentNode.removeChild(container);control.SetPos(newL,newT);if(theW.document.detachEvent){theW.document.detachEvent("onmousemove",start);theW.document.detachEvent("onmouseup",stop)}else if(theW.document.removeEventListener){theW.document.removeEventListener("mousemove",start,true);theW.document.removeEventListener("mouseup",stop,true)}};if(theW.document.attachEvent){theW.document.attachEvent("onmousemove", start);theW.document.attachEvent("onmouseup",stop);theW.event.cancelBubble=true;theW.event.returnValue=false}else if(theW.document.addEventListener){theW.document.addEventListener("mousemove",start,true);theW.document.addEventListener("mouseup",stop,true);evt.preventDefault()}};D2L.Control.Behaviour.Drag.Install=function(control,domNode){control.AttachObject(domNode,"onmousedown",function(e){control.GetWindow()["D2L"].Control.Behaviour.Drag(e,control)})}; D2L.Control.Behaviour.Drag.InstallMvc=function(dialogNode,nodeWin,win,titleNode,closeNode){var dragSettings=new D2L.LP.Web.UI.Html.DragDrop.DraggableSettings;dragSettings.SetHandle(titleNode);dragSettings.SetIsDelayed(false);dragSettings.SetDragDropEffect(D2L.LP.Web.UI.Html.DragDrop.DragDropEffect.Move);if(closeNode)dragSettings.AddHandleException(closeNode);dragSettings.SetGhostType(D2L.LP.Web.UI.Html.DragDrop.GhostType.OriginalShadow);dragSettings.SetIsAutoScroll(false);D2L.LP.Web.UI.Html.DragDrop.MakeDraggableNode(dialogNode, dragSettings,nodeWin,win)}; D2L.Control.Behaviour.Resize=function(evt,control,minWidth,minHeight){var theW=control.GetWindow();var theUI=theW["UI"];var cursorStartX=theUI.GetCursorX(theW,evt);var cursorStartY=theUI.GetCursorY(theW,evt);var startW=control.GetWidth();var startH=control.GetHeight();var startX=control.GetPosX();var startY=control.GetPosY();var newW=startW;var newH=startH;var maxWidth=theUI.GetScrollLeft()+theUI.GetWindowWidth()-control.GetPosX();var maxHeight=theUI.GetScrollTop()+theUI.GetWindowHeight()-control.GetPosY(); if(Culture.IsRightToLeft())maxWidth=control.GetPosX()+startW;var container=D2L.Control.Behaviour.GetContainer(control);if(Culture.IsRightToLeft()){container.style.cursor="ne-resize";container.style.left=startX+"px"}else container.style.cursor="nw-resize";control.SetPos(control.GetWidth()*-1-100,control.GetHeight()*-1-100);var start=function(evt){var newX=theUI.GetCursorX(theW,evt);var newY=theUI.GetCursorY(theW,evt);if(Culture.IsRightToLeft()){newW=startW-newX+cursorStartX;if(newW>maxWidth)newW=maxWidth; if(newW<minWidth)newW=minWidth;newH=startH+(newY-cursorStartY);if(newH>maxHeight)newH=maxHeight;if(newH<minHeight)newH=minHeight;container.style.left=startX-(newW-startW)+"px"}else{newW=startW+newX-cursorStartX;if(newW>maxWidth)newW=maxWidth;if(newW<minWidth)newW=minWidth;newH=startH+(newY-cursorStartY);if(newH>maxHeight)newH=maxHeight;if(newH<minHeight)newH=minHeight}container.style.width=newW+"px";container.style.height=newH+"px";if(theW.event){theW.event.cancelBubble=true;theW.event.returnValue= false}else evt.preventDefault()};var stop=function(evt){D2L.Util.Dom.Purge(container);container.parentNode.removeChild(container);control.SetSize(newW,newH);if(Culture.IsRightToLeft())control.SetPos(startX-(newW-startW),startY);else control.SetPos(startX,startY);if(theW.document.detachEvent){theW.document.detachEvent("onmousemove",start);theW.document.detachEvent("onmouseup",stop)}else if(theW.document.removeEventListener){theW.document.removeEventListener("mousemove",start,true);theW.document.removeEventListener("mouseup", stop,true)}};if(theW.document.attachEvent){theW.document.attachEvent("onmousemove",start);theW.document.attachEvent("onmouseup",stop);theW.event.cancelBubble=true;theW.event.returnValue=false}else if(theW.document.addEventListener){theW.document.addEventListener("mousemove",start,true);theW.document.addEventListener("mouseup",stop,true);evt.preventDefault()}}; D2L.Control.Behaviour.Resize.Install=function(control,domNode,minWidth,minHeight){control.AttachObject(domNode,"onmousedown",function(e){control.GetWindow()["D2L"].Control.Behaviour.Resize(e,control,minWidth,minHeight)})}; D2L.Control.Behaviour.Resize.InstallMvc=function(that,dialogNode,resizeImg,nodeWin,win){var settings={Handle:resizeImg,DisplayType:"none",GhostType:D2L.LP.Web.UI.Html.DragDrop.GhostType.OriginalShadow};var evt=D2L.LP.Web.UI.Html.DragDrop.MakeResizeableNode(dialogNode,settings,nodeWin,win);evt.AddListener(function(size){that.SetSize(size.width,size.height,true)})}; D2L.Control.Checkbox=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_isChecked=false;this.m_isEnabled=true;this.m_value="True";this.m_text=null;this.m_showText=true;this.m_textLabel=null;this.m_fieldName="";this.m_onClick=function(){};var me=this;this.OnDomInsertion.RegisterMethod(function(){me.SetText(me.GetText())})},BuildDom:function(){if(!this.IsRendered()){arguments.callee.$.BuildDom.call(this);if(this.m_text===null)UI.GetMessageArea().AddWarningMessage(new D2L.LP.Text.PlainText("Checkbox control missing "+ "associated label. Use SetText() and SetShowText()."),true);this.SetDomNode(this.CreateElement("input"));this.AttachObject(this.IDomNode,"ID2L",this);this.GetDomNode().id=this.GetMappedId();if(this.GetFieldName().length>0)this.GetDomNode().name=this.GetFieldName();else this.GetDomNode().name=this.GetMappedId();this.GetDomNode().type="checkbox";this.GetDomNode().className="d2l-checkbox";var me=this;this.AttachObject(this.GetDomNode(),"onclick",function(evt){if(me.IsEnabled())me.m_onClick.call(me); D2L.Util.Dom.CancelBubble(evt)});this.SetValue(this.m_value);this.SetIsChecked(this.m_isChecked);this.SetIsEnabled(this.IsEnabled());this.SetText(this.GetText())}},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);var hasText=deserializer.GetBoolean();this.m_showText=deserializer.GetBoolean();if(deserializer.HasMember())this.GetDomNode().ID2L=null;if(hasText)if(this.m_showText){this.m_textLabel=this.GetDomNode().nextSibling;this.m_text=new D2L.LP.Text.PlainText(this.m_textLabel.innerHTML)}else this.m_text= new D2L.LP.Text.PlainText(this.GetDomNode().title);this.m_isChecked=this.GetDomNode().checked;this.m_isEnabled=!this.GetDomNode().disabled;this.m_value=this.GetDomNode().value},Focus:function(){if(this.IsRendered())this.GetDomNode().focus()},GetFieldName:function(){return this.m_fieldName},GetMultiEditValue:function(){return this.IsChecked()?"1":"0"},GetText:function(){return this.m_text},GetValue:function(){if(this.IsRendered())return this.GetDomNode().value;else return this.m_value},GetState:function(serializer){serializer.AddMember("IsChecked", this.IsChecked());serializer.AddMember("Val",this.GetValue())},IsChecked:function(){if(this.IsRendered())return this.GetDomNode().checked;else return this.m_isChecked},IsEnabled:function(){return this.m_isEnabled},SetFieldName:function(fieldName){this.m_fieldName=fieldName},SetIsChecked:function(isChecked){this.m_isChecked=isChecked;if(this.IsRendered())this.GetDomNode().checked=isChecked},SetIsEnabled:function(isEnabled){this.m_isEnabled=isEnabled;if(this.IsRendered()){if(this.m_textLabel!==null)this.m_textLabel.className= this.m_isEnabled?"":"d2l-checkbox-disabled";this.GetDomNode().disabled=!this.m_isEnabled}},SetOnClick:function(onClick){this.m_onClick=onClick},SetShowText:function(showText){if(showText!=this.m_showText&&this.IsRendered()){if(this.m_textLabel!==null){D2L.Util.Dom.Purge(this.m_textLabel);this.m_textLabel.parentNode.removeChild(this.m_textLabel);this.m_textLabel=null}this.GetDomNode().title=""}this.m_showText=showText;this.SetText(this.GetText())},SetText:function(text){this.m_text=text;if(this.IsRendered()&& this.m_text!==null)if(this.ShowText()){if(this.m_textLabel===null&&this.GetDomNode().parentNode){this.m_textLabel=this.CreateElement("label");this.m_textLabel.className=this.m_isEnabled?"":"d2l-checkbox-disabled";this.m_textLabel.htmlFor=this.GetMappedId();if(this.GetDomNode().nextSibling)this.GetDomNode().parentNode.insertBefore(this.m_textLabel,this.GetDomNode().nextSibling);else this.GetDomNode().parentNode.appendChild(this.m_textLabel)}else if(this.m_textLabel!==null)while(this.m_textLabel.childNodes.length> 0)this.m_textLabel.removeChild(this.m_textLabel.firstChild);if(this.m_textLabel!==null)this.m_textLabel.appendChild(this.CreateTextNode(this.m_text))}else this.m_text.AssignText(this.GetDomNode(),"title")},SetValue:function(value){this.m_value=value;if(this.IsRendered())this.GetDomNode().value=value},ShowText:function(){return this.m_showText}}); D2L.Control.ClearFloat=D2L.Control.extend({Construct:function(text){arguments.callee.$.Construct.call(this)},BuildDom:function(){if(this.IsRendered())return;var domNode=this.SetDomNode(this.GetUI().CreateElement("div"));domNode.className="clear d2l-clear"}}); D2L.Control.ContextMenuItemList=D2L.Control.Container.Floating.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_domDrop=null;this.m_isRendered=false;this.m_openerNode=null;this.m_dropdownMenu=null;this.m_childMenuExists=false;this.m_hasUpperBoundary=false;this.m_align="";this.SetHasAutoHide(true);this.SetAnimationMode(D2L.Style.AnimationMode.Slide)},Deserialize:function(deserializer){var items=deserializer.GetObjectArray("Items",D2L.Control.ContextMenuItem);for(var i=0;i< items.length;i++)this.AppendChild(items[i])},DeserializeMin:function(deserializer){var items=deserializer.GetObjectArrayMin(D2L.Control.ContextMenuItem);for(var i=0;i<items.length;i++)items[i].IntegrateChild(this)},GetParent:function(){var parent=this;while(parent.Parent()!==null)parent=parent.Parent();return parent},IntegrateControl:function(deserializer){},IntegrateControlMin:function(deserializer){this.DeserializeMin(deserializer)},Show:function(insertAfter,keypress,hasUpperBoundary,align){this.m_openerNode= insertAfter;this.m_hasUpperBoundary=hasUpperBoundary;this.m_align=align;if(this.m_dropdownMenu&&this.m_dropdownMenu.opened){this.m_dropdownMenu.close();return}var contextMenuId=UI.GetUniqueHtmlId();this.BuildDom_Helper(insertAfter,contextMenuId);this.m_childMenuExists=insertAfter.querySelector("d2l-dropdown-menu")!==null;if(!this.m_childMenuExists)this.CreateDropdownMenu(this.m_contextMenuId,insertAfter);var self=this;setTimeout(function(){self.m_dropdownMenu.open(keypress);self.SetLeft(self.m_dropdownMenu, insertAfter)})},CreateDropdownMenu:function(contextMenuId,opener){this.m_dropdownMenu=this.CreateElement("d2l-dropdown-menu");this.m_dropdownMenu.setAttribute("no-pointer","true");this.m_dropdownMenu.setAttribute("min-width","190");this.m_dropdownMenu.setAttribute("max-width","370");this.m_dropdownMenu.setAttribute("vertical-offset","12");this.m_dropdownMenu.setAttribute("class","d2l-dropdown-menu-contextmenu");if(this.m_align)this.m_dropdownMenu.setAttribute("align",this.m_align);if(this.m_hasUpperBoundary)this.m_dropdownMenu.setAttribute("boundary", JSON.stringify({"above":0}));this.m_dropdownMenu.appendChild(this.m_domDrop);opener.appendChild(this.m_dropdownMenu)},GetTableByClass:function(tableClass,dropdownMenu){var table=D2L.LP.Web.UI.Html.Dom.GetAncestorElementsByClassName(tableClass,dropdownMenu);if(!table||table.length===0)return null;return table[0]},GetAncestorBoundingClientRect:function(dropdownMenu){var offsetParent=dropdownMenu.offsetParent;if(offsetParent&&offsetParent.tagName!=="BODY")return offsetParent.getBoundingClientRect(); var gridWrapperTable=this.GetTableByClass("d2l-grid-wrapper",dropdownMenu);var legacyTable=this.GetTableByClass("d_dg_resp",dropdownMenu);if(gridWrapperTable)return gridWrapperTable.getBoundingClientRect();else if(legacyTable)return legacyTable.parentNode.getBoundingClientRect();else if(offsetParent)return offsetParent.getBoundingClientRect();else return null},SetLeft:function(dropdownMenu,opener){var self=this;requestAnimationFrame(function(){var tableBoundingRect=self.GetAncestorBoundingClientRect(dropdownMenu); if(!tableBoundingRect)return;var openerBoundingRect=opener.getBoundingClientRect();var leftValue=getComputedStyle(document.body).direction==="rtl"?openerBoundingRect.right-tableBoundingRect.left:openerBoundingRect.left-tableBoundingRect.left;requestAnimationFrame(function(){dropdownMenu.style.left=leftValue+"px"})})},SetTop:function(){var self=this;requestAnimationFrame(function(){var openerBoundingRect=self.m_openerNode.getBoundingClientRect();var bottomValue=openerBoundingRect.bottom;requestAnimationFrame(function(){self.m_dropdownMenu.style.top= bottomValue+"px"})})},BuildDom_Helper:function(parent,contextMenuId){if(this.m_childMenuExists)return;this.m_contextMenuId=contextMenuId;this.m_domDrop=this.CreateElement("d2l-menu");this.m_domDrop.id=contextMenuId;this.m_domDrop.setAttribute("label",this.m_openerNode.getAttribute("text"));this.m_domDrop.addEventListener("d2l-menu-item-select",function(e){e.target.onSelect()});for(var i=0;i<this.Children().length;i++){if(i>0&&this.Children().length>i&&this.Children()[i-1].HasSeparator())this.Children()[i- 1].SetShowSeparator(true);this.BuildDom_Item(this.Children()[i])}this.m_isRendered=true},BuildDom_Item:function(item,parent){parent=parent||this.m_domDrop;var li=this.CreateElement("d2l-menu-item");li.setAttribute("id",UI.GetUniqueHtmlId());if(!item.IsEnabled())li.setAttribute("disabled","true");if(!item.ItemIsDisplayed())li.setAttribute("hidden","true");if(item.Children().length>0){var submenu=this.CreateElement("d2l-menu");for(var i=0;i<item.Children().length;i++){this.BuildDom_Item(item.Children()[i], submenu);item.m_isRendered=true;item.m_domDrop=submenu;item.m_openerNode=this.m_openerNode}li.appendChild(submenu)}var me=this;li.onSelect=function(){me.ClickItem(item)};var renderEnabled=function(isEnabled){li.disabled=!isEnabled};var renderVisibility=function(IsDisplayed){if(IsDisplayed)li.removeAttribute("hidden");else li.setAttribute("hidden","true")};var renderText=function(text){text.GetText().Register(function(val){li.setAttribute("text",val)})};renderText(item.m_text);item.ItemIsDisplayedChangeEvent().RegisterMethod(function(isDisplayed){renderVisibility(isDisplayed)}); item.TextChangeEvent().RegisterMethod(function(text){renderText(text)});item.IsEnabledChangeEvent().RegisterMethod(function(isEnabled){renderEnabled(isEnabled)});parent.appendChild(li);if(item.HasSeparator()){var domSeparator=this.CreateElement("d2l-menu-item-separator");if(!item.m_showSeparator)domSeparator.style.display="none";parent.appendChild(domSeparator)}},AddItem:function(item){this.AppendChild(item);if(this.m_isRendered==true)this.BuildDom_Item(item,this.m_domDrop)},AddItemAtIndex:function(item, index){this.m_children.splice(index,0,item);if(this.m_isRendered){this.BuildDom_Item(item,this.m_domDrop);var child1=this.m_domDrop.childNodes[this.Children().length+1];var child2=this.m_domDrop.childNodes[index];this.m_domDrop.insertBefore(child1,child2)}},AddSeparator:function(){if(this.Children().length>0)this.Children()[this.Children().length-1].SetHasSeparator(true)},GetItem:function(key){for(var i=0;i<this.Children().length;i++)if(this.Children()[i].GetKey()==key)return this.Children()[i];return null}, GetItemIndex:function(item){for(var i=0;i<this.Children().length;i++)if(this.Children()[i]==item)return i;return-1},ClickItemIndex:function(index){if(index>-1){var item=this.Children()[index];this.ClickItem(item)}},ClickItem:function(item){item.ClickEvent().Trigger(item);var parent=this.GetParent();parent.SelectItemEvent().Trigger(item)},RemoveItem:function(item){var index=this.GetItemIndex(item);if(item&&index>=0){this.Children().splice(index,1);if(this.m_isRendered==true){var child=this.m_domDrop.childNodes[index]; this.m_domDrop.removeChild(child)}}}}); D2L.Control.ContextMenu=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_structure=null;this.m_placeHolder=null},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);var structureId=deserializer.GetObjectMin(D2L.Control.Id);var placeHolderId=deserializer.GetObjectMin(D2L.Control.Id);this.m_structure=UI.GetControl(structureId.ID(),structureId.SID());this.m_placeHolder=UI.GetControl(placeHolderId.ID(),placeHolderId.SID())}, AppendChild:function(child){return this.m_structure.AppendChild(child)},Expand:function(){},Collapse:function(){},IsExpanded:function(){return false},SetAlt:function(alt){this.m_placeHolder.SetAlt(alt)},SetSubject:function(subject){this.m_placeHolder.SetSubject(new D2L.LP.Text.PlainText(subject))}}); D2L.Control.ContextMenuItem=D2L.Control.ContextMenuItemList.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_hasSeparator=false;this.m_text=null;this.m_onClick=function(){};this.m_navInfo=null;this.m_showSeparator=false;this.m_itemIsDisplayed=true;this.m_isEnabled=true;this.m_key="";this.m_structure=null;this.m_itemIsDisplayedChangeEvent=new D2L.EventHandler;this.m_isEnabledChangeEvent=new D2L.EventHandler;this.m_textChangeEvent=new D2L.EventHandler;this.m_clickEvent=new D2L.EventHandler; var me=this;this.ClickEvent().RegisterMethod(function(){me.m_onClick.call(me)})},ClickEvent:function(){return this.m_clickEvent},DeserializeMin:function(deserializer){arguments.callee.$.DeserializeMin.call(this,deserializer);this.m_key=deserializer.GetMember();this.m_itemIsDisplayed=deserializer.GetBoolean();this.m_isEnabled=deserializer.GetBoolean();this.m_hasSeparator=deserializer.GetBoolean();this.m_text=deserializer.GetObjectMin(D2L.LP.Text.IText);if(this.Children().length===0)this.m_onClick= new Function(deserializer.GetMember())},Deserialize:function(deserializer){arguments.callee.$.Deserialize.call(this,deserializer);this.m_key=deserializer.GetMember("Key");this.m_itemIsDisplayed=deserializer.GetMember("IsDisplayed");this.m_isEnabled=deserializer.GetMember("IsEnabled");this.m_hasSeparator=deserializer.GetMember("HasSeparator");this.m_text=deserializer.GetObject("Text",D2L.LP.Text.IText);if(deserializer.HasMember("OnClick"))this.m_onClick=new Function(deserializer.GetMember("OnClick"))}, GetKey:function(){return this.m_key},GetStructure:function(){if(this.m_structure===null){var parent=this;while(parent.Parent()!==null)parent=parent.Parent();this.m_structure=parent}return this.m_structure},GetText:function(){return this.m_text},HasSeparator:function(){return this.m_hasSeparator},ItemIsDisplayed:function(){return this.m_itemIsDisplayed},ItemIsDisplayedChangeEvent:function(){return this.m_itemIsDisplayedChangeEvent},IsEnabled:function(){return this.m_isEnabled},IsEnabledChangeEvent:function(){return this.m_isEnabledChangeEvent}, SetKey:function(key){this.m_key=key},SetItemIsDisplayed:function(itemIsDisplayed){if(itemIsDisplayed==this.m_itemIsDisplayed)return;this.m_itemIsDisplayed=itemIsDisplayed;this.ItemIsDisplayedChangeEvent().Trigger(itemIsDisplayed)},SetIsEnabled:function(isEnabled){if(isEnabled==this.IsEnabled())return;this.m_isEnabled=isEnabled;this.IsEnabledChangeEvent().Trigger(isEnabled)},SetOnClick:function(onClick){if(onClick){if(this.m_navInfo===null)this.m_navInfo=new D2L.NavInfo;this.m_navInfo.SetOnClick(onClick); this.SetNav(this.m_navInfo)}},SetNav:function(navInfo){if(navInfo){this.m_navInfo=navInfo;var navStruct=this.m_navInfo.SetupHrefOnClick(this,false);this.m_onClick=navStruct.OnClick}},SetHasSeparator:function(hasSeparator){this.m_hasSeparator=hasSeparator},SetShowSeparator:function(showSeparator){this.m_showSeparator=showSeparator},SetText:function(text){this.m_text=text;this.TextChangeEvent().Trigger(text)},TextChangeEvent:function(){return this.m_textChangeEvent}}); D2L.Control.ContextMenuPlaceHolder=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_text=null;this.m_alt=null;this.m_hoverEvent=new D2L.EventHandler;this.m_subject=null;this.m_hasText=false;this.m_hasImage=false;this.m_img=null;this.m_imgDrop=null;this.m_posDomNode=null;this.m_structure=null;this.m_key="";this.m_float=D2L.Style.Float.None;this.m_params=new D2L.Util.Dictionary;this.m_showEvent=new D2L.EventHandler;this.m_text=null;this.m_subtle=false},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this, deserializer);var structureId=deserializer.GetObjectMin(D2L.Control.Id);this.SetStructure(UI.GetControl(structureId.ID(),structureId.SID()));var me=this;this.m_hasText=deserializer.GetBoolean();this.m_hasImage=deserializer.GetBoolean();this.m_key=deserializer.GetMember();this.m_float=deserializer.GetMember();this.m_params=deserializer.GetObject(D2L.Util.Dictionary);var onShow=deserializer.GetMember();this.m_subtle=deserializer.GetBoolean();if(onShow.length>0&&window[onShow]!==undefined)this.ShowEvent().RegisterMethod(function(){window[onShow].call(onShow, me)});var domNode=this.GetDomNode();if(domNode===null){this.m_hasDomBeenBuilt=false;return}this.m_imgDrop=this.GetDomNode().childNodes[this.GetDomNode().childNodes.length-1];if(this.m_hasImage)this.m_img=this.GetDomNode().firstChild},BuildDom:function(){if(this.IsRendered())return;arguments.callee.$.BuildDom.call(this);var domNode=this.SetDomNode(this.GetUI().CreateElement("d2l-dropdown"));domNode.setAttribute("no-auto-open",true);var opener;if(this.m_text!==null)if(this.m_subtle){opener=this.CreateElement("d2l-button-subtle"); opener.setAttribute("icon-right",true);opener.setAttribute("icon","d2l-tier1:chevron-down");this.m_text.AssignText(opener,"text",true)}else{opener=this.CreateElement("d2l-button");var span=this.CreateElement("span");span.setAttribute("class","d2l-buttonmenu-text");this.m_text.AssignText(span,"innerHTML",true);var icon=this.CreateElement("d2l-icon");icon.setAttribute("icon","d2l-tier1:chevron-down");icon.setAttribute("class","d2l-buttonmenu-dropdown-icon");opener.appendChild(span);opener.appendChild(icon)}else{domNode.classList.add("d2l-contextmenu-ph-dropdown"); opener=this.CreateElement("d2l-button-icon");opener.setAttribute("icon","d2l-tier1:chevron-down")}opener.setAttribute("class","d2l-dropdown-opener");domNode.appendChild(opener);var closeFunction=function(e){var dropdownMenuContent=domNode.querySelector("d2l-dropdown-menu");if(dropdownMenuContent)domNode.removeChild(dropdownMenuContent)};domNode.addEventListener("d2l-dropdown-close",closeFunction);this.RenderFloat();this.RenderAlt();var me=this;D2L.Control.ContextMenuPlaceHolder.InstallEvents(domNode, function(){return me})},Click:function(){if(this.m_structure===null)return;this.GetDomNode().toggleOpen()},Focus:function(){if(this.IsRendered())try{this.GetDomNode().focus()}catch(e){}},GetFloat:function(){return this.m_float},GetKey:function(){return this.m_key},GetParam:function(name,defaultValue){var result=this.m_params.Get(name);if(result===undefined)result=defaultValue;return result},GetStructure:function(){return this.m_structure},GetText:function(){return this.m_text},HasParam:function(name){return this.m_params.ContainsKey(name)}, RenderAlt:function(){if(!this.IsRendered())return;var alt=this.m_alt;if(alt===null)alt=new D2L.LP.Text.LangTerm("Framework.ContextMenu.altDefaultTitleSubject");var me=this;var DoAssign=function(){alt.AssignText(me.GetDomNode(),"title");if(me.m_imgDrop)alt.AssignText(me.m_imgDrop,"alt")};if(this.m_subject!==null)this.m_subject.GetText().Register(function(subject){alt.SetSubject(subject);DoAssign()});else DoAssign()},RenderFloat:function(){if(!this.IsRendered())return;var f="none";if(this.GetFloat()== D2L.Style.Float.Left)f="left";else if(this.GetFloat()==D2L.Style.Float.Right)f="right";this.GetDomNode().style.cssFloat=f},SetParam:function(name,value){this.m_params.Add(name,value)},SetStructure:function(structure){this.m_structure=structure},SetText:function(text){this.m_text=text},SetIsSubtle:function(isSubtle){this.m_subtle=isSubtle},Show:function(keypress){if(this.m_structure===null)return;var dr=new D2L.Util.DelayedReturn;var me=this;var dr2=this.m_structure.Show(this,this.GetDomNode(),keypress); dr2.Register(function(){me.ShowEvent().Trigger(me);dr.Trigger()});return dr},ShowEvent:function(){return this.m_showEvent},SetAlt:function(alt){this.m_alt=alt;this.RenderAlt()},SetFloat:function(floatVal){this.m_float=floatVal;this.RenderFloat()},SetKey:function(key){this.m_key=key},SetSubject:function(subject){this.m_subject=D2L.LP.Text.IText.Normalize(subject);this.RenderAlt()}}); D2L.Control.ContextMenuPlaceHolder.InstallEvents=function(domNode,GetControl){if(!domNode)return;var isStructureDisplayed=false;UI.GetWindowEventManager().HideContextMenus.RegisterMethod(function(evt){if(isStructureDisplayed)GetControl().Click()});var openFunction=function(evt){var keypress=evt.type==="keypress"?true:false;GetControl().Show(keypress)};var opener=domNode.querySelector(".d2l-dropdown-opener");if(opener){opener.addEventListener("mouseup",openFunction);opener.addEventListener("keypress", openFunction)}else{domNode.addEventListener("mouseup",openFunction);domNode.addEventListener("keypress",openFunction)}}; D2L.Control.ContextMenuStructure=D2L.Control.ContextMenuItemList.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_opener=null;this.m_loadCallback=null;this.m_isLoaded=true;this.m_key="";this.m_selectItemEvent=new D2L.EventHandler;this.m_hasUpperBoundary=false;this.m_align=""},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);var loadCallback=deserializer.GetMember();if(loadCallback.length>0&&window[loadCallback]!== undefined)this.SetLoadCallback(window[loadCallback]);this.m_key=deserializer.GetMember();var onSelectItem=deserializer.GetMember();if(onSelectItem.length>0&&window[onSelectItem]!==undefined)this.SelectItemEvent().RegisterMethod(function(item){window[onSelectItem](item)});this.m_hasUpperBoundary=deserializer.GetBoolean();this.m_align=deserializer.GetMember()},GetOpener:function(){return this.m_opener},GetKey:function(){return this.m_key},SelectItemEvent:function(){return this.m_selectItemEvent},SetKey:function(key){this.m_key= key},SetLoadCallback:function(callback){this.m_loadCallback=callback;this.m_isLoaded=false},Show:function(opener,insertAfter,keypress){var dr=new D2L.Util.DelayedReturn;this.m_opener=opener;if(this.m_isLoaded){arguments.callee.$.Show.call(this,insertAfter,keypress,this.m_hasUpperBoundary,this.m_align);dr.Trigger()}else{var me=this;var args=arguments;var result=this.m_loadCallback(this);if(result!==undefined)result.Register(function(items){for(var i=0;i<items.length;i++)me.AppendChild(items[i]);me.m_isLoaded= true;me.Show(opener,insertAfter,keypress,this.m_hasUpperBoundary,this.m_align);dr.Trigger()});else{me.m_isLoaded=true;dr=me.Show(opener,insertAfter,keypress,this.m_hasUpperBoundary,this.m_align)}}return dr}}); D2L.Control.DateRange=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_isEnabled=true;this.sd=null;this.ed=null;this.cb_sd=null;this.cb_ed=null;this.cb_se=null;this.cb_ih=null;this.m_validationFailureSource=0},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);this.sd=UI.GetControl(this.GetMappedId()+"_dts_sd");this.ed=UI.GetControl(this.GetMappedId()+"_dts_ed");this.cb_sd=UI.GetControl(this.GetMappedId()+ "_cb_sd");this.cb_ed=UI.GetControl(this.GetMappedId()+"_cb_ed");this.cb_se=UI.GetControl(this.GetMappedId()+"_cb_se");this.cb_ih=UI.GetControl(this.GetMappedId()+"_cb_ih")},HasTime:function(){return this.sd.HasTime()},Focus:function(){if(this.m_validationFailureSource==0||this.m_validationFailureSource==1)this.sd.Focus();else if(this.m_validationFailureSource==2)this.ed.Focus()},GetValidationBalloonDomNode:function(){if(this.m_validationFailureSource==0||this.m_validationFailureSource==1)return this.sd.GetDomNode(); else if(this.m_validationFailureSource==2)return this.ed.GetDomNode()},GetStartDate:function(){if(this.HasStartDate())return this.sd.GetDate();else return null},GetStartDateSelector:function(){return this.sd},GetStartYear:function(){return this.sd.GetYear()},GetStartMonth:function(){return this.sd.GetMonth()},GetStartDay:function(){return this.sd.GetDay()},GetStartHour:function(){return this.sd.GetHour()},GetStartMinute:function(){return this.sd.GetMinute()},GetEndYear:function(){return this.ed.GetYear()}, GetEndMonth:function(){return this.ed.GetMonth()},GetEndDay:function(){return this.ed.GetDay()},GetEndHour:function(){return this.ed.GetHour()},GetEndMinute:function(){return this.ed.GetMinute()},GetEndDate:function(){if(this.HasEndDate())return this.ed.GetDate();else return null},GetEndDateSelector:function(){return this.ed},HasStartDate:function(){if(this.cb_sd!==null)return this.cb_sd.IsChecked();return true},HasEndDate:function(){if(this.cb_ed!==null)return this.cb_ed.IsChecked();return true}, IsScheduleEventCreated:function(){if(this.cb_se!=null)return this.cb_se.IsChecked();else return false},HasEvent:function(){return this.IsScheduleEventCreated()},IsHidden:function(){if(this.cb_ih)return this.cb_ih.IsChecked();else return false},GetState:function(serializer){serializer.AddMember("HasStartDate",this.HasStartDate());serializer.AddMember("HasEndDate",this.HasEndDate());serializer.AddMember("HasEvent",this.IsScheduleEventCreated());serializer.AddMember("IsHidden",this.IsHidden());serializer.AddMember("StartDate", this.GetStartDateSelector(),"GetState");serializer.AddMember("EndDate",this.GetEndDateSelector(),"GetState")},SetHasStartDate:function(hasStartDate){if(this.HasStartDate()!=hasStartDate&&this.cb_sd!==null){this.cb_sd.SetIsChecked(hasStartDate);this.cb_sd.GetDomNode().IEnabler.ResetState()}},SetHasEndDate:function(hasEndDate){if(this.HasEndDate()!=hasEndDate&&this.cb_ed!==null){this.cb_ed.SetIsChecked(hasEndDate);this.cb_ed.GetDomNode().IEnabler.ResetState()}}});D2L.DateRange=D2L.Control.DateRange; var d2l_DateRange=D2L.Control.DateRange; D2L.DateTime=D2L.Class.extend({Construct:function(dateString){arguments.callee.$.Construct.call(this);this.m_date=new Date;if(dateString)this.SetDateString(dateString)},SetDateString:function(dateString){this.SetMonth(0);this.SetDay(1);this.SetYear(parseInt(substr(0,4)));this.SetMonth(parseInt(substr(4,2)));this.SetDay(parseInt(substr(6,2)));this.SetHour(parseInt(substr(8,2)));this.SetMinute(parseInt(substr(10,2)))},GetDateString:function(){var ret;ret=this.GetYear();ret+=this.PadInt(this.GetMonth(), 2);ret+=this.PadInt(this.GetDay(),2);ret+=this.PadInt(this.GetHour(),2);ret+=this.PadInt(this.GetMinute(),2);return ret},PadInt:function(val,digits){var ret=val.toString();while(ret.length<digits)ret="0"+ret;return ret},GetYear:function(){return this.m_date.getFullYear()},SetYear:function(year){this.m_date.setFullYear(year)},GetMonth:function(){return this.m_date.getMonth()},SetMonth:function(month){this.m_date.setMonth(month)},GetDay:function(){return this.m_date.getDate()},SetDay:function(day){this.m_date.setDate(day)}, GetHour:function(){return this.m_date.getHours()},SetHour:function(hour){this.m_date.setHours(hour)},GetMinute:function(){return this.m_date.getMinutes()},SetMinute:function(minute){this.m_date.setMinutes(minute)},GetTimestamp:function(){return this.m_date.getTime()}}); D2L.Control.DateTimeSelector=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_isEnabled=true;this.m_type=null;this.m_inputDate=null;this.m_onChangeEvent=new D2L.EventHandler;this.m_isTimeOnly=true;this.m_name=""},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);this.m_name=deserializer.GetMember();this.name=this.m_name;var node;if(this.m_name!="")node=UI.GetByName(this.m_name);else node=this.GetDomNode(); this.SetDomNode(node);if(D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-datetime-selector-date-input",node)){this.m_isTimeOnly=false;this.m_inputDate=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-datetime-selector-date-input",node)}var me=this.m_isTimeOnly?D2L.LP.Web.UI.Desktop.Controls.TimeSelector:D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector;var id=new D2L.LP.Web.UI.Html.AbsoluteHtmlId(node.id);var nodes=me.GetNodes(id);this.m_isEnabled=me.IsEnabledNodes(nodes);if(this.m_isTimeOnly)this.m_type= D2L.Control.DateTimeSelector.Type.TimeOnly;else if(me.GetHasTimeNodes(nodes))this.m_type=D2L.Control.DateTimeSelector.Type.DateTime;else this.m_type=D2L.Control.DateTimeSelector.Type.DateOnly},GetMultiEditValue:function(){var padInt=function(val,digits){var padIntRet=val.toString();while(padIntRet.length<digits)padIntRet="0"+padIntRet;return padIntRet};var ret="0001-01-01T00:00:00";if(this.IsEnabled()){ret=this.GetYear()?this.GetYear():"0001";ret+="-";ret+=this.GetMonth()?padInt(this.GetMonth(),2): "01";ret+="-";ret+=this.GetDay()?padInt(this.GetDay(),2):"01";ret+="T";if(this.GetHour()!==null)ret+=padInt(this.GetHour(),2);else ret+="00";ret+=":";ret+=this.GetMinute()?padInt(this.GetMinute(),2):"00";ret+=":00"}return ret},GetState:function(serializer){var dt=new Date;var year=this.GetYear();if(year===null)year=dt.getFullYear();var month=this.GetMonth();if(month===null)month=dt.getMonth()+1;var day=this.GetDay();if(day===null)day=dt.getDay();var hour=this.GetHour();if(hour===null)hour=-1;var minute= this.GetMinute();if(minute===null)minute=-1;serializer.AddMember("Year",year);serializer.AddMember("Month",month);serializer.AddMember("Day",day);serializer.AddMember("Hour",hour);serializer.AddMember("Minute",minute)},Serialize:function(serializer){serializer.AddMember("Type",this.m_type);this.GetState(serializer)},GetNodes:function(){var node=this.GetDomNode();var id=new D2L.LP.Web.UI.Html.AbsoluteHtmlId(node.id);var nodes;if(this.m_isTimeOnly)nodes=D2L.LP.Web.UI.Desktop.Controls.TimeSelector.GetNodes(id); else nodes=D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector.GetNodes(id);return nodes},Focus:function(){this.GetNodes().edit.focus()},HasTime:function(){if(this.m_isTimeOnly)return true;var nodes=this.GetNodes();return D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector.GetHasTimeNodes(nodes)},GetDate:function(){var dts;var nodes=this.GetNodes();if(this.m_isTimeOnly)dts=null;else{dts=D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector.GetSelectedDateTimeNodes(nodes);dts=D2L.Util.DateTime.ConvertToD2LDateTime(dts)}return dts}, GetDay:function(){if(!this.m_isTimeOnly){var nodes=this.GetNodes();return D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector.GetSelectedDateTimeNodes(nodes).m_day}return null},GetHour:function(){var nodes=this.GetNodes();if(!this.m_isTimeOnly)return D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector.GetSelectedDateTimeNodes(nodes).m_hour;return D2L.LP.Web.UI.Desktop.Controls.TimeSelector.GetTimeNodes(nodes).m_hour},GetHour24:function(){UI.GetMessageArea().AddWarningMessage(new D2L.LP.Text.PlainText("DateTimeSelector.GetHour24() is "+ "obsolete. Use GetHour() instead."),true);return this.GetHour()},GetMinute:function(){var nodes=this.GetNodes();if(!this.m_isTimeOnly)return D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector.GetSelectedDateTimeNodes(nodes).m_minute;return D2L.LP.Web.UI.Desktop.Controls.TimeSelector.GetTimeNodes(nodes).m_minute},GetMonth:function(){if(!this.m_isTimeOnly){var nodes=this.GetNodes();return D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector.GetSelectedDateTimeNodes(nodes).m_month}return null},GetYear:function(){if(!this.m_isTimeOnly){var nodes= this.GetNodes();return D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector.GetSelectedDateTimeNodes(nodes).m_year}return null},IsDateValid:function(){if(!this.m_isTimeOnly){var dts=this.GetDate();return D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector.IsValidDate(dts.m_year,dts.m_month,dts.m_day)}return null},IsEnabled:function(){return this.m_isEnabled},IsTimeOnly:function(){return this.m_isTimeOnly},Now:function(leaveTimeAlone){var now=D2L.Util.DateTime.Now();var adjustedNow=new D2L.LocalDateTime(now.GetYear(), now.GetMonth()-1,now.GetDay(),now.GetHour(),now.GetMinute(),0);this.SetDate(adjustedNow,leaveTimeAlone)},SetDate:function(dt,leaveTimeAlone){var localDt=D2L.Util.DateTime.ConvertToLocalDateTime(dt);if(leaveTimeAlone===undefined)leaveTimeAlone=false;if(this.m_isTimeOnly)if(leaveTimeAlone)return;else{this.SetHour(localDt.GetHour());this.SetMinute(localDt.GetMinute());return}var nodes=this.GetNodes();if(leaveTimeAlone){var dts=new D2L.LocalDateTime(localDt.GetYear(),localDt.GetMonth()+1,localDt.GetDay(), this.GetHour(),this.GetMinute(),0);D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector.SetSelectedDateTimeByNode(nodes,dts)}else{localDt.m_month+=1;D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector.SetSelectedDateTimeByNode(nodes,localDt)}},SetHour:function(hour){var dt;var nodes=this.GetNodes();if(this.m_isTimeOnly){dt=new D2L.LocalTime(hour,this.GetMinute());D2L.LP.Web.UI.Desktop.Controls.TimeSelector.SetTimeNodes(nodes,dt)}else{dt=new D2L.LocalDateTime(this.GetYear(),this.GetMonth(),this.GetDay(),hour, this.GetMinute(),0);D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector.SetSelectedDateTimeByNode(nodes,dt)}},SetHour24:function(hour){UI.GetMessageArea().AddWarningMessage(new D2L.LP.Text.PlainText("DateTimeSelector.SetHour24() is "+"obsolete. Use SetHour() instead."),true);this.SetHour(hour)},SetMinute:function(min){var dt;var nodes=this.GetNodes();if(this.m_isTimeOnly){dt=new D2L.LocalTime(this.GetHour(),min);D2L.LP.Web.UI.Desktop.Controls.TimeSelector.SetTimeNodes(nodes,dt)}else{dt=new D2L.LocalDateTime(this.GetYear(), this.GetMonth(),this.GetDay(),this.GetHour(),min,0);D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector.SetSelectedDateTimeByNode(nodes,dt)}},SetIsEnabled:function(isEnabled){this.m_isEnabled=isEnabled;var nodes=this.GetNodes();if(this.m_isTimeOnly)D2L.LP.Web.UI.Desktop.Controls.TimeSelector.SetIsEnabledNodes(nodes,isEnabled);else D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector.SetIsEnabledNodes(nodes,isEnabled)},OnChangeEvent:function(){return this.m_onChangeEvent}}); D2L.Control.DateTimeSelector.Type={DateTime:1,DateOnly:2,TimeOnly:3}; D2L.DialogBase=D2L.Control.extend({Construct:function(name,callback){arguments.callee.$.Construct.call(this,true);if(name!==undefined)try{var oldDialog=UI.GetByName(name);if(oldDialog!=null&&oldDialog!=this){if(oldDialog.IsShown())D2L.Dialog.BC(name,D2L.Dialog.ResponseType.Abort);oldDialog.Close()}}catch(e){}if(name===undefined||!name.isString){UI.GetMessageArea().AddWarningMessage(new D2L.LP.Text.PlainText("Dialogs should always have a name"),true);name=UI.GetUniqueHtmlId()}if(!UI.IsValidJsVariableName(name))UI.GetMessageArea().AddWarningMessage(new D2L.LP.Text.SmlText('Dialog Name "[0]" is not a valid '+ "JavaScript name. Names can only contain letters, numbers "+"and underscore and must start with a letter",name),true);if(callback===undefined)callback=function(dr){dr.GetDialog().Close()};this.m_topOffset=10;this.m_bottomOffset=10;this.m_maxDialogHeight=UI.GetWindowHeight(window)*0.8;this.m_buttons=[];this.m_buttonTable=null;this.m_buttonTableOffset=0;this.m_callback=null;this.m_callbackArguments=[];this.m_closeIconResponseType=D2L.Dialog.ResponseType.Abort;this.m_footerText=new D2L.LP.Text.PlainText(""); this.m_footerTextNode=null;this.m_height=null;this.m_icon=null;this.m_iconTerm=null;this.m_iframe=null;this.m_iframeWindow=null;this.m_ignoreMaxMinSizeOnResize=false;this.m_isLoaded=false;this.m_isShown=false;this.m_minHeight=200;this.m_minWidth=200;this.m_name=name;this.m_positiveButton=null;this.m_src="";this.m_srcCallbackName="";this.m_srcParams=[];this.m_srcWindow=null;this.m_title=new D2L.LP.Text.LangTerm("Standard.Misc.txtLoading");this.m_titleIsSet=false;this.m_width=400;this.m_opener=undefined; this.OnOpen=new D2L.EventHandler;this.OnResize=new D2L.EventHandler;this.m_firstLoadEvent=new D2L.LP.Web.UI.Events.Event;this.SetCallback(callback)},BuildDom_Buttons:function(){this.m_buttonTable=this.CreateElement("table");if(UI.GetBrowserInfo().Type==D2L.UI.BrowserType.Safari||UI.GetBrowserInfo().Type==D2L.UI.BrowserType.Chrome)this.m_buttonTable.style.width="auto";var className=D2L.LP.Web.UI.Daylight.IsEnabled()?"d2l-dialog-buttons":"ddial_b";this.m_buttonTable.className=className;this.m_buttonTable.style.display= this.m_buttons.length>0?"block":"none";this.m_buttonTable.style.marginLeft=this.m_buttonTableOffset.toString()+"px";this.m_buttonTable.style.marginRight=this.m_buttonTableOffset.toString()+"px";var r=this.m_buttonTable.insertRow(-1);var c1=this.CreateCell(r);var c2=this.CreateCell(r);c2.align="center";c2.width="100%";var c3=this.CreateCell(r);c3.align="right";for(var i=0;i<this.m_buttons.length;i++){this.m_buttons[i].b.m_hasDomBeenBuilt=false;this.m_buttons[i].b.AppendTo(r.cells[this.m_buttons[i].p])}}, BuildDom_Frame:function(){var me=this;var name=this.GetWindow()["UI"].GetUniqueHtmlId();loadingSpinner(me);if(D2L.LP.Web.UI.Daylight.IsEnabled())constructIFrameDaylight(me);else oldIframeConstruction(me,name);var loadedOnce=false;var onIFrameLoad=function(){if(!loadedOnce){loadedOnce=true;me.m_firstLoadEvent.Trigger();return}me.m_iframeWindow=me.m_iframe.contentWindow;var doLoad=false;try{if(me.m_iframeWindow&&me.m_iframeWindow.location.href.indexOf("/d2l/tools/blank.html")==-1)doLoad=true}catch(e){doLoad= false}var resizeFrame=function(){me.FitContents()};if(D2L.Util.Url.IsExternal(me.m_src)||doLoad){me.HandleOnload();setTimeout(resizeFrame,0)}};if(this.m_iframe.attachEvent)this.m_iframe.attachEvent("onload",onIFrameLoad);else if(this.m_iframe.addEventListener)this.m_iframe.addEventListener("load",onIFrameLoad,false);this.m_iframeOnloadFunc=onIFrameLoad;this.GetTitle().AssignText(this.m_iframe,"title");function loadingSpinner(dialog){if(!D2L.LP.Web.UI.Daylight.IsEnabled()){dialog.m_loading=dialog.CreateElement("div"); dialog.m_loading.className="ddial_l";var img=dialog.CreateElement("img");img.src="/d2l/img/LP/dialog/loading.gif";dialog.m_loading.appendChild(img);dialog.m_loading.appendChild(dialog.CreateTextNode(new D2L.LP.Text.LangTerm("Standard.Misc.txtLoading")))}else{dialog.m_loading=dialog.CreateElement("div");dialog.m_loading.className="d2l-dialog-loading-spinner";var loadingSpinner=dialog.CreateElement("d2l-loading-spinner");loadingSpinner.setAttribute("size","120");dialog.m_loading.appendChild(loadingSpinner)}dialog.IChildrenDomNode.appendChild(dialog.m_loading)} function constructIFrameDaylight(dialog){dialog.m_iframe=dialog.CreateElement("iframe");dialog.m_iframe.frameBorder=0;dialog.m_iframe.src="/d2l/tools/blank.html";dialog.m_iframe.scrolling="no";dialog.m_iframe.classList.add("ddial_c_frame");dialog.IChildrenDomNode.appendChild(dialog.m_iframe);dialog.m_iframe.name=name}function oldIframeConstruction(dialog,name){var is_iOS=navigator.userAgent.match(/iphone|ipad|ipod/i);if(dialog.IChildrenDomNode.insertAdjacentHTML){var iframeHtml="<iframe name='"+name+ "' style='width:1px;height:1px;border:none;' border='0' frameborder='0' src='/d2l/tools/blank.html'></iframe>";if(is_iOS){dialog.IChildrenDomNode.insertAdjacentHTML("beforeEnd","<div style='height: 100%; overflow: auto; -webkit-overflow-scrolling:touch;'>"+iframeHtml+"</div>");dialog.m_iframe=dialog.IChildrenDomNode.childNodes[dialog.IChildrenDomNode.childNodes.length-1].firstChild}else{dialog.IChildrenDomNode.insertAdjacentHTML("beforeEnd",iframeHtml);dialog.m_iframe=dialog.IChildrenDomNode.childNodes[dialog.IChildrenDomNode.childNodes.length- 1]}}else{dialog.m_iframe=dialog.CreateElement("iframe");dialog.m_iframe.name=name;dialog.m_iframe.style.width="1px";dialog.m_iframe.style.height="1px";dialog.m_iframe.border=0;dialog.m_iframe.frameBorder=0;dialog.m_iframe.style.border="none";dialog.m_iframe.src="/d2l/tools/blank.html";if(is_iOS){var iframeWrapper=dialog.CreateElement("div");iframeWrapper.style.webkitOverflowScrolling="touch";iframeWrapper.style.overflow="auto";iframeWrapper.style.height="100%";iframeWrapper.appendChild(dialog.m_iframe); dialog.IChildrenDomNode.appendChild(iframeWrapper)}else dialog.IChildrenDomNode.appendChild(dialog.m_iframe)}}},SetButtonTableOffset:function(offset){this.m_buttonTableOffset=offset},AddPrimaryButton:function(type,responseParam,name){if(responseParam===undefined)responseParam="";return this.AddButtonHelper(D2L.Control.Button.GetTermForType(type),D2L.Dialog.ButtonPosition.Left,type,this.GetResponseTypeFromButtonType(type),responseParam,name,true)},AddSecondaryButton:function(type,responseParam,name){if(responseParam=== undefined)responseParam="";return this.AddButtonHelper(D2L.Control.Button.GetTermForType(type),D2L.Dialog.ButtonPosition.Left,type,this.GetResponseTypeFromButtonType(type),responseParam,name,false)},AddButton:function(type,responseParam,name,isPrimary){if(responseParam===undefined)responseParam="";if(isPrimary===undefined)isPrimary=false;var position;if(type==D2L.Control.Button.Type.Close||type==D2L.Control.Button.Type.Cancel)position=D2L.Dialog.ButtonPosition.Left;else if(type==D2L.Control.Button.Type.Ok)position= D2L.Dialog.ButtonPosition.Middle;else position=D2L.Dialog.ButtonPosition.Right;var responseType=this.GetResponseTypeFromButtonType(type);return this.AddButtonHelper(D2L.Control.Button.GetTermForType(type),position,type,responseType,responseParam,name,isPrimary)},AddCustomButton:function(text,position,responseType,responseParam,id,isPrimary){return this.AddButtonHelper(text,position,D2L.Control.Button.Type.Custom,responseType,responseParam,id,isPrimary)},GetResponseTypeFromButtonType:function(type){if(type== D2L.Control.Button.Type.Cancel||type==D2L.Control.Button.Type.Close)return D2L.Dialog.ResponseType.Abort;else if(type==D2L.Control.Button.Type.No)return D2L.Dialog.ResponseType.Negative;else return D2L.Dialog.ResponseType.Positive},AddButtonHelper:function(text,position,type,responseType,responseParam,id,isPrimary){var b=this.GetButton(id);if(b!==null)this.RemoveButton(b);text=D2L.LP.Text.IText.Normalize(text,"D2L.DialogBase","AddButtonHelper","text");if(position===undefined)position=D2L.Dialog.ButtonPosition.Left; if(responseType===undefined)responseType=D2L.Dialog.ResponseType.Positive;if(responseParam===undefined)responseParam="";if(isPrimary===undefined)isPrimary=false;var dialog=this;var button=new D2L.Control.Button(text);button.SetIsPrimary(isPrimary);button.SetOnClick(function(){D2L.Dialog.BC(dialog.m_name,responseType,type,responseParam)});if(id!==undefined)button.SetControlId(id);if(responseType==D2L.Dialog.ResponseType.Positive&&this.m_positiveButton===null)this.m_positiveButton=button;this.m_buttons.push({"p":position, "b":button,"t":type,"d":false});if(this.m_hasDomBeenBuilt){button.AppendTo(this.m_buttonTable.rows[0].cells[position]);if(this.m_buttons.length==1){this.m_buttonTable.style.display="block";this.SetHeight(this.m_height)}}return button},CallCallback:function(response){if(this.IsClosed()&&response!=null&&response.GetType()!=D2L.Dialog.ResponseType.Abort)UI.GetMessageArea().AddWarningMessage(new D2L.LP.Text.PlainText("Calling CallCallback on a closed "+"dialog can cause unexpected errors in IE. Please make sure "+ "you are closing the dialog inside your outer callback "+"function instead of SrcCallback."),true);var cb=this.GetCallback();var ret=response;if(cb){var cbRet=cb.apply(cb,[response].concat(this.m_callbackArguments));if(cbRet!==undefined)ret=cbRet}if(this.m_delayedReturn)this.m_delayedReturn.Trigger(ret)},CallSrcMethod:function(methodName,val){if(this.m_srcWindow&&!this.m_srcWindow.closed&&this.m_srcWindow[methodName])return this.m_srcWindow[methodName](val);else return null},Close:function(){},FitContents:function(){if(this.m_fitted== true)return;var iframe=this.m_iframe;var iframeBody=null;try{iframeBody=iframe.contentWindow.document.body}catch(e){}if(iframeBody===null)return;var topOffset=this.m_topOffset;var bottomOffset=this.m_bottomOffset;var frameContentsHeight=iframeBody.offsetHeight;var heightDiff=parseInt(this.IDomNode.offsetHeight,10)-parseInt(this.GetContentHeight(),10);var currentHeight=this.m_height;var heightToAdd=frameContentsHeight+heightDiff+topOffset+bottomOffset-currentHeight;if(heightToAdd<=0)return;var newHeight= Math.round(Math.min(this.m_maxDialogHeight,currentHeight+heightToAdd));this.SetHeight(newHeight);this.m_fitted=true},GetButton:function(id){if(id!==undefined){id=id.toLowerCase();for(var i=0;i<this.m_buttons.length;i++)if(this.m_buttons[i].b.GetControlId().ID()==id)return this.m_buttons[i].b}return null},GetButtonCount:function(){if(this.m_buttons!=null)return this.m_buttons.length;else return 0},GetCallback:function(){return this.m_callback},GetContentHeight:function(){var h=0;if(this.IChildrenDomNode)h= this.IChildrenDomNode.offsetHeight;if(this.m_icon!=null&&this.m_icon.offsetHeight)if(this.m_icon.offsetHeight>h)h=this.m_icon.offsetHeight;return h},GetHeight:function(){if(this.IsShown())return this.IDomNode.offsetHeight;else return this.m_height},GetWidth:function(){return this.m_width},GetFooterText:function(){return this.m_footerText},GetOpenerWindow:function(){},GetPositiveButton:function(){return this.m_positiveButton},GetTitle:function(){return this.m_title},HandleOnload:function(){if(!D2L.Util.Url.IsExternal(this.m_src))if(this.m_iframeWindow){if(this.m_iframeWindow["UI"])this.m_iframeWindow["UI"].SetParentDialog(this); if(this.m_iframeWindow["d2l_Onload"])this.m_iframeWindow.d2l_Onload();if(!this.m_titleIsSet){var title=this.m_iframeWindow.document.title;this.m_iframe.title=title;this.SetTitle(new D2L.LP.Text.PlainText(title))}this.AttachObject(this,"m_srcWindow",this.m_iframeWindow)}if(!this.m_isLoaded&&this.IsShown()){if(this.m_loading)this.m_loading.style.display="none";if(this.m_src.length>0)for(var i=0;i<this.m_buttons.length;i++)if(this.m_buttons[i].d)this.m_buttons[i].b.SetIsEnabled(true);this.m_isLoaded= true;this.SetHeight(this.m_height);if(this.m_iframe!=null)this.m_iframe.style.width="100%";this.OnOpen.Trigger()}if(this.m_focusAnchor2)this.m_focusAnchor2.focus()},HasCloseIcon:function(hasCloseIcon){},Hide:function(){},IsClosed:function(){return!this.IsShown()},IsResizable:function(){},IsShown:function(){return this.m_isShown},Open:function(opener){if(opener!==undefined)this.SetOpener(opener)},RemoveButton:function(button){for(var i=0;i<this.m_buttons.length;i++)if(this.m_buttons[i].b==button){if(button.GetDomNode()&& button.IsRendered()){D2L.Util.Dom.Purge(button.GetDomNode());button.IDomNode.parentNode.removeChild(button.GetDomNode())}this.m_buttons.splice(i,1)}},RemoveButtons:function(){for(var i=0;i<this.m_buttons.length;i++){var button=this.m_buttons[i].b;if(button.GetDomNode()&&button.IsRendered()){D2L.Util.Dom.Purge(button.GetDomNode());button.IDomNode.parentNode.removeChild(button.GetDomNode())}}this.m_buttons=[]},SetCallback:function(callback){this.m_callback=null;this.m_callbackArguments=[];if(callback&& callback.apply){this.m_callback=callback;for(var i=1;i<arguments.length;i++)this.m_callbackArguments.push(arguments[i])}},SetFooterText:function(footerText){},SetHasCloseIcon:function(hasCloseIcon){},SetMinHeight:function(minHeight){this.m_minHeight=minHeight},SetHeight:function(height){if(height===undefined||height===null)return;var padding=0;if(D2L.LP.Web.UI.Daylight.IsEnabled()){var dialogPadding=this.computeDialogPadding();padding+=dialogPadding?dialogPadding.top+dialogPadding.bottom:0}var windowHeight= this.GetViewportHeight();if(height.isString)if(height.charAt(height.length-1)=="%"){height=parseInt(height.substr(0,height.length-1),10)/100;if(height>1)height=1;else if(height<0)height=0;height=Math.round(height*windowHeight)}else if(height.substr(height.length-2,2)=="px")height=parseInt(height.substr(0,height.length-2));else height=parseInt(height);if(!this.IsShown()||!this.IDomNode||!this.IChildrenDomNode){this.m_height=Math.max(this.m_minHeight,height);return}var topOffset=this.m_topOffset;var bottomOffset= this.m_bottomOffset;var headerFooterHeight=parseInt(this.IDomNode.offsetHeight,10)-parseInt(this.GetContentHeight(),10);height=height-headerFooterHeight;if(height<1)height=1;if(!this.m_ignoreMaxMinSizeOnResize)if(height+headerFooterHeight<this.m_minHeight)height=this.m_minHeight-headerFooterHeight;if(!this.m_ignoreMaxMinSizeOnResize)if(height+headerFooterHeight+topOffset+bottomOffset>windowHeight)height=windowHeight-headerFooterHeight-topOffset-bottomOffset;if(this.IChildrenDomNode!=null&&this.IChildrenDomNode.offsetHeight&& parseInt(this.GetContentHeight(),10)!=height)this.IChildrenDomNode.style.height=height+"px";if(this.m_iframe){this.IChildrenDomNode.childNodes[0].style.marginTop=!D2L.LP.Web.UI.Daylight.IsEnabled()?Math.round((height-32)/2)+"px":0;if(this.m_isLoaded)this.m_iframe.style.height=height+"px"}height=height+headerFooterHeight+padding;this.m_height=height},computeDialogPadding:function(){if(!this.IDomNode)return;var outerContainer=this.IDomNode.getElementsByClassName("ddial_o2")[0];var innerContainer=this.IDomNode.getElementsByClassName("ddial_i")[0]; if(!outerContainer||!innerContainer)return;var outerBounds=outerContainer.getBoundingClientRect();var innerBounds=innerContainer.getBoundingClientRect();var padding={top:Math.abs(outerBounds.top-innerBounds.top),bottom:Math.abs(outerBounds.bottom-innerBounds.bottom),left:Math.abs(outerBounds.left-innerBounds.left),right:Math.abs(outerBounds.right-innerBounds.right)};return padding},SetIcon:function(image){this.m_iconTerm=image;if(this.m_iconTerm!==null&&this.IsRendered()){if(this.m_icon==null){var table= this.CreateElement("table");table.width="100%";table.height="100%";var r1=table.insertRow(-1);var c1=this.CreateCell(r1);c1.style.width="1%";c1.vAlign="top";this.m_icon=this.CreateElement("img");c1.appendChild(this.m_icon);var c2=this.CreateCell(r1);c2.vAlign="top";if(this.IChildrenDomNode&&this.IChildrenDomNode.parentNode){this.IChildrenDomNode.parentNode.insertBefore(table,this.IChildrenDomNode);c2.appendChild(this.IChildrenDomNode)}}this.m_iconTerm.Assign(this.m_icon);this.m_icon.style.padding= "7px";var paddingPosition=UI.GetCulture().GetMarginPaddingPosition(D2L.Culture.MarginPaddingPosition.Last);this.m_icon.style["padding"+paddingPosition]="0px"}},SetIsResizable:function(isResizable){},SetOpener:function(opener){this.m_opener=opener},SetSize:function(width,height,isResizeEvent){this.SetWidth(width,isResizeEvent);this.SetHeight(height,false);this.OnResize.Trigger(this.GetWidth(),this.GetContentHeight())},SetSrc:function(src,callbackName){if(callbackName===undefined)callbackName="";if(src.indexOf("/d2l/")== -1&&!D2L.Util.Url.IsExternal(src)){UI.GetMessageArea().AddWarningMessage(new D2L.LP.Text.PlainText("'Src' of dialogs must be an "+"absolute path (e.g. /d2l/myProduct/myComponent/myPage.d2l), "+"not relative (e.g. myPage.d2l)"),true);var href=window.location.href;var start=href.indexOf("/d2l/");var end=href.lastIndexOf("/");var absolute=href.substring(start,end+1);src=absolute+src}this.m_src=src;this.m_srcCallbackName=callbackName;if(!D2L.Util.Url.IsExternal(this.m_src)){this.m_src+=this.m_src.indexOf("?")< 0?"?":"&";this.m_src+="d2l_body_type="+D2L.UI.BodyType.Dialog;if(this.m_src.indexOf("ou=")<0)this.m_src+="&ou="+Global.OrgUnitId}},SetSrcParam:function(name,value){this.m_srcParams[name]=value},SetTitle:function(title){this.m_titleIsSet=true},SetMinWidth:function(minWidth){this.m_minWidth=minWidth},SetWidth:function(width,isResizeEvent){var padding=0;if(D2L.LP.Web.UI.Daylight.IsEnabled()&&!isResizeEvent){var dialogPadding=this.computeDialogPadding();padding+=dialogPadding?dialogPadding.left+dialogPadding.right: 0}var windowWidth=this.GetOpenerWindow()["UI"].GetWindowWidth();if(width.isString)if(width.charAt(width.length-1)=="%"){width=parseInt(width.substr(0,width.length-1),10)/100;if(width>1)width=1;else if(width<0)width=0;width=Math.round(width*windowWidth)}else if(width.substr(width.length-2,2)=="px")width=parseInt(width.substr(0,width.length-2));else width=parseInt(width);if(!this.m_ignoreMaxMinSizeOnResize)if(width>windowWidth)width=windowWidth-10;if(!this.m_ignoreMaxMinSizeOnResize)if(width<this.m_minWidth)width= this.m_minWidth;this.m_width=width;if(this.IDomNode)this.IDomNode.style.width=width+padding+"px"},SubmitToIFrame:function(body){var me=this;if(me.m_iframe&&!me.m_isLoaded){for(var i=0;i<me.m_buttons.length;i++)if(me.m_buttons[i].b.IsEnabled()&&me.m_buttons[i].t!==D2L.Control.Button.Type.Cancel&&me.m_buttons[i].t!==D2L.Control.Button.Type.Close){me.m_buttons[i].d=true;me.m_buttons[i].b.SetIsEnabled(false)}if(!D2L.Util.Url.IsExternal(me.m_src)){var f=me.CreateElement("form");f.method="post";f.target= me.m_iframe.name;f.action=me.m_src;for(var name in me.m_srcParams){var input=me.CreateElement("input");input.type="hidden";input.name=name;input.value=me.m_srcParams[name];f.appendChild(input)}var xsrfTokenInput=me.CreateElement("input");xsrfTokenInput.type="hidden";xsrfTokenInput.name=D2L.LP.Web.Authentication.Xsrf.GetXsrfTokenParameterName();xsrfTokenInput.value=D2L.LP.Web.Authentication.Xsrf.GetXsrfToken();f.appendChild(xsrfTokenInput);body.appendChild(f);f.submit();D2L.Util.Dom.Purge(f);body.removeChild(f)}else me.m_iframe.src= me.m_src}}}); D2L.NonModalDialog=D2L.DialogBase.extend({Construct:function(name,callback){arguments.callee.$.Construct.call(this,name,callback);this.m_maxDialogHeight=Math.round(window.screen.availHeight*0.8);this.m_topOffset=10;this.m_bottomOffset=10;this.m_fitted=false;this.m_ignoreMaxMinSizeOnResize=true;this.m_ignoreResizeEvents=true;this.m_hasResizeEvents=true;this.m_isCloseFunctionCalled=false;this.m_popupWindow=null;this.m_resizeWindowOnSetSize=true;var win=window;while(win.parent!=win&&win.parent.UI){var frames=win.parent.document.getElementsByTagName("frame"); if(frames&&frames.length>0)if(win.parent["UI"].GetBodyType()!=D2L.UI.BodyType.Dialog)break;win=win.parent}this.m_openerWindow=win;this.SetWindow(null);window[this.m_name]=this;this.m_ignoreClose=false},BuildDom_Footer:function(){var me=this;this.m_resizeBar=this.CreateElement("div");this.m_resizeBar.className="ddial_f";this.m_resizeBar.style.display="none";this.m_resizeBar.style.marginLeft="-10px";this.m_resizeBar.style.marginRight="-10px";this.m_resizeBar.style.minHeight="1.2em";this.m_resizeBar.appendChild(this.CreateTextNode(this.m_footerText)); D2L.Util.Aria.MakeLiveRegion(this.m_resizeBar);var me=this;this.GetFooterText().GetText().Register(function(txt){me.m_resizeBar.style.display=txt.length>0?"block":"none";me.SetHeight(me.m_height)})},BuildDom:function(){if(!this.m_hasDomBeenBuilt){arguments.callee.$.BuildDom.call(this);this.IDomNode=this.CreateElement("div");var inner=this.CreateElement("div");this.BuildDom_Buttons();this.BuildDom_Footer();this.IChildrenDomNode=this.CreateElement("div");this.IChildrenDomNode.className="ddial_c";this.IChildrenDomNode.style.height= "1px";if(this.m_src.length>0)this.BuildDom_Frame();else{this.IChildrenDomNode.style.overflowY="auto";this.IChildrenDomNode.style.padding="10px"}inner.appendChild(this.IChildrenDomNode);inner.appendChild(this.m_buttonTable);this.IDomNode.appendChild(inner);this.IDomNode.appendChild(this.m_resizeBar);this.SetIcon(this.m_iconTerm);this.InstallEvents()}},Close:function(doClose){if(this.m_ignoreClose||this.m_isCloseFunctionCalled)return;if(doClose===undefined)doClose=true;var me=this;var iframeObj=this.m_iframe; this.ResetState();this.m_isCloseFunctionCalled=true;setTimeout(function(){var ClosePopupWindow=function(){if(doClose&&me.m_popupWindow&&!me.m_popupWindow.closed)me.m_popupWindow.close();me.m_popupWindow=null;me.SetWindow(null)};try{if(iframeObj&&me.m_iframeOnloadFunc&&iframeObj.detachEvent){iframeObj.detachEvent("onload",me.m_iframeOnloadFunc);iframeObj.attachEvent("onload",ClosePopupWindow);iframeObj.src="/d2l/tools/blank.html";setTimeout(function(){try{iframeObj.detachEvent("onload",ClosePopupWindow); iframeObj.parentNode.removeChild(iframeObj);iframeObj=null}catch(e){}},1E3)}else ClosePopupWindow()}catch(e){}},0)},Dispose:function(){if(this.m_popupWindow&&!this.m_popupWindow.closed)this.m_popupWindow.close();this.ResetState();this.m_srcWindow=null;window[this.m_name]=null;this.m_popupWindow=null;arguments.callee.$.Dispose.call(this)},GetOpenerWindow:function(){return this.m_openerWindow},GetViewportHeight:function(){return screen.availHeight},HandlePopupOnLoad:function(){if(this.m_popupWindow=== null)return;var me=this;var win=this.m_popupWindow;this.SetWindow(win);this.m_delayedReturn=new D2L.Util.DelayedReturn;var onFirstLoad=function(){me.m_firstLoadEvent.RemoveListener(onFirstLoad);me.SubmitToIFrame(body);me.m_isShown=true;if(me.m_titleIsSet)me.SetTitle(me.m_title);me.SetSize(me.m_width,me.m_height);setTimeout(function(){me.SetSize(me.m_width,me.m_height);me.m_ignoreResizeEvents=false},0);if(!me.m_iframe)me.OnOpen.Trigger();else setTimeout(function(){if(me.IsShown()&&!me.m_isLoaded)me.HandleOnload()}, 2E4)};this.m_firstLoadEvent.AddListener(onFirstLoad);this.BuildDom();var body=this.m_popupWindow["UI"].GetById("d2l_body");var form=this.m_popupWindow["UI"].GetById("d2l_form");body.style.margin=0;this.AppendTo(form);return this.m_delayedReturn},HandlePopupOnUnload:function(){var win=this.m_popupWindow;if(win&&win.location.href.indexOf("blank.d2l")>=0){if(!this.m_isCloseFunctionCalled){this.m_ignoreClose=true;D2L.Dialog.BC(this.m_name,this.m_closeIconResponseType);this.m_ignoreClose=false}this.Close(false)}}, ResetState:function(){this.m_buttonTable=null;this.m_iframe=null;this.m_iframeWindow=null;this.m_srcWindow=null;this.IDomNode=null;this.IChildrenDomNode=null;this.m_resizeBar=null;this.m_hasDomBeenBuilt=false;for(var i=0;i<this.m_buttons.length;i++)this.m_buttons[i].b.m_hasDomBeenBuilt=false;this.m_isLoaded=false;this.m_isCloseFunctionCalled=false;this.m_isShown=false},HasCloseIcon:function(hasCloseIcon){return true},InstallEvents:function(){var me=this;var handleResizeEvent=function(){try{if(!me.m_ignoreResizeEvents&& !me.m_popupWindow.closed&&me.m_popupWindow["UI"]&&me.m_hasResizeEvents){var newWidth=me.m_popupWindow["UI"].GetWindowWidth();var newHeight=me.m_popupWindow["UI"].GetWindowHeight();me.m_resizeWindowOnSetSize=false;me.SetSize(newWidth,newHeight);me.m_resizeWindowOnSetSize=true}}catch(e){}};var onResizeTimer=function(){if(me.resizeTimer)clearTimeout(me.resizeTimer);me.resizeTimer=setTimeout(handleResizeEvent,100)};if(this.GetWindow().document.addEventListener)this.GetWindow().addEventListener("resize", onResizeTimer,false);else if(this.GetWindow().document.attachEvent)this.GetWindow().attachEvent("onresize",onResizeTimer)},Open:function(opener){arguments.callee.$.Open.call(this,opener);if(this.m_popupWindow!=null&&!this.m_popupWindow.closed){this.m_popupWindow.focus();return}var padding=D2L.LP.Web.UI.Daylight.IsEnabled()?60:0;var winHeight=this.GetHeight()+padding;var winWidth=this.GetWidth()+padding;if(winHeight===0)winHeight=this.m_minHeight;var openerWin=this.GetOpenerWindow();var sx=null;if(openerWin.screenX)sx= openerWin.screenX;else if(openerWin.screenLeft)sx=openerWin.screenLeft;var sy=null;if(openerWin.screenY)sy=openerWin.screenY+80;else if(openerWin.screenTop)sy=openerWin.screenTop;var left=(openerWin["UI"].GetWindowWidth()-winWidth)/2+sx;var top=(openerWin["UI"].GetWindowHeight()-winHeight)/2+sy;var winFeatures="top="+top+", left="+left+", height="+winHeight+", width="+winWidth+", directories=no, toolbar=no, status=no, resizable=yes, location=no, scrollbars=no";var winQueryString="?d2l_body_type="+ D2L.UI.BodyType.Frame+"&d2l_nonModalDialog_cb="+this.m_name+"&d2l_nonModalDialog_cbwin="+UI.windowId;this.m_popupWindow=window.open("/d2l/common/dialogs/nonModal/blank.d2l"+winQueryString,"_blank",winFeatures);var me=this;if(this.m_popupWindow)setTimeout(function(){me.m_popupWindow.focus()})},SetFooterText:function(footerText){this.m_footerText=D2L.LP.Text.IText.Normalize(footerText,"D2L.NonModalDialog","SetFooterText","footerText");if(this.m_resizeBar&&this.IsShown()){if(this.m_resizeBar.firstChild){D2L.Util.Dom.Purge(this.m_resizeBar.firstChild); this.m_resizeBar.removeChild(this.m_resizeBar.firstChild)}this.m_resizeBar.appendChild(this.CreateTextNode(this.m_footerText));var me=this;this.m_footerText.GetText().Register(function(txt){me.m_resizeBar.style.display=txt.length>0?"block":"none";me.SetHeight(me.m_height)})}},SetHeight:function(height){this.m_ignoreResizeEvents=true;if(height!==undefined&&height!==null)if(height.isString)if(height.length>1&&height.substr(height.length-2,2)=="px")height=parseInt(height.substr(0,height.length-2));arguments.callee.$.SetHeight.call(this, height-10);var newHeight=this.GetHeight();if(this.IsShown()&&this.m_resizeWindowOnSetSize)try{var heightDiff=newHeight-this.GetWindow()["UI"].GetWindowHeight()+this.m_topOffset+this.m_bottomOffset+10;if(heightDiff>0)this.GetWindow().resizeBy(0,heightDiff)}catch(ex){}this.m_ignoreResizeEvents=false},SetTitle:function(title){arguments.callee.$.SetTitle.call(this,title);this.m_title=D2L.LP.Text.IText.Normalize(title,"D2L.NonModalDialog","SetTitle","title");var me=this;if(this.IsShown())this.m_title.GetText().Register(function(val){if(me.IsShown())me.GetWindow().document.title= val})},SetWidth:function(width){this.m_ignoreResizeEvents=true;arguments.callee.$.SetWidth.call(this,width);var newWidth=this.GetWidth();if(this.IsShown()){this.IDomNode.style.width="100%";if(this.m_resizeWindowOnSetSize)try{var widthDiff=newWidth-this.GetWindow()["UI"].GetWindowWidth();this.GetWindow().resizeBy(widthDiff,0)}catch(ex){}}this.m_ignoreResizeEvents=false},AddButtonHelper:function(text,position,type,responseType,responseParam,id,isPrimary){var button=arguments.callee.$.AddButtonHelper.call(this, text,position,type,responseType,responseParam,id,isPrimary);if(this.m_hasDomBeenBuilt)if(this.m_buttons.length==1){var me=this;setTimeout(function(){me.SetHeight(me.m_height)})}return button}}); D2L.ModalDialog=D2L.DialogBase.extend({Construct:function(name,callback){arguments.callee.$.Construct.call(this,name,callback);this.m_topOffset=70;this.m_bottomOffset=20;this.m_hasCloseIcon=true;this.m_left=0;this.m_titleNode=null;this.m_top=0;this.m_shimHandle=null;var win=window;var lastGoodWindow=win;while(true){if(win.UI&&win.UI.isMvc!==true){var frames=win.document.getElementsByTagName("frame");if(frames.length===0&&win.D2L!==null&&win.D2L!==undefined)lastGoodWindow=win}if(win.document.body&& D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-body",win.document.body)&&win.D2L&&win.D2L.LP){win.UI=window.UI;win["UI"].isMvc=true;lastGoodWindow=win}if(win.parent==win)break;try{var throwsIfXDomain=win.parent.document;win=win.parent}catch(xdomainErr){break}}win=lastGoodWindow;this.SetWindow(win);this.m_maxDialogHeight=UI.GetWindowHeight(win);window[this.m_name]=this},Dispose:function(){this.Close();window[this.m_name]=null;arguments.callee.$.Dispose.call(this)},BuildDom:function(){if(this.m_hasDomBeenBuilt)return; arguments.callee.$.BuildDom.call(this);this.IDomNode=this.CreateElement("div");this.IDomNode.className="ddial_o";this.IDomNode.style.zIndex=this.GetWindow()["UI"].GetZIndex();var outer2=this.CreateElement("div");outer2.className="ddial_o2";var inner=this.CreateElement("div");inner.className="ddial_i";var titleBar=this.BuildDom_TitleBar();this.BuildDom_Buttons();var resizeBar=this.BuildDom_Footer();this.IChildrenDomNode=this.CreateElement("div");this.IChildrenDomNode.className="ddial_c";if(this.m_src.length> 0)this.BuildDom_Frame();else{this.IChildrenDomNode.style.overflow="auto";var daylight=D2L.LP.Web.UI.Daylight.IsEnabled();if(!daylight)this.IChildrenDomNode.style.margin="10px"}var replace="";if(this.GetTitle())replace=this.GetTitle();var topAnchorTitle=new D2L.LP.Text.LangTerm("Framework.Dialog.altJumpBottom",replace);var bottomAnchorTitle=new D2L.LP.Text.LangTerm("Framework.Dialog.altJumpTop",replace);this.m_focusAnchor1=this.CreateElement("a");this.m_focusAnchor1.href="javascript://";this.m_focusAnchor1.appendChild(this.CreateTextNode(topAnchorTitle)); this.m_focusAnchor1.className="d2l-offscreen";this.m_focusAnchor1.style.outline="none";inner.appendChild(this.m_focusAnchor1);inner.appendChild(titleBar);inner.appendChild(this.IChildrenDomNode);inner.appendChild(this.m_buttonTable);this.m_focusAnchor3=this.CreateElement("a");this.m_focusAnchor3.tabIndex=-1;this.m_focusAnchor3.appendChild(this.CreateTextNode(" "));this.m_focusAnchor3.title=" ";this.m_focusAnchor3.style.outline="none";inner.appendChild(this.m_focusAnchor3);this.m_focusAnchor4=this.CreateElement("a"); this.m_focusAnchor4.href="javascript://";this.m_focusAnchor4.appendChild(this.CreateTextNode(bottomAnchorTitle));this.m_focusAnchor4.className="d2l-offscreen";this.m_focusAnchor4.style.outline="none";inner.appendChild(this.m_focusAnchor4);outer2.appendChild(inner);outer2.appendChild(resizeBar);this.IDomNode.appendChild(outer2);this.SetIcon(this.m_iconTerm);this.InstallEvents()},BuildDom_TitleBar:function(){var daylight=D2L.LP.Web.UI.Daylight.IsEnabled();var titleBar=this.CreateElement("div");titleBar.className= "ddial_t";var table=this.CreateElement("table");table.width="100%";var row=table.insertRow(-1);if(!daylight){var c0=this.CreateCell(row);c0.appendChild(this.CreateTextNode(""))}var c1=this.CreateCell(row);c1.className="ddial_h";this.m_focusAnchor2=this.CreateElement("a");this.m_focusAnchor2.tabIndex=-1;this.m_focusAnchor2.style.outline="none";this.m_titleNode=this.CreateElement("h1");this.m_titleNode.appendChild(this.CreateTextNode(this.m_title));if(daylight){this.m_titleNode.classList.add("d2l-heading"); this.m_titleNode.classList.add("vui-heading-3")}this.m_focusAnchor2.appendChild(this.m_titleNode);c1.appendChild(this.m_focusAnchor2);var c2=this.CreateCell(row);c2.className="ddial_close";this.m_closeAnchor=this.CreateElement("a");this.m_closeAnchor.href="javascript://";if(daylight)this.m_closeAnchor.className="d2l-dialog-close";if(daylight){if(!this.HasCloseIcon())this.m_closeAnchor.style.display="none"}else this.m_closeAnchor.style.display=this.HasCloseIcon()?"block":"none";D2L.LP.Text.LangTerm.AssignText("Framework.Dialog.altCloseDialog", this.m_closeAnchor,"title");var closeImg=this.CreateElement("span");var closeText=this.CreateElement("span");closeText.className="d2l-offscreen";closeText.appendChild(this.CreateTextNode(new D2L.LP.Text.LangTerm("Framework.Dialog.altCloseDialog")));closeImg.appendChild(closeText);this.m_closeAnchor.appendChild(closeImg);c2.appendChild(this.m_closeAnchor);titleBar.appendChild(table);D2L.Control.Behaviour.Drag.InstallMvc(this.IDomNode,this.GetWindow(),this.GetWindow(),titleBar,closeImg);return titleBar}, BuildDom_Footer:function(){var me=this;var daylight=D2L.LP.Web.UI.Daylight.IsEnabled();var resizeBar=this.GetUI().CreateElement("div");resizeBar.className=daylight?"d2l-dialog-footer":"ddial_f";this.m_footerTextNode=this.GetUI().CreateElement("span");if(daylight)this.m_footerTextNode.className="d2l-offscreen";this.m_footerTextNode.appendChild(this.CreateTextNode(this.m_footerText));resizeBar.appendChild(this.m_footerTextNode);D2L.Util.Aria.MakeLiveRegion(this.m_footerTextNode);var resizeImg=this.GetUI().CreateElement("div"); resizeImg.className=daylight?"d2l-dialog-resize":"ddial_fr";D2L.LP.Text.LangTerm.AssignText("Framework.Dialog.altResizeDialog",resizeImg,"title");resizeBar.appendChild(resizeImg);D2L.Control.Behaviour.Resize.InstallMvc(this,this.IDomNode,resizeImg,this.GetWindow(),this.GetWindow());var clear=new D2L.Control.ClearFloat;clear.AppendTo(resizeBar);return resizeBar},InstallEvents:function(){var me=this;if(this.m_closeAnchor)this.AttachObject(this.m_closeAnchor,"onclick",function(){me.Close(new D2L.Dialog.Response(me.m_closeIconResponseType)); D2L.Dialog.BC(me.m_name,me.m_closeIconResponseType)});if(this.m_focusAnchor1&&this.m_focusAnchor2&&this.m_focusAnchor3&&this.m_focusAnchor4){this.AttachObject(this.m_focusAnchor1,"onfocus",function(){setTimeout(function(){me.m_focusAnchor3.focus()})});this.AttachObject(this.m_focusAnchor1,"onclick",function(){setTimeout(function(){me.m_focusAnchor3.focus()})});this.AttachObject(this.m_focusAnchor4,"onfocus",function(){setTimeout(function(){me.m_focusAnchor2.focus()})});this.AttachObject(this.m_focusAnchor4, "onclick",function(){setTimeout(function(){me.m_focusAnchor2.focus()})})}},Close:function(){if(this.IsClosed())return;var me=this;this.Hide();var placeFocus=function(){if(me.m_opener!==undefined&&me.m_opener!==null){try{if(me.m_opener.Focus!==undefined)me.m_opener.Focus();else if(me.m_opener.focus!==undefined)me.m_opener.focus()}catch(e){}me.m_opener=undefined}};if(UI.GetBrowserInfo().Type==D2L.UI.BrowserType.IE)try{var IEinput=this.CreateElement("input");var body=UI.GetById("d2l_body");IEinput.style.position= "absolute";IEinput.style.height="0px";IEinput.style.width="0px";IEinput.style.top=this.GetWindow()["UI"].GetScrollTop()+"px";IEinput.style.left=this.GetWindow()["UI"].GetScrollLeft()+"px";body.appendChild(IEinput);var focusAndRemove=function(){IEinput.focus();D2L.Util.Dom.Purge(IEinput);body.removeChild(IEinput)};setTimeout(function(){try{focusAndRemove()}catch(e){}});IEinput.focus()}catch(e){}var remove=function(){if(me.m_iframe)me.m_isLoaded=false;D2L.Util.Dom.Purge(me.GetDomNode());me.Remove(); me.m_hasDomBeenBuilt=false;setTimeout(placeFocus,100)};if(this._scrollClassElem){this._scrollClassElem.classList.remove("d2l-dialog-open");this._scrollClassElem.classList.remove("d2l-dialog-open-ios")}if(D2L.LP.Web.UI.Daylight.IsEnabled()){window.removeEventListener("resize",this.onResize,false);var closingAnimation=function(){me.IDomNode.removeEventListener("animationend",closingAnimation,false);me.IDomNode.removeEventListener("webkitAnimationEnd",closingAnimation,false);me.IDomNode.style.display= "none";me.m_isShown=false;setTimeout(remove,0)};if(this.IDomNode.classList.contains("d2l-dialog-closing")){this.IDomNode.dispatchEvent(new Event("animationend"));this.IDomNode.dispatchEvent(new Event("webkitAnimationEnd"))}else{this.IDomNode.addEventListener("animationend",closingAnimation,false);this.IDomNode.addEventListener("webkitAnimationEnd",closingAnimation,false);this.IDomNode.classList.add("d2l-dialog-closing")}}else setTimeout(remove,0)},GetOpenerWindow:function(){return this.GetWindow()}, GetPosX:function(){if(this.IDomNode)return D2L.Util.Dom.FindPosX(this.IDomNode);else return 0},GetViewportHeight:function(){var win=window;try{var throwsIfXDomain=win.top.document;win=win.top}catch(xdomainErr){}return UI.GetWindowHeight(win)},GetPosY:function(){if(this.IDomNode)return D2L.Util.Dom.FindPosY(this.IDomNode);else return 0},HasCloseIcon:function(){return this.m_hasCloseIcon},Hide:function(){if(!D2L.LP.Web.UI.Daylight.IsEnabled()){this.GetDomNode().style.left="-2000px";this.GetDomNode().style.top= "-2000px";this.m_isShown=false}D2L.LP.Web.UI.Desktop.Controls.Shim.Delete(this.m_shimHandle);this.m_shimHandle=null},IsResizable:function(){return true},SetHasCloseIcon:function(hasCloseIcon){this.m_hasCloseIcon=hasCloseIcon;if(this.m_closeImg)this.m_closeImg.style.display=hasCloseIcon?"block":"none"},SetIsResizable:function(isResizable){},SetPos:function(x,y){this.SetPosX(x);this.SetPosY(y)},SetPosX:function(x){if(this.IDomNode)this.IDomNode.style.left=x+"px";this.m_left=x},SetPosY:function(y){if(this.IDomNode)this.IDomNode.style.top= y+"px";this.m_top=y},SetFooterText:function(footerText){this.m_footerText=D2L.LP.Text.IText.Normalize(footerText,"D2L.ModalDialog","SetFooterText");if(this.m_footerTextNode){if(this.m_footerTextNode.firstChild){D2L.Util.Dom.Purge(this.m_footerTextNode.firstChild);this.m_footerTextNode.removeChild(this.m_footerTextNode.firstChild)}this.m_footerTextNode.appendChild(this.CreateTextNode(this.m_footerText));var me=this;this.m_footerText.GetText().Register(function(txt){me.SetHeight(me.m_height)})}},SetTitle:function(title){arguments.callee.$.SetTitle.call(this, title);this.m_title=D2L.LP.Text.IText.Normalize(title,"D2L.ModalDialog","SetTitle","title");if(this.m_titleNode){if(this.m_titleNode.firstChild){D2L.Util.Dom.Purge(this.m_titleNode.firstChild);this.m_titleNode.removeChild(this.m_titleNode.firstChild)}this.m_titleNode.appendChild(this.CreateTextNode(this.m_title))}},Show:function(){var me=this;this.m_isShown=true;var win=this.GetWindow();try{var throwsIfXDomain=win.top.document;win=win.top}catch(xdomainErr){}var ui=this.GetWindow()["UI"];this.SetSize(this.m_width, this.m_height);this.onResize=onResizePositionDialog;this.onResize();if(D2L.LP.Web.UI.Daylight.IsEnabled())window.addEventListener("resize",this.onResize,false);this.m_shimHandle=D2L.LP.Web.UI.Desktop.Controls.Shim.Create(this.IDomNode);this.IDomNode.style.zIndex=ui.GetZIndex(win);function onResizePositionDialog(){var left=ui.GetScrollLeft(win)+(ui.GetWindowWidth(win)-me.IDomNode.offsetWidth)/2;var top=ui.GetScrollTop(win)+me.m_topOffset;me.SetPos(left,top)}},Open:function(opener){var me=this;arguments.callee.$.Open.call(this, opener);this.m_delayedReturn=new D2L.Util.DelayedReturn;var onFirstLoad=function(){me.m_firstLoadEvent.RemoveListener(onFirstLoad);me.SubmitToIFrame(body);me.Show();if(!me.m_iframe){if(me.m_focusAnchor2)me.m_focusAnchor2.focus();me.OnOpen.Trigger()}else setTimeout(function(){if(me.IsShown()&&!me.m_isLoaded)me.HandleOnload()},2E4)};this.m_firstLoadEvent.AddListener(onFirstLoad);this.BuildDom();if(D2L.LP.Web.UI.Daylight.IsEnabled()){var openingAnimation=function(){me.IDomNode.removeEventListener("animationend", openingAnimation,false);me.IDomNode.removeEventListener("webkitAnimationEnd",openingAnimation,false);me.IDomNode.classList.remove("d2l-dialog-loading")};this.IDomNode.addEventListener("animationend",openingAnimation,false);this.IDomNode.addEventListener("webkitAnimationEnd",openingAnimation,false);this.IDomNode.classList.add("d2l-dialog-loading")}var window=this.GetWindow();var body=window.document.body;this._scrollClassElem=window.document.documentElement;this._scrollClassElem.classList.add("d2l-dialog-open"); if(D2L.LP.Web.UI.Desktop.MasterPages.Dialog.IsIos())this._scrollClassElem.classList.add("d2l-dialog-open-ios");this.AppendTo(body);return this.m_delayedReturn}});D2L.Dialog=D2L.ModalDialog;if(Global.Preferences.UseNonModalDialogs)D2L.Dialog=D2L.NonModalDialog; D2L.Dialog.BC=function(dialogName,responseType,buttonType,param){var dialog=UI.GetByName(dialogName);var r=new D2L.Dialog.Response(dialog,responseType,param);if(dialog.m_srcWindow&&!dialog.m_srcWindow.closed&&dialog.m_srcCallbackName.length>0&&dialog.m_srcWindow[dialog.m_srcCallbackName])dialog.m_srcWindow[dialog.m_srcCallbackName](r);else dialog.CallCallback(r)};D2L.Dialog.GetParent=function(){return UI.GetParentDialog()};D2L.Dialog.GetParentDialog=function(){return UI.GetParentDialogDelayed()}; D2L.Dialog.Prompt=D2L.Dialog.extend({Construct:function(name,callback,primaryMessage,secondaryMessage,autoClose){arguments.callee.$.Construct.call(this,name,callback);if(autoClose===undefined)autoClose=true;if(autoClose){var me=this;this.OnOpen.RegisterMethod(function(){me.m_delayedReturn.Register(function(){me.Close()})})}this.m_primaryMessage=null;this.m_primaryMessageNode=null;this.m_primaryMessageSpan=null;this.m_secondaryMessage=null;this.m_secondaryMessageNode=null;this.m_secondaryMessageSpan= null;this.m_closeOnEnter=true;this.SetPrimaryMessage(primaryMessage);this.SetSecondaryMessage(secondaryMessage);this.SetHasCloseIcon(false)},BuildDom:function(){if(!this.m_hasDomBeenBuilt){arguments.callee.$.BuildDom.call(this);var c2=this.CreateElement("div");this.m_primaryMessageSpan=this.CreateElement("p");this.m_primaryMessageSpan.style.marginTop="0";this.m_primaryMessageSpan.style.fontWeight="bold";this.SetPrimaryMessage(this.m_primaryMessage);c2.appendChild(this.m_primaryMessageSpan);this.m_secondaryMessageSpan= this.CreateElement("p");this.m_secondaryMessageSpan.style.marginBottom="0";this.SetSecondaryMessage(this.m_secondaryMessage);c2.appendChild(this.m_secondaryMessageSpan);this.AppendChild(c2);var me=this;setTimeout(function(){me.m_firstLoadEvent.Trigger()},0)}},InstallEvents:function(){arguments.callee.$.InstallEvents.call(this);if(this.m_focusAnchor2&&this.m_positiveButton&&this.m_closeOnEnter){var me=this;var handleKey=0;this.AttachObject(this.m_focusAnchor2,"onfocus",function(){if(handleKey==0)handleKey= 1});this.AttachObject(this.m_focusAnchor2,"onblur",function(){handleKey=2});UI.GetWindowEventManager().InstallKpel(this.m_focusAnchor2,function(obj,keyPressEvent){if(me.IsShown()&&me.m_closeOnEnter&&handleKey==1&&(keyPressEvent.GetKey()==D2L.KeyPressEvent.Key.Enter||keyPressEvent.GetCharacter()==" "))me.m_positiveButton.Click()})}},SetCloseOnEnter:function(closeOnEnter){this.m_closeOnEnter=closeOnEnter},SetSrc:function(src,callbackName){arguments.callee.$.SetSrc.call(this,src,callbackName);if(D2L.LP.Web.UI.Html.JavaScript.Console.IsEnabled())alert("You can not set the source of a Prompt Dialog")}, SetPositiveButtonText:function(text){if(!this.m_positiveButton)this.m_positiveButton=this.AddCustomButton(text,D2L.Dialog.ButtonPosition.Left,D2L.Dialog.ResponseType.Positive,undefined,undefined,true);this.m_positiveButton.SetText(text)},SetPrimaryMessage:function(primaryMessage){this.m_primaryMessage=D2L.LP.Text.IText.Normalize(primaryMessage,"D2L.Dialog.Prompt","SetPrimaryMessage","primaryMessage");if(this.m_primaryMessageSpan){D2L.Util.Dom.Purge(this.m_primaryMessageSpan);this.m_primaryMessage.AssignHtml(this.m_primaryMessageSpan, "innerHTML");var me=this;this.m_primaryMessage.GetHtml().Register(function(val){me.m_primaryMessageSpan.style.display=val.length>0?"block":"none"})}},SetSecondaryMessage:function(secondaryMessage){this.m_secondaryMessage=D2L.LP.Text.IText.Normalize(secondaryMessage,"D2L.Dialog.Prompt","SetSecondaryMessage","secondaryMessage");if(this.m_secondaryMessageSpan){D2L.Util.Dom.Purge(this.m_secondaryMessageSpan);this.m_secondaryMessage.AssignHtml(this.m_secondaryMessageSpan,"innerHTML");var me=this;this.m_secondaryMessage.GetHtml().Register(function(val){me.m_secondaryMessageSpan.style.display= val.length>0?"block":"none"})}}}); D2L.Dialog.AudioCapture=D2L.Dialog.extend({Construct:function(src,callback){arguments.callee.$.Construct.call(this,UI.GetUniqueHtmlId(),callback);this.AddPrimaryButton(D2L.Control.Button.Type.Add,"add","BTN_addAudioCapture");this.AddButton(D2L.Control.Button.Type.Cancel);this.SetSrc("/d2l/common/dialogs/audiocapture/main.d2l","DialogCallback");this.SetSize(600,400);var me=this;this.OnOpen.RegisterMethod(function(){me.SetAddButtonIsEnabled(false)})},Close:function(){this.SetFooterText(new D2L.LP.Text.PlainText(""));arguments.callee.$.Close.call(this)}, Open:function(opener){return arguments.callee.$.Open.call(this,opener)},SetAddButtonIsEnabled:function(isEnabled){var button=this.GetButton("BTN_addAudioCapture");if(button)button.SetIsEnabled(isEnabled)}}); D2L.Dialog.Confirm=D2L.Dialog.Prompt.extend({Construct:function(name,callback,primaryMessage,secondaryMessage){arguments.callee.$.Construct.call(this,name,callback,primaryMessage,secondaryMessage);this.SetPositiveButtonText(new D2L.LP.Text.LangTerm("Standard.Buttons.btnYes"));this.m_closeIconResponseType=D2L.Dialog.ResponseType.Negative;this.m_negativeButton=this.AddCustomButton(new D2L.LP.Text.LangTerm("Standard.Buttons.btnNo"),D2L.Dialog.ButtonPosition.Left,D2L.Dialog.ResponseType.Negative);this.SetTitle(new D2L.LP.Text.LangTerm("Framework.Dialog.titConfirmation"))}, SetNegativeButtonText:function(text){this.m_negativeButton.SetText(text)}});D2L.Dialog.ButtonType=D2L.Control.Button.Type;D2L.Dialog.ButtonPosition={Left:0,Middle:1,Right:2};D2L.Dialog.ResponseType={Abort:0,Positive:1,Negative:2}; D2L.Dialog.EquationEditor=D2L.Dialog.extend({Construct:function(callback){arguments.callee.$.Construct.call(this,UI.GetUniqueHtmlId(),callback);this.SetSize("690","455");this.SetSrc("/d2l/common/dialogs/equation/equationEditor.d2l","GetMath");this.AddPrimaryButton(D2L.Control.Button.Type.Insert);this.AddSecondaryButton(D2L.Control.Button.Type.Cancel)}}); D2L.Dialog.Error=D2L.Dialog.Prompt.extend({Construct:function(name,primaryMessage,secondaryMessage){arguments.callee.$.Construct.call(this,name,undefined,primaryMessage,secondaryMessage);this.m_closeIconResponseType=D2L.Dialog.ResponseType.Positive;this.SetPositiveButtonText(new D2L.LP.Text.LangTerm("Standard.Buttons.btnOk"));this.SetHasCloseIcon(false);this.SetTitle(new D2L.LP.Text.LangTerm("Framework.Dialog.titError"))}}); D2L.Dialog.Prompt.ImageTextAlternative=D2L.Dialog.Prompt.extend({Construct:function(callback){var me=this;var ourCallback=function(response){if(me.m_input.value==""&&!me.m_decorativeInput.checked&&response.GetType()!=D2L.Dialog.ResponseType.Abort)me.GetWindow().UI.Error(new D2L.LP.Text.LangTerm("Framework.HtmlEditor2.errPrimarySpecifyTextAlternative"),new D2L.LP.Text.LangTerm("Framework.HtmlEditor2.errSecondarySpecifyTextAlternative"));else{me.SetCallback(callback);me.CallCallback(response)}};arguments.callee.$.Construct.call(this, UI.GetUniqueHtmlId(),ourCallback,new D2L.LP.Text.LangTerm("Framework.HtmlEditor2.hdrTextAlternative"),new D2L.LP.Text.LangTerm("Framework.HtmlEditor2.lblTextAlternativeDescription"),false);this.m_input=null;this.m_decorativeInput=null;this.SetPositiveButtonText(new D2L.LP.Text.LangTerm("Standard.Buttons.btnOk"));this.SetHasCloseIcon(false);this.SetTitle(new D2L.LP.Text.LangTerm("Framework.HtmlEditor2.titProvideTextAlternative"));this.SetWidth(450);this.m_hasResizeEvents=false},BuildDom:function(){arguments.callee.$.BuildDom.call(this); var forId=this.GetWindow().UI.GetUniqueHtmlId();var label=this.CreateElement("label");label.htmlFor=forId;label.appendChild(this.CreateTextNode(new D2L.LP.Text.LangTerm("Framework.HtmlEditor2.lblTextAlternative")));label.appendChild(this.CreateTextNode(" "));this.m_input=this.CreateElement("input");this.m_input.type="text";this.m_input.id=forId;this.m_input.className="d2l-edit";this.m_input.maxLength=200;this.m_input.style.width="50%";var decorativeForId=this.GetWindow().UI.GetUniqueHtmlId();var decorativeLabel= this.CreateElement("label");decorativeLabel.htmlFor=decorativeForId;decorativeLabel.appendChild(this.CreateTextNode(new D2L.LP.Text.LangTerm("Framework.HtmlEditor2.lblImageDecorative")));this.m_decorativeInput=this.CreateElement("input");this.m_decorativeInput.type="checkbox";this.m_decorativeInput.id=decorativeForId;this.m_decorativeInput.className="d2l-checkbox";var me=this;var decorativeInputOnClick=function(){if(me.m_decorativeInput.checked)me.m_input.disabled=true;else me.m_input.disabled=false; return true};this.AttachObject(this.m_decorativeInput,"onclick",decorativeInputOnClick);this.AppendChild(this.CreateElement("br"));this.AppendChild(label);this.AppendChild(this.m_input);this.AppendChild(this.CreateElement("br"));this.AppendChild(this.m_decorativeInput);this.AppendChild(this.CreateTextNode(" "));this.AppendChild(decorativeLabel);setTimeout(function(){me.m_firstLoadEvent.Trigger()},0)},GetTextAlternative:function(){if(this.m_input)return this.m_input.value;else return""},IsDecorative:function(){if(this.m_decorativeInput)return this.m_decorativeInput.checked; else return false}}); D2L.Dialog.Info=D2L.Dialog.Prompt.extend({Construct:function(name,primaryMessage,secondaryMessage){arguments.callee.$.Construct.call(this,name,undefined,null,secondaryMessage);this.m_closeIconResponseType=D2L.Dialog.ResponseType.Positive;this.SetPositiveButtonText(new D2L.LP.Text.LangTerm("Standard.Buttons.btnOk"));this.SetHasCloseIcon(false);var titleInfo=new D2L.LP.Text.LangTerm("Framework.Dialog.titInformation");var title=new D2L.LP.Text.SmlText("[0]: [1]",titleInfo,primaryMessage);this.SetTitle(title)}}); D2L.Dialog.Prompt.Input=D2L.Dialog.Prompt.extend({Construct:function(callback,primaryMessage,secondaryMessage,fieldName){arguments.callee.$.Construct.call(this,UI.GetUniqueHtmlId(),callback,primaryMessage,secondaryMessage);this.m_fieldName=fieldName;this.SetPositiveButtonText(new D2L.LP.Text.LangTerm("Standard.Buttons.btnOk"));this.AddCustomButton(new D2L.LP.Text.LangTerm("Standard.Buttons.btnCancel"),D2L.Dialog.ButtonPosition.Left,D2L.Dialog.ResponseType.Abort);this.SetTitle(new D2L.LP.Text.LangTerm("Framework.Dialog.titInputRequested"))}, BuildDom:function(){arguments.callee.$.BuildDom.call(this);var forId=this.GetWindow().UI.GetUniqueHtmlId();var table=this.CreateElement("table");table.align="center";var tr=table.insertRow(-1);var td=tr.insertCell(-1);td.style.padding="3px";var label=this.CreateElement("label");label.htmlFor=forId;label.appendChild(this.CreateTextNode(this.m_fieldName));label.appendChild(this.CreateTextNode(":"));td.appendChild(label);td=tr.insertCell(-1);td.style.padding="3px";this.m_input=this.CreateElement("input"); this.m_input.type="text";this.m_input.id=forId;this.m_input.className="d2l-edit";td.appendChild(this.m_input);this.AppendChild(table);var me=this;setTimeout(function(){me.m_firstLoadEvent.Trigger()},0)},GetInputValue:function(){if(this.m_input)return this.m_input.value;else return""}});D2L.Dialog.Native={}; D2L.Dialog.Native.Prompt=D2L.DialogBase.extend({Construct:function(name,callback,primaryMessage,secondaryMessage){arguments.callee.$.Construct.call(this,name,callback);var win=window;while(win.parent!=win&&win.parent.UI){var frames=win.parent.document.getElementsByTagName("frame");if(frames&&frames.length>0)break;win=win.parent}this.m_openerWindow=win;this.m_primaryMessage=null;this.m_secondaryMessage=null;this.SetPrimaryMessage(primaryMessage);this.SetSecondaryMessage(secondaryMessage);window[this.m_name]= this},AddButton:function(type,responseParam,name){return null},AddCustomButton:function(text,position,responseType,responseParam,id){return null},CallCallback:function(response){if(this.IsClosed()&&response!=null&&response.GetType()!=D2L.Dialog.ResponseType.Abort)UI.GetMessageArea().AddWarningMessage(new D2L.LP.Text.PlainText("Calling CallCallback on a closed "+"dialog can cause unexpected errors in IE. Please make sure "+"you are closing the dialog inside your outer callback "+"function instead of SrcCallback."), true);var cb=this.GetCallback();var ret=response;if(cb){var cbRet=cb.apply(cb,[response].concat(this.m_callbackArguments));if(cbRet!==undefined)ret=cbRet}if(this.m_delayedReturn)this.m_delayedReturn.Trigger(ret)},Close:function(){},GetButton:function(id){var b=new D2L.Control.Button(new D2L.LP.Text.PlainText(" "));return b},GetCallback:function(){return this.m_callback},GetContentHeight:function(){return 0},GetHeight:function(){return 0},GetWidth:function(){return 0},GetFooterText:function(){var f= new D2L.LP.Text.PlainText("");return f},GetOpenerWindow:function(){return this.m_openerWindow},GetPositiveButton:function(){var b=new D2L.Control.Button(new D2L.LP.Text.PlainText(" "));return b},GetTitle:function(){var t=new D2L.LP.Text.PlainText("");return t},HasCloseIcon:function(hasCloseIcon){return true},Hide:function(){},IsClosed:function(){return!this.IsShown()},IsResizable:function(){return false},IsShown:function(){return this.m_isShown},Open:function(){},RemoveButton:function(button){},SetCallback:function(callback){this.m_callback= null;this.m_callbackArguments=[];if(callback&&callback.apply){this.m_callback=callback;for(var i=1;i<arguments.length;i++)this.m_callbackArguments.push(arguments[i])}},SetCloseOnEnter:function(closeOnEnter){},SetFooterText:function(footerText){},SetHasCloseIcon:function(hasCloseIcon){},SetHeight:function(height){},SetIcon:function(imageTerm){},SetIsResizable:function(isResizable){},SetPositiveButtonText:function(text){},SetPrimaryMessage:function(primaryMessage){this.m_primaryMessage=D2L.LP.Text.IText.Normalize(primaryMessage, "D2L.Dialog.Native.Prompt","SetPrimaryMessage","primaryMessage")},SetSecondaryMessage:function(secondaryMessage){this.m_secondaryMessage=D2L.LP.Text.IText.Normalize(secondaryMessage,"D2L.Dialog.Native.Prompt","SetSecondaryMessage","secondaryMessage")},SetSize:function(width,height){},SetSrc:function(src,callbackName){if(D2L.LP.Web.UI.Html.JavaScript.Console.IsEnabled())alert("You can not set the source of a Prompt Dialog")},SetSrcParam:function(name,value){},SetTitle:function(title){},SetWidth:function(width){}}); D2L.Dialog.Native.Alert=D2L.Dialog.Native.Prompt.extend({Construct:function(name,primaryMessage,secondaryMessage){arguments.callee.$.Construct.call(this,name,undefined,primaryMessage,secondaryMessage);this.m_closeIconResponseType=D2L.Dialog.ResponseType.Positive},Open:function(){var me=this;this.m_isShown=true;this.m_primaryMessage.GetHtml().Register(function(primaryMessage){me.m_secondaryMessage.GetHtml().Register(function(secondaryMessage){var win=me.GetOpenerWindow();if(win){win.alert(primaryMessage+ "\n\n"+secondaryMessage);var response=new D2L.Dialog.Response(me,D2L.Dialog.ResponseType.Positive);me.CallCallback(response)}me.m_isShown=false})})}});D2L.Dialog.Native.Error=D2L.Dialog.Native.Alert;D2L.Dialog.Native.Info=D2L.Dialog.Native.Alert;D2L.Dialog.Native.Warning=D2L.Dialog.Native.Alert; D2L.Dialog.Native.Confirm=D2L.Dialog.Native.Prompt.extend({Construct:function(name,callback,primaryMessage,secondaryMessage){arguments.callee.$.Construct.call(this,name,callback,primaryMessage,secondaryMessage);this.m_closeIconResponseType=D2L.Dialog.ResponseType.Negative},Open:function(){var me=this;this.m_isShown=true;this.m_primaryMessage.GetHtml().Register(function(primaryMessage){me.m_secondaryMessage.GetHtml().Register(function(secondaryMessage){var win=me.GetOpenerWindow();if(win){var response= null;var ret=win.confirm(primaryMessage+"\n\n"+secondaryMessage);if(ret)response=new D2L.Dialog.Response(me,D2L.Dialog.ResponseType.Positive);else response=new D2L.Dialog.Response(me,D2L.Dialog.ResponseType.Negative);me.CallCallback(response)}me.m_isShown=false})})},SetNegativeButtonText:function(text){}});if(Global.Preferences.UseNonModalDialogs){D2L.Dialog.Error=D2L.Dialog.Native.Error;D2L.Dialog.Info=D2L.Dialog.Native.Info;D2L.Dialog.Warning=D2L.Dialog.Native.Warning;D2L.Dialog.Confirm=D2L.Dialog.Native.Confirm} D2L.Dialog.OrgUnitSelector=D2L.Dialog.extend({Construct:function(callback){arguments.callee.$.Construct.call(this,UI.GetUniqueHtmlId(),callback);this.SetTitle(new D2L.LP.Text.LangTerm("Framework.OrgUnitSelector.btnAddOrgUnits"));this.SetSize("710px","450px");this.SetSrc("/d2l/common/dialogs/orgUnitSelector/orgUnitSelector.d2l","SrcCallback");this.SetSrcParam("d","1");var b=this.AddPrimaryButton(D2L.Control.Button.Type.Insert);b.SetIsEnabled(false);this.AddSecondaryButton(D2L.Control.Button.Type.Cancel); this.SetAllowMultiple(true);this.SetDescendantOptions(D2L.OrgUnitSelector.DescendantOptions.UserChoice);this.SetOrgUnitOptions(D2L.OrgUnitSelector.OrgUnitOptions.DescendantsOnly);this.SetOrgUnitDefaultOption(D2L.OrgUnitSelector.OrgUnitDefaultOption.OrgUnit);this.SetDescendantOptionsIncludeCurrent(true)},SetAllowMultiple:function(allowMultiple){this.SetSrcParam("am",allowMultiple);if(!allowMultiple)this.SetTitle(new D2L.LP.Text.LangTerm("Framework.OrgUnitSelector.btnAddOrgUnit"));else this.SetTitle(new D2L.LP.Text.LangTerm("Framework.OrgUnitSelector.btnAddOrgUnits"))}, SetAllowOrg:function(allowOrg){this.SetSrcParam("ao",allowOrg)},SetDescendantOptions:function(descendantOptions){this.SetSrcParam("dopts",descendantOptions)},SetDescendantOptionsIncludeCurrent:function(descendantOptionsIncludeCurrent){this.SetSrcParam("doptsic",descendantOptionsIncludeCurrent)},SetOrgUnitOptions:function(orgUnitOptions){this.SetSrcParam("ouopts",orgUnitOptions)},SetOrgUnitDefaultOption:function(defaultOrgUnitOption){this.SetSrcParam("oudopt",defaultOrgUnitOption)},SetDataSplit:function(ds){this.SetSrcParam("ds", ds)}}); D2L.Popup=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this,true);this.winName="";this.bodySource="";this.queryString="";this.footerMsg="";this.buttonOffset=0;this.height=400;this.width=400;this.title=new D2L.LP.Text.PlainText("");this.hasStatusBar=false;this.hasAutoScroll=true;this.hasHiddenHeader=false;this.buttons=new Array;this.m_window=null;this.m_autoCloseWindow=true;this.m_name=UI.GetUniqueHtmlId();window[this.m_name]=this;this.m_isClone=false},Dispose:function(){arguments.callee.$.Dispose.call(this);this.m_window= null},AddButton:function(text,jsFunctionName,location,isPrimary){if(isPrimary===undefined)isPrimary=false;var me=this;var doAddition=function(){if(text.isString)me.RemoveButton(text);me.buttons.push(new Array(text,jsFunctionName,location,isPrimary))};var pWindow=this.GetWindow();if(pWindow!==null&&pWindow.OnLoadComplete&&pWindow.isLoadComplete!==undefined)if(!pWindow.isLoadComplete)pWindow.OnLoadComplete.RegisterMethod(doAddition);else doAddition();else doAddition()},RemoveButton:function(text){var me= this;var doRemoval=function(){for(var i=0;i<me.buttons.length;i++)if(me.buttons[i][0].isString)if(me.buttons[i][0]==text)if(me.buttons[i]==me.buttons[me.buttons.length-1])me.buttons.pop();else me.buttons[i]=me.buttons.pop()};var pWindow=this.GetWindow();if(pWindow!==null&&pWindow.OnLoadComplete&&pWindow.isLoadComplete!==undefined)if(!pWindow.isLoadComplete)pWindow.OnLoadComplete.RegisterMethod(doRemoval);else doRemoval();else doRemoval()},AddCancelButton:function(){this.AddButton("Cancel","Cancel", "Left",false)},AddCloseButton:function(isPrimary){this.AddButton("Close","Close","Left",isPrimary)},AddCreateButton:function(isPrimary){this.AddButton("Create","Create","Left",isPrimary)},AddSaveButton:function(isPrimary){this.AddButton("Save","Save","Left",isPrimary)},ClearButtons:function(){var me=this;var doRemoval=function(){me.buttons=new Array};var pWindow=this.GetWindow();if(pWindow!==null&&pWindow.OnLoadComplete&&pWindow.isLoadComplete!==undefined)if(!pWindow.isLoadComplete)pWindow.OnLoadComplete.RegisterMethod(doRemoval); else doRemoval();else doRemoval()},Open:function(){if(this.m_window)if(this.m_window.closed)this.m_window=null;if(!this.m_window){var statusBar,windowFeatures;if(this.hasStatusBar)statusBar="yes";windowFeatures="height="+this.height+",width="+this.width+",status="+statusBar;windowFeatures+=",location=0,menubar=0,toolbar=0,directories=0,resizable=1";this.m_window=window.open(this.GetUrl(),this.winName,windowFeatures)}if(this.m_window)this.m_window.focus()},Load:function(){var pWindow=this.GetWindow(); if(pWindow!==null){pWindow.resizeTo(this.width,this.height);if(this.bodySource.length>0)if(this.queryString.length>0)pWindow.frames["Body"].location.href=this.bodySource+"?"+this.queryString;else pWindow.frames["Body"].location.href=this.bodySource;else pWindow.frames["Body"].location.href="/d2l/common/popup/empty.html";this.LoadFooter();this.LoadHeader()}},LoadFooter:function(){var pWindow=this.GetWindow();if(pWindow!==null){var footer=pWindow.frames["Footer"];var me=this;var reloadFooter=function(){var buttons= me.GetButtonString().Register(function(buttonString){var ni=new footer["D2L"].NavInfo;ni.SetParam("footerMsg",me.footerMsg);ni.SetParam("buttons",buttonString);ni.SetParam("buttonOffset",me.buttonOffset);footer["Nav"].Go(ni)})};if(pWindow.OnLoadComplete&&pWindow.isLoadComplete!==undefined)if(!pWindow.isLoadComplete)pWindow.OnLoadComplete.RegisterMethod(reloadFooter);else reloadFooter()}},LoadHeader:function(){var win=this.GetWindow();if(win!==null&&win.SetTitle)this.GetTitle().GetText().Register(function(t){win.SetTitle(t)})}, GetButtonString:function(){var dr=new D2L.Util.DelayedReturn;var encoder=new d2l_Encoder("|",",","$","*");var me=this;var BuildButton=function(i){if(i==me.buttons.length)dr.Trigger(encoder.Serialize());else{var data=new Array;var text=me.buttons[i][0];if(text.isString)text=new D2L.LP.Text.PlainText(me.buttons[i][0].decodeHtml());text.GetText().Register(function(text){data[0]=text;data[1]=me.buttons[i][1];data[2]=me.buttons[i][2];data[3]=me.buttons[i][3];encoder.AddRow(data);BuildButton(++i)})}};BuildButton(0); return dr},GetTitle:function(){if(this.title.isString)this.title=new D2L.LP.Text.PlainText(this.title);return this.title},FetchTitle:function(Callback){this.GetTitle().GetText().Register(function(title){Callback.call(Callback,title)})},GetUrl:function(){var page="/d2l/common/popup/popup.d2l?ou="+Global.OrgUnitId;page+="&queryString="+D2L.Util.Url.Encode(this.queryString);page+="&footerMsg="+D2L.Util.Url.Encode(this.footerMsg.decodeHtml());page+="&buttonOffset="+this.buttonOffset;page+="&popBodySrc="+ D2L.Util.Url.Encode(this.bodySource);page+="&width="+this.width;page+="&height="+this.height;page+="&hasStatusBar="+this.hasStatusBar;page+="&hasAutoScroll="+this.hasAutoScroll;page+="&hasHiddenHeader="+this.hasHiddenHeader;page+="&p="+D2L.Util.Url.Encode(this.m_name);return page},GetWindow:function(){return this.m_window},SetAutoCloseWindow:function(autoClose){this.m_autoCloseWindow=autoClose},SetTitle:function(title){this.title=D2L.LP.Text.IText.Normalize(title,"D2L.Popup","SetTitle","title");this.LoadHeader()}}); var d2l_Popup=D2L.Popup; D2L.Popup.Email=D2L.Popup.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_body="";this.m_emails=[];this.m_groups=[];this.m_groupLocations=[];this.m_users=[];this.m_userLocations=[];this.m_subject="";this.SetAutoCloseWindow(false);var id=UI.GetUniqueHtmlId();window[id]=this;this.bodySource="/d2l/lms/email/integration/AdaptLegacyPopupData.d2l";this.queryString="ou="+Global.OrgUnitId+"&p=1&ext=1&cb="+id;this.width=960;this.height=900},Open:function(){var loc=new D2L.LP.Web.Http.UrlLocation(this.bodySource+ "?"+this.queryString);D2L.LP.Web.UI.Html.Dom.OpenWindow("ComposeEmail",loc,960,900,false,false)},AddEmails:function(emails,location){if(location===undefined)location=D2L.Popup.Email.Location.To;if(!D2L.Util.JavaScript.IsArray(emails))emails=[emails];for(var i=0;i<emails.length;i++){var emailId=new String(emails[i]);if(this.m_emails[emailId]===undefined)this.m_emails[emailId]=[];this.m_emails[emailId].push(location)}},AddUsers:function(users,location){if(location===undefined)location=D2L.Popup.Email.Location.To; if(!D2L.Util.JavaScript.IsArray(users))users=[users];for(var i=0;i<users.length;i++){var userId=new String("u"+users[i]);if(this.m_users[userId]===undefined)this.m_users[userId]=[];this.m_users[userId].push(location)}},AddGroups:function(groups,location){if(location===undefined)location=D2L.Popup.Email.Location.To;if(!D2L.Util.JavaScript.IsArray(groups))groups=[groups];for(var i=0;i<groups.length;i++){var groupId=new String("g"+groups[i]);if(this.m_groups[groupId]===undefined)this.m_groups[groupId]= [];this.m_groups[groupId].push(location)}},GetBody:function(){return this.m_body},GetEmails:function(){return this.m_emails},GetGroupIds:function(){var groupIds=[];for(var groupId in this.m_groups)groupIds.push(groupId.substr(1));return groupIds},GetGroups:function(){return this.m_groups},GetSubject:function(){return this.m_subject},GetUsers:function(){return this.m_users},GetUserIds:function(){var userIds=[];for(var userId in this.m_users)userIds.push(userId.substr(1));return userIds},SetBody:function(body){this.m_body= body},SetSubject:function(subject){this.m_subject=subject}});D2L.Popup.Email.Location={To:0,Cc:1,Bcc:2}; D2L.Dialog.Processing=D2L.ModalDialog.extend({Construct:function(message){var callback=function(r){r.GetDialog().Close()};arguments.callee.$.Construct.call(this,UI.GetUniqueHtmlId(),callback);this.m_divProcessing=null;this.m_message=null;this.m_processBarVisibility=true;this.SetMessage(message);this.SetHeight("140px");this.SetTitle(new D2L.LP.Text.LangTerm("Framework.Dialog.titProcessing"));this.SetHasCloseIcon(false)},BuildDom:function(){arguments.callee.$.BuildDom.call(this);this.m_divMessage=this.CreateElement("div"); this.m_divMessage.appendChild(this.CreateTextNode(""));this.AppendChild(this.m_divMessage);this.m_divProcessing=this.CreateElement("div");this.m_divProcessing.style.padding="1em";this.m_divProcessing.style.textAlign="center";this.m_divProcessing.style.display=this.m_processBarVisibility?"block":"none";var imgProcessing=new D2L.Control.Image;imgProcessing.SetImage(new D2L.Images.ImageTerm("Framework.Dialog.imgProcessing"));imgProcessing.AppendTo(this.m_divProcessing);this.AppendChild(this.m_divProcessing); var me=this;setTimeout(function(){me.m_firstLoadEvent.Trigger()},0);this.SetMessage(this.m_message)},SetMessage:function(message){this.m_message=D2L.LP.Text.IText.Normalize(message,"D2L.Dialog.Processing","SetMessage","message");if(this.m_divMessage)this.m_message.AssignText(this.m_divMessage.firstChild,"data")},SetProcessBarVisibility:function(isVisible){this.m_processBarVisibility=isVisible;if(this.m_divProcessing)this.m_divProcessing.style.display=isVisible?"block":"none"}}); D2L.Dialog.ProgressBar=D2L.Dialog.extend({Construct:function(progressBar){arguments.callee.$.Construct.call(this,UI.GetUniqueHtmlId());this.m_progressBar=progressBar;this.m_message=new D2L.LP.Text.PlainText("");this.m_domMessage=null;this.SetHasCloseIcon(false);this.SetTitle(new D2L.LP.Text.LangTerm("Framework.Dialog.titProcessing"))},BuildDom:function(){if(!this.m_hasDomBeenBuilt){arguments.callee.$.BuildDom.call(this);this.m_domMessage=this.CreateElement("p");this.m_domMessage.style.marginTop="0"; this.AppendChild(this.m_domMessage);this.AppendChild(this.m_progressBar);var me=this;setTimeout(function(){me.m_firstLoadEvent.Trigger()},0);this.Render_Message()}},GetProgressBar:function(){return this.m_progressBar},SetMessage:function(message){this.m_message=D2L.LP.Text.IText.Normalize(message,"D2L.Dialog.ProgressBar","SetMessage","message");this.Render_Message()},Render_Message:function(){if(this.m_domMessage!==null){var me=this;this.m_message.GetText().Register(function(text){if(text.length> 0){D2L.Util.Dom.Purge(me.m_domMessage);me.m_domMessage.innerHTML=D2L.Util.Html.Encode(text);me.m_domMessage.style.display="block"}else me.m_domMessage.style.display="none"})}}}); D2L.Dialog.QuickLink=D2L.Dialog.extend({Construct:function(callback,hasLinkOptions,quicklinkType,urlShowTargetOption,customTitle,canChangeType,showCancelButton){arguments.callee.$.Construct.call(this,UI.GetUniqueHtmlId(),callback);this.m_callback=callback;this.m_hasLinkOptions=hasLinkOptions;this.m_quicklinkType=quicklinkType;this.m_urlShowTargetOption=urlShowTargetOption;this.m_customTitle=customTitle;this.m_canChangeType=canChangeType;this.m_showCancelButton=showCancelButton},Open:function(openerId){if(openerId=== undefined){console.log("openerId is requried.");return}openerId=D2L.LP.Web.UI.Html.AbsoluteHtmlId.Create(openerId);var typeKey="";if(this.m_quicklinkType!==undefined)typeKey=encodeURIComponent(this.m_quicklinkType);var initialViewType="Default";if(this.m_quicklinkType!==undefined)initialViewType="Items";var canChangeType="true";if(typeof this.m_canChangeType==="boolean")canChangeType=this.m_canChangeType.toString();var outputFormat="";if(this.m_hasLinkOptions)outputFormat="html";var urlShowTarget= "true";if(typeof this.m_urlShowTargetOption==="boolean")urlShowTarget=this.m_urlShowTargetOption.toString();var customTitle="";if(typeof this.m_customTitle==="string")customTitle="&customTitle="+encodeURIComponent(this.m_customTitle);var showCancelButton="true";if(typeof this.m_showCancelButton==="boolean")showCancelButton=this.m_showCancelButton.toString();var url="/d2l/lp/quicklinks/manage/"+Global.OrgUnitId+"/createdialog?typeKey="+typeKey+customTitle+"&initialViewType="+initialViewType+"&canChangeType="+ canChangeType+"&outputFormat="+outputFormat+"&urlShowTarget="+urlShowTarget+"&showCancelButton="+showCancelButton;var url=new D2L.LP.Web.Http.UrlLocation(url);var settings={Window:this.GetWindow()};var dialogEvt=D2L.LP.Web.UI.Common.MasterPages.Dialog.Open(openerId,url,settings);var me=this;var callback=this.m_callback;dialogEvt.AddListener(function(item){if(callback===undefined)return;var items=[];items.push(item);var responseHandler=function(response){if(response==null)return;var target="_self"; if(response.target=="WholeWindow")target="_top";else if(response.target=="NewWindow")target="_blank";var link={Navigation:response.location,Html:response.html,Icon:response.icon,Target:target,Text:response.title,ObjectName:response.title};var legacyResponse=new D2L.Dialog.Response(me,D2L.Dialog.ResponseType.Positive);legacyResponse.SetData("QuickLink",link);me.m_callback.call(me.m_callback,legacyResponse)};D2L.LP.Web.UI.Rpc.Connect(D2L.LP.Web.UI.Rpc.Verbs.POST,new D2L.LP.Web.Http.UrlLocation("/d2l/lp/quicklinks/manage/"+ Global.OrgUnitId+"/create"),{items:items},{success:responseHandler})})}}); D2L.Dialog.Response=D2L.Class.extend({Construct:function(dialog,type,param){arguments.callee.$.Construct.call(this);if(param===undefined)param="";this.m_type=type;this.m_param=param;this.m_dialog=dialog;this.m_data=[]},CallCallback:function(){this.GetDialog().CallCallback(this)},GetData:function(key){if(this.m_data[key]!==undefined){var Copy=function(val){var ret=val;if(D2L.Util.JavaScript.IsArray(val)){ret=[];for(var i=0;i<val.length;i++)ret.push(Copy(val[i]))}else if(val!==undefined&&val!==null&& val.Serialize!==undefined&&val.Deserialize!==undefined&&val.ClassName!==undefined)ret=D2L.Serialization.JsonDeserializer.Deserialize(D2L.Serialization.JsonSerializer.Serialize(val));return ret};return Copy(this.m_data[key])}else return null},GetDialog:function(){return this.m_dialog},GetType:function(){return this.m_type},GetParam:function(){return this.m_param},SetData:function(key,value){this.m_data[key]=value}}); D2L.Dialog.SaveConfirmation=D2L.Dialog.Prompt.extend({Construct:function(callback,primaryMessage,secondaryMessage){if(primaryMessage===undefined)primaryMessage=new D2L.LP.Text.LangTerm("Framework.Dialog.lblSaveConfirmationPrimary");if(secondaryMessage===undefined)secondaryMessage=new D2L.LP.Text.LangTerm("Framework.Dialog.lblSaveConfirmationSecondary");arguments.callee.$.Construct.call(this,UI.GetUniqueHtmlId(),callback,primaryMessage,secondaryMessage);this.SetPositiveButtonText(new D2L.LP.Text.LangTerm("Standard.Buttons.btnSave")); this.m_dontSaveButton=this.AddCustomButton(new D2L.LP.Text.LangTerm("Standard.Buttons.btnDontSave"),D2L.Dialog.ButtonPosition.Left,D2L.Dialog.ResponseType.Negative);this.m_cancelButton=this.AddCustomButton(new D2L.LP.Text.LangTerm("Standard.Buttons.btnCancel"),D2L.Dialog.ButtonPosition.Left,D2L.Dialog.ResponseType.Abort);this.SetTitle(new D2L.LP.Text.LangTerm("Framework.Dialog.titSaveChanges"));this.SetCloseOnEnter(false)},GetSaveButton:function(){return this.m_positiveButton},GetDontSaveButton:function(){return this.m_dontSaveButton}, GetCancelButton:function(){return this.m_cancelButton}}); D2L.Dialog.SelectFile=D2L.Dialog.extend({Construct:function(callback){arguments.callee.$.Construct.call(this,UI.GetUniqueHtmlId(),callback);this.m_areaFilters=["MyComputer","OuFiles"];this.m_selectedArea="";this.m_selectedAreaParam="";this.m_allowMultiple=true;this.m_askForImageDesc=false;this.m_forceSaveToCourseFiles=false;this.m_allowSaveToCourseFiles=false;this.m_uploadInlineHelpLangTerm="";this.m_maxFileSize=0;this.SetSrc("/d2l/common/dialogs/file/main.d2l","DialogCallback");this.SetSize(660, 520);var me=this;this.OnResize.RegisterMethod(function(width,height){me.CallSrcMethod("HandleResize",height)})},AddAreaFilter:function(area){area=area.toLowerCase();var found=false;for(var i=0;i<this.m_areaFilters.length;i++)if(this.m_areaFilters[i]==area){found=true;break}if(!found)this.m_areaFilters.push(area)},Close:function(){this.SetFooterText(new D2L.LP.Text.PlainText(""));arguments.callee.$.Close.call(this)},Open:function(opener){this.SetSrcParam("am",this.m_allowMultiple?"1":"0");this.SetSrcParam("fsc", this.m_forceSaveToCourseFiles?"1":"0");this.SetSrcParam("asc",this.m_allowSaveToCourseFiles?"1":"0");this.SetSrcParam("mfs",this.m_maxFileSize);this.SetSrcParam("afid",this.m_askForImageDesc);this.SetSrcParam("uih",this.m_uploadInlineHelpLangTerm);if(this.m_selectedArea.length>0){this.SetSrcParam("area",this.m_selectedArea);if(this.m_selectedAreaParam.length>0)this.SetSrcParam("sap",this.m_selectedAreaParam)}var paramVal="";var comma="";for(var i=0;i<this.m_areaFilters.length;i++){paramVal+=comma+ this.m_areaFilters[i];comma=","}this.SetSrcParam("af",paramVal);var openResult=arguments.callee.$.Open.call(this,opener);var nextButton,backButton;if(this.m_buttonsAdded){nextButton=this.GetButton("BTN_next");backButton=this.GetButton("BTN_back")}else{this.m_buttonsAdded=true;nextButton=this.AddPrimaryButton(D2L.Control.Button.Type.Next,"next","BTN_next");if(D2L.LP.Web.UI.Daylight.IsEnabled())backButton=this.AddCustomButton(new D2L.LP.Text.LangTerm("Standard.Buttons.btnBack"),D2L.Dialog.ButtonPosition.Left, D2L.Dialog.ResponseType.Negative,"back","BTN_back");this.AddSecondaryButton(D2L.Control.Button.Type.Cancel,"","BTN_cancel")}nextButton.SetIsDisplayed(false);if(backButton)backButton.SetIsDisplayed(false);return openResult},RemoveAreaFilter:function(area){area=area.toLowerCase();for(var i=0;i<this.m_areaFilters.length;i++)if(this.m_areaFilters[i]==area){this.m_areaFilters=this.m_areaFilters.splice(i);break}if(area==this.m_selectedArea)this.m_selectedArea=""},SetAllowMultiple:function(allowMultiple){this.m_allowMultiple= allowMultiple},SetAreaFilters:function(areaFilters){this.m_areaFilters=areaFilters},SetAskForImageDescription:function(askForImageDescription){this.m_askForImageDesc=askForImageDescription},SetMaxFileSize:function(maxFileSize){this.m_maxFileSize=maxFileSize},SetForceSaveToCourseFiles:function(bool){this.m_forceSaveToCourseFiles=bool},SetAllowSaveToCourseFiles:function(bool){this.m_allowSaveToCourseFiles=bool},SetUploadInlineHelpLangTerm:function(langTerm){this.m_uploadInlineHelpLangTerm=langTerm}, SetSelectedArea:function(selectedArea,param){if(selectedArea.length>0)this.AddAreaFilter(selectedArea);this.m_selectedArea=selectedArea;if(param!==undefined)this.m_selectedAreaParam=param},SetFileFilters:function(filters){if(!D2L.Util.JavaScript.IsArray(filters))filters=[filters];var paramVal="";var comma="";for(var i=0;i<filters.length;i++){paramVal+=comma+filters[i];comma=","}this.SetSrcParam("f",paramVal)}}); D2L.Dialog.SelectItem=D2L.Dialog.extend({Construct:function(callback){arguments.callee.$.Construct.call(this,UI.GetUniqueHtmlId(),callback);this.m_subject="";this.m_extensionPoint="";this.SetSize("975","650");this.AddPrimaryButton(D2L.Control.Button.Type.Next,"next","BTN_next");this.AddCustomButton(new D2L.LP.Text.LangTerm("Standard.Buttons.btnBack"),D2L.Dialog.ButtonPosition.Left,D2L.Dialog.ResponseType.Positive,"back","BTN_back");this.AddSecondaryButton(D2L.Control.Button.Type.Cancel,"","BTN_cancel")}, GetSubject:function(){return this.m_subject},Open:function(opener){if(this.m_extensionPoint!="")this.SetSrc("/d2l/common/dialogs/isf/selectItem.d2l?extensionPoint="+this.m_extensionPoint,"GetSelectedItem");else this.SetSrc("/d2l/common/dialogs/isf/selectItem.d2l","GetSelectedItem");this.SetSrcParam("subject",this.m_subject);this.SetSrcParam("filterMode","");this.SetSrcParam("extensionPoint",this.m_extensionPoint);return arguments.callee.$.Open.call(this,opener)},SetDialogBackButtonIsDisplayed:function(isDisplayed){var button= this.GetButton("BTN_back");if(button)button.SetIsDisplayed(isDisplayed)},SetDialogNextButtonText:function(text){var button=this.GetButton("BTN_next");if(button){button.SetText(new D2L.LP.Text.PlainText(text));button.SetIsDisplayed(true)}},SetDialogNextButtonIsEnabled:function(isEnabled){var button=this.GetButton("BTN_next");if(button)button.SetIsEnabled(isEnabled)},SetSubject:function(subject){this.m_subject=subject},SetExtensionPoint:function(ExtensionPoint){this.m_extensionPoint=ExtensionPoint}}); D2L.Dialog.SelectPath=D2L.Dialog.extend({Construct:function(callback){arguments.callee.$.Construct.call(this,UI.GetUniqueHtmlId(),callback);this.m_allowSharedFilesPaths=true;this.m_initialPath="";this.m_restrictToCurrentOrgUnit=true;this.AddCustomButton(new D2L.LP.Text.LangTerm("FrameworkWebPages.SelectPathDialog.titSelectPath"),D2L.Dialog.ButtonPosition.Left,D2L.Dialog.ResponseType.Positive,undefined,undefined,true);this.AddSecondaryButton(D2L.Control.Button.Type.Cancel);this.SetSize(400,400);this.SetTitle(new D2L.LP.Text.LangTerm("FrameworkWebPages.SelectPathDialog.titSelectPath")); this.SetFooterText(new D2L.LP.Text.LangTerm("FrameworkWebPages.SelectPathDialog.lblPleaseSelectPath"));this.SetSrc("/d2l/common/dialogs/selectPath/selectPath.d2l","SrcCallback");this.SetAllowSharedFilesPaths(true);this.SetRestrctToCurrentOrgUnit(true)},SetAllowSharedFilesPaths:function(allowSharedFilesPaths){this.m_allowSharedFilesPaths=allowSharedFilesPaths;this.SetSrcParam("asfp",allowSharedFilesPaths?"1":"0")},SetInitialPath:function(initialPath){this.m_initialPath=initialPath;this.SetSrcParam("initialPath", this.m_initialPath)},SetInstructions:function(instructions){this.m_instructions=instructions;this.SetSrcParam("instructions",this.m_instructions)},SetRestrctToCurrentOrgUnit:function(restrictToCurrentOrgUnit){this.m_restrictToCurrentOrgUnit=restrictToCurrentOrgUnit;this.SetSrcParam("r",this.m_restrictToCurrentOrgUnit?"1":"0")}}); D2L.Dialog.SpellChecker=D2L.Dialog.extend({Construct:function(callback,text,isTextHtml){arguments.callee.$.Construct.call(this,UI.GetUniqueHtmlId(),callback);this.SetSize(500,450);this.SetSrc("/d2l/common/dialogs/spellChecker/spellChecker.d2l","SrcCallback");if(text!==undefined)this.SetSrcParam("text",text);if(isTextHtml!==undefined)this.SetSrcParam("isTextHtml",isTextHtml);this.AddCustomButton(new D2L.LP.Text.LangTerm("Standard.Buttons.btnApply"),D2L.Dialog.ButtonPosition.Left,D2L.Dialog.ResponseType.Positive, undefined,undefined,true);this.AddCustomButton(new D2L.LP.Text.LangTerm("Standard.Buttons.btnCancel"),D2L.Dialog.ButtonPosition.Left,D2L.Dialog.ResponseType.Negative,undefined,undefined,false)},SetText:function(text){this.SetSrcParam("text",text)},SetIsTextHtml:function(isTextHtml){this.SetSrcParam("isTextHtml",isTextHtml)},SetPreviewText:function(perviewText){this.SetSrcParam("hasDiffPreviewText",true);this.SetSrcParam("previewText",perviewText)},SetIsPreviewTextHtml:function(isPreviewTextHtml){this.SetSrcParam("isPreviewTextHtml", isPreviewTextHtml)}}); D2L.Dialog.VideoCapture=D2L.Dialog.extend({Construct:function(src,callback){arguments.callee.$.Construct.call(this,UI.GetUniqueHtmlId(),callback);this.AddPrimaryButton(D2L.Control.Button.Type.Add,"add","BTN_addVideoCapture");this.AddSecondaryButton(D2L.Control.Button.Type.Cancel);this.SetSrc(src,"VideoCaptureDialogCallback");this.SetSize(600,400);var me=this;this.OnOpen.RegisterMethod(function(){me.SetAddButtonIsEnabled(false)})},Close:function(){this.SetFooterText(new D2L.LP.Text.PlainText(""));arguments.callee.$.Close.call(this)}, Open:function(opener){return arguments.callee.$.Open.call(this,opener)},SetAddButtonIsEnabled:function(isEnabled){var button=this.GetButton("BTN_addVideoCapture");if(button)button.SetIsEnabled(isEnabled)}}); D2L.Dialog.Warning=D2L.Dialog.Prompt.extend({Construct:function(name,primaryMessage,secondaryMessage){arguments.callee.$.Construct.call(this,name,undefined,primaryMessage,secondaryMessage);this.m_closeIconResponseType=D2L.Dialog.ResponseType.Positive;this.SetPositiveButtonText(new D2L.LP.Text.LangTerm("Standard.Buttons.btnOk"));this.SetHasCloseIcon(false);this.SetTitle(new D2L.LP.Text.LangTerm("Framework.Dialog.titWarning"))}});D2L.DisplayGroups={}; D2L.DisplayGroups.DisplayGroupManager=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_groups={}},DeserializeMin:function(deserializer){this.m_groups=deserializer.GetDictionaryMin("string",D2L.DisplayGroups.DisplayGroupData)},GetGroup:function(groupName){groupName=groupName.toLowerCase();if(this.m_groups[groupName])return UI.GetControl(this.m_groups[groupName].ControlId.ID(),this.m_groups[groupName].ControlId.SID());else return null},GetGroupControls:function(groupControlId){var controls= [];for(var name in this.m_groups){var data=this.m_groups[name];if(data.ControlId.ID()==groupControlId.ID()&&data.ControlId.SID()==groupControlId.SID())return data.Controls}return controls},Init:function(){for(var name in this.m_groups){var group=this.GetGroup(name);if(group!==null)group.Init()}},SetControlDisplayGroup:function(controlId,groupControlId){}}); D2L.DisplayGroups.DisplayGroupData=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.ControlId=null;this.Controls=[]},DeserializeMin:function(deserializer){this.ControlId=deserializer.GetObjectMin(D2L.Control.Id);this.Controls=deserializer.GetObjectArrayMin(D2L.DisplayGroups.DisplayGroupControl)}}); D2L.Control.DisplayGroup=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.isDisplayed=true;this.m_controls=[]},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);this.isDisplayed=deserializer.GetBoolean();this.m_controls=UI.GetDisplayGroupManager().GetGroupControls(this.GetControlId())},Init:function(){for(var i=0;i<this.m_controls.length;i++)this.m_controls[i].Init()},GetState:function(serializer){serializer.AddMember("IsDisplayed", this.IsDisplayed())},IsDisplayed:function(){return this.isDisplayed},Show:function(){this.SetIsDisplayed(true)},Hide:function(){this.SetIsDisplayed(false)},SetIsDisplayed:function(isDisplayed){UI.GetDisplayGroupManager();for(var i=0;i<this.m_controls.length;i++)this.m_controls[i].SetIsDisplayed(isDisplayed);this.isDisplayed=isDisplayed}});D2L.DisplayGroups.DisplayGroup=D2L.Control.DisplayGroup;D2L.DisplayGroup=D2L.Control.DisplayGroup; D2L.DisplayGroups.DisplayGroupControl=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_type=D2L.DisplayGroups.DisplayGroupType.Object;this.m_mappedId="";this.m_control=null},DeserializeMin:function(deserializer){this.m_type=deserializer.GetMember();this.m_mappedId=deserializer.GetMember()},Init:function(){var me=this;var InstallExpand=function(domNode){if(domNode!==null){me.AttachObject(domNode,"ID2LOnExpand",new D2L.EventHandler);domNode.ID2LOnExpand.RegisterMethod(function(){me.SetIsDisplayed(true)})}}; if(this.m_control===null)if(this.m_type==D2L.DisplayGroups.DisplayGroupType.Object){this.m_control=UI.GetControlMap().GetControlByMappedId(this.m_mappedId);InstallExpand(this.m_control.GetDomNode())}else{this.m_control=UI.GetById(this.m_mappedId);InstallExpand(this.m_control)}},SetIsDisplayed:function(isDisplayed){this.Init();if(this.m_control!==null){if(this.m_type==D2L.DisplayGroups.DisplayGroupType.Object)this.m_control.SetIsDisplayed(isDisplayed);else if(isDisplayed)if(this.m_type==D2L.DisplayGroups.DisplayGroupType.Block)this.m_control.style.display= "block";else if(this.m_type==D2L.DisplayGroups.DisplayGroupType.Inline)this.m_control.style.display="inline";else{if(this.m_type==D2L.DisplayGroups.DisplayGroupType.TableRow)if(UI.GetBrowserInfo().Type==D2L.UI.BrowserType.IE)this.m_control.style.display="inline";else this.m_control.style.display="table-row"}else this.m_control.style.display="none";if(this.m_type!=D2L.DisplayGroups.DisplayGroupType.Object){var tEvent=new D2L.TransformEvent(this.m_control);tEvent.Bubble();if(isDisplayed)(new D2L.DisplayVisibleEvent(this.m_control)).Bubble()}}}}); D2L.DisplayGroups.DisplayGroupType={Block:0,Inline:1,Object:2,TableRow:3};D2L.DragDrop={m_manager:null,GetManager:function(){if(D2L.DragDrop.m_manager===null)D2L.DragDrop.m_manager=new D2L.DragDrop.Manager;return D2L.DragDrop.m_manager}};D2L.DragDrop.Modes={None:0,DraggableDroppable:1,Draggable:2,Droppable:3}; D2L.Control.Edit=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_blurEvent=new D2L.EventHandler;this.m_isDisplayed=true;this.m_isEnabled=true;this.m_keyPressEvent=new D2L.EventHandler;this.m_text=new D2L.LP.Text.PlainText;this.m_title=new D2L.LP.Text.PlainText;this.m_width=-1},BlurEvent:function(){return this.m_blurEvent},BuildDom:function(){if(this.IsRendered())return;arguments.callee.$.BuildDom.call(this);var domNode=this.SetDomNode(this.GetUI().CreateElement("input")); domNode.type="text";domNode.name=this.GetMappedId();domNode.className="d2l-edit";if(this.m_width>0)domNode.style.width=this.m_width+"px";else domNode.size=50;if(this.m_text)this.SetText(this.m_text);if(this.m_title)this.SetTitle(this.m_title);this.SetIsEnabled(this.IsEnabled());this.SetIsDisplayed(this.IsDisplayed());this.AttachObject(this.GetDomNode(),"onchange",function(evt){WindowEventManager.BC(this,evt)});this.InstallEvents()},Clear:function(triggerChange){if(triggerChange===undefined)triggerChange= false;this.m_text=new D2L.LP.Text.PlainText;if(this.IsRendered()){this.GetDomNode().value="";if(triggerChange)WindowEventManager.BC(this.GetDomNode())}},Focus:function(){if(this.IsRendered())this.GetDomNode().focus()},GetMultiEditValue:function(){if(this.IsEnabled()&&this.IsRendered())return this.GetDomNode().value;return""},GetState:function(serializer){if(this.IsRendered())serializer.AddMember("Text",this.GetDomNode().value)},GetText:function(){if(this.IsRendered())return new D2L.LP.Text.PlainText(this.GetDomNode().value); else return this.m_text},GetTextAsString:function(){if(this.IsRendered())return this.GetDomNode().value;return""},GetTitle:function(){return this.m_title},GetValue:function(){return this.GetText().GetText()},GetValueNoDelay:function(){return this.GetTextAsString()},GetWidth:function(){return this.m_width},HasValue:function(){var dr=new D2L.Util.DelayedReturn;this.GetText().GetText().Register(function(text){dr.Trigger(text.trim().length>0)});return dr},HasValueNoDelay:function(){return this.GetTextAsString().trim().length> 0},InstallEvents:function(){var domNode=this.GetDomNode();var me=this;this.AttachObject(domNode,"onblur",function(evt){me.BlurEvent().Trigger(evt||window.event)});this.GetUI().GetWindowEventManager().InstallKpel(domNode,function(obj,evt){me.KeyPressEvent().Trigger(evt)})},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);var domNode=this.GetDomNode();if(domNode!==null){if(deserializer.HasMember())domNode.ID2L=null;this.m_isDisplayed=domNode.style.display!= "none";this.m_isEnabled=!domNode.disabled;this.m_text=new D2L.LP.Text.PlainText(domNode.value);this.m_title=new D2L.LP.Text.PlainText(domNode.getAttribute("title"));this.InstallEvents()}else{this.m_hasDomBeenBuilt=false;this.m_isEnabled=false}},IsDisplayed:function(){return this.m_isDisplayed},IsEnabled:function(){if(this.IsRendered())return!this.GetDomNode().disabled;else return this.m_isEnabled},KeyPressEvent:function(){return this.m_keyPressEvent},OpenSpellChecker:function(){var me=this;D2L.Util.SpellChecker.OpenSpellChecker(this.GetTextAsString(), false).Register(function(result){me.SetText(new D2L.LP.Text.PlainText(result))})},Select:function(){if(this.IsRendered())this.GetDomNode().select()},SetIsDisplayed:function(isDisplayed){if(this.IsRendered())this.GetDomNode().style.display=isDisplayed?"inline":"none";this.m_isDisplayed=isDisplayed},SetIsEnabled:function(isEnabled){this.m_isEnabled=isEnabled;if(this.IsRendered())this.GetDomNode().disabled=!isEnabled},SetIsInvalid:function(isInvalid){if(!this.IsRendered())return;this.GetDomNode().setAttribute("aria-invalid", isInvalid)},SetText:function(text,triggerChange){if(triggerChange===undefined)triggerChange=false;this.m_text=D2L.LP.Text.IText.Normalize(text,"D2L.Control.Edit","SetText","text");if(this.IsRendered()){this.m_text.AssignText(this.GetDomNode(),"value");if(triggerChange)WindowEventManager.BC(this.GetDomNode())}},SetTitle:function(title){this.m_title=title;if(this.IsRendered())this.m_title.AssignText(this.GetDomNode(),"title")},SetWidth:function(width){this.m_width=width;if(this.IsRendered())if(width> 0)this.GetDomNode().style.width=width+"px";else this.GetDomNode().style.width="auto"}});D2L.Control.Edit.InstallEvents=function(node){if(node.classList.contains("f-13585-legacy-input-keypress-events"))node.addEventListener("keypress",function(event){WindowEventManager.BKP(this,event)})}; D2L.Control.EditNumber=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_edit=null;this.m_validatorControlId=null},Clear:function(triggerChange){this.m_edit.Clear(triggerChange)},Focus:function(){this.m_edit.Focus()},GetStringValue:function(){return this.m_edit.GetTextAsString()},GetValidator:function(){return UI.GetControl(this.m_validatorControlId)},GetWidth:function(){return this.m_edit.GetWidth()},HasValue:function(){return this.m_edit.HasValue()},HasValueNoDelay:function(){return this.m_edit.HasValueNoDelay()}, IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);this.m_edit=UI.GetControl(this.GetMappedId()+"_edt");this.m_validatorControlId=deserializer.GetMember();this.SetDomNode(this.m_edit.GetDomNode())},IsDisplayed:function(){return this.m_edit.IsDisplayed()},IsEnabled:function(){return this.m_edit.IsEnabled()},IsEmpty:function(){return this.GetStringValue()==""},SetIsDisplayed:function(isDisplayed){this.m_edit.SetIsDisplayed(isDisplayed)},SetIsEnabled:function(isEnabled){this.m_edit.SetIsEnabled(isEnabled)}, SetIsInvalid:function(isInvalid){if(!this.m_edit)return;this.m_edit.SetIsInvalid(isInvalid)},SetStringValue:function(strValue,triggerChange){return this.m_edit.SetText(new D2L.LP.Text.PlainText(strValue),triggerChange)},SetWidth:function(width){this.m_edit.SetWidth(width)}}); D2L.Control.EditInteger=D2L.Control.EditNumber.extend({Construct:function(){arguments.callee.$.Construct.call(this)},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer)},GetInteger:function(){try{return D2L.Util.Integer.Parse(this.GetStringValue())}catch(e){return 0}},GetMultiEditValue:function(){if(this.IsEnabled()&&this.IsRendered())if(this.IsEmpty())return"";else if(this.IsValidInteger())return this.GetInteger().toString();else return this.GetStringValue(); return""},GetState:function(serializer){if(this.IsRendered())if(this.IsEmpty())serializer.AddMember("Text","");else if(this.IsValidInteger())serializer.AddMember("Text",this.GetInteger());else serializer.AddMember("Text",this.GetStringValue())},GetValidator:function(){return arguments.callee.$.GetValidator.call(this)},IsValidInteger:function(){try{D2L.Util.Integer.Parse(this.GetStringValue());return true}catch(e){return false}},SetInteger:function(integer,triggerChange){this.SetStringValue(D2L.Util.Integer.Format(integer), triggerChange)}}); D2L.Control.EditDecimal=D2L.Control.EditNumber.extend({Construct:function(){arguments.callee.$.Construct.call(this)},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer)},GetDecimal:function(){try{return D2L.Util.Decimal.Parse(this.GetStringValue())}catch(e){return 0}},GetMultiEditValue:function(){if(this.IsEnabled()&&this.IsRendered())if(this.IsEmpty())return"";else if(this.IsValidDecimal())return this.GetDecimal().toString();else return this.GetStringValue(); return""},GetState:function(serializer){if(this.IsRendered())if(this.IsEmpty())serializer.AddMember("Text","");else if(this.IsValidDecimal())serializer.AddMember("Text",this.GetDecimal());else serializer.AddMember("Text",this.GetStringValue())},GetValidator:function(){return arguments.callee.$.GetValidator.call(this)},IsValidDecimal:function(){try{D2L.Util.Decimal.Parse(this.GetStringValue());return true}catch(e){return false}},SetDecimal:function(decimalVal,triggerChange){this.SetStringValue(D2L.Util.Decimal.Format(decimalVal), triggerChange)},SetDecimalWithNumDecimalPlaces:function(decimalVal,numDecimalPlaces,triggerChange){this.SetStringValue(D2L.Util.Decimal.Format(decimalVal,numDecimalPlaces),triggerChange)}});D2L.Enablers={}; function d2l_EnablerManager(){this.enablerTargetLists=new Object;this.enablers=new Object;this.enablerTargetStack=new Array;this.enablerTargets=new Array;this.enablerTargetStackIndex=-1;this.radioGroups=new Object;this.OpenEnablerTarget=function(key,keyOp){var keyList=key.split(",");var et=new d2l_EnablerTarget(keyList,keyOp);for(var i=0;i<keyList.length;i++){var etList=this.enablerTargetLists[keyList[i]];if(etList)etList[etList.length]=et;else{etList=new Array;etList[0]=et;this.enablerTargetLists[keyList[i]]= etList}}this.enablerTargetStackIndex++;this.enablerTargetStack[this.enablerTargetStackIndex]=et;this.enablerTargets[this.enablerTargets.length]=et};this.CloseEnablerTarget=function(){this.enablerTargetStackIndex--};this.AddEnabler=function(key,e){this.enablers[key]=e};this.AddEnablerTargetItem=function(eti){this.enablerTargetStack[this.enablerTargetStackIndex].AddEnablerTargetItem(eti)};this.ResetState=function(key){for(var i=0;i<this.enablerTargets.length;i++)this.enablerTargets[i].ResetState()}; this.SetInitialState=function(){this.ResetState();var radioGroup;var currRb;var oldOnClick;for(radioGroup in this.radioGroups){currRb=UI.GetByName(radioGroup);if(currRb.length)for(var i=0;i<currRb.length;i++)this.AddRadioOnClick(currRb[i]);else this.AddRadioOnClick(currRb)}};this.AddRadioOnClick=function(rb){if(rb.onclick)rb.onclick=new Function("EnablerManager.ResetState();this.oldOnClick="+rb.onclick+";this.oldOnClick();");else rb.onclick=new Function("EnablerManager.ResetState();")};this.AddRadioGroup= function(name){this.radioGroups[name]=0}}function Base_IEnablerTargetItem(obj){obj.IEnablerTargetItem=new IEnablerTargetItem(obj)}function Base_IEnabler(key,obj){obj.IEnabler=new IEnabler(key,obj)}function Object_IEnablerTargetItem(c){c.IEnablerTargetItem=new Object;c.IEnablerTargetItem.Enable=function(){c.SetIsEnabled(true)};c.IEnablerTargetItem.Disable=function(){c.SetIsEnabled(false)}} function d2l_EnablerTarget(keyList,keyOp){this.keyList=keyList;this.keyOp=keyOp.toLowerCase();this.enablerTargetItems=new Array;this.AddEnablerTargetItem=function(eti){this.enablerTargetItems[this.enablerTargetItems.length]=eti};this.ResetState=function(){var isStateEnabled=false;var numEnablers=0;var numEnabled=0;var currEnabler;for(var i=0;i<this.keyList.length;i++){currEnabler=EnablerManager.enablers[this.keyList[i]];if(currEnabler){numEnablers++;var currIsEnabled=currEnabler.IEnabler.IsEnabled(); if(currIsEnabled)numEnabled++;if(this.keyOp==="or"){if(currIsEnabled){isStateEnabled=true;break}}else if(this.keyOp==="nand")if(!currIsEnabled){isStateEnabled=true;break}}}if(numEnablers===0)isStateEnabled=true;if(this.keyOp==="and"&&numEnabled===numEnablers)isStateEnabled=true;var currTargetItem;for(var x=0;x<this.enablerTargetItems.length;x++){currTargetItem=this.enablerTargetItems[x];if(isStateEnabled)currTargetItem.IEnablerTargetItem.Enable();else currTargetItem.IEnablerTargetItem.Disable()}}} var IEnablerTargetItem=D2L.Class.extend({Construct:function(obj){arguments.callee.$.Construct.call(this);this.obj=obj},Dispose:function(){arguments.callee.$.Dispose.call(this);if(this.obj)this.obj.IEnablerTargetItem=null},Enable:function(){this.obj.disabled=false},Disable:function(){this.obj.disabled=true}}); var IEnabler=D2L.Class.extend({Construct:function(key,obj){arguments.callee.$.Construct.call(this);this.key=key;this.obj=obj},Dispose:function(){arguments.callee.$.Dispose.call(this);if(this.obj)this.obj.IEnabler=null},IsEnabled:function(){return!this.obj.disabled&&this.obj.checked},ResetState:function(){EnablerManager.ResetState()}}); function d2l_SelectListEnabler(key,selectList,optKey){this.obj=selectList;this.key=key;this.optKey=optKey;this.IEnabler=this;this.IsEnabled=function(){var isEnabled=false;var selectedOption=this.obj.GetSelectedOption();if(selectedOption)isEnabled=this.obj.IsEnabled()&&selectedOption.key==this.optKey;return isEnabled};this.ResetState=function(){EnablerManager.ResetState()}} function SelectList_IEnabler(key,selectList,optKey){var enabler=new d2l_SelectListEnabler(key,selectList,optKey);if(!selectList.Enablers||selectList.Enablers&&selectList.Enablers===null)CreateEnablerCollection(selectList);selectList.Enablers.Add(enabler);return enabler} function CreateEnablerCollection(obj){var enbColl=new Object;enbColl._collection=new Array;enbColl.Add=function(enabler){this._collection.push(enabler)};enbColl.ResetEnablers=function(){for(var index in this._collection){var enabler=this._collection[index];enabler.ResetState()}};obj.Enablers=enbColl} D2L.Control.Enabler=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_isEnabled=true;var me=this;this.IEnabler={key:"",IsEnabled:function(){return me.IsEnabled()},ResetState:function(){EnablerManager.ResetState()}};this.IEnablerTargetItem={Enable:function(){me.Enable()},Disable:function(){me.Disable()}}},IntegrateControlMin:function(deserializer){this.m_isEnabled=deserializer.GetBoolean();this.IEnabler.key=deserializer.GetMember()},Enable:function(){this.SetIsEnabled(true)}, Disable:function(){this.SetIsEnabled(false)},IsEnabled:function(){return this.m_isEnabled},SetIsEnabled:function(isEnabled){if(isEnabled!=this.m_isEnabled){this.m_isEnabled=isEnabled;this.IEnabler.ResetState()}},ToggleEnabled:function(){this.SetIsEnabled(!this.IsEnabled())}}); D2L.Control.Field=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_fieldRow1=null;this.m_fieldRow2=null;this.m_hasChanged=false;this.m_showChanges=false;this.m_isFieldSet=false;this.m_textLocation=D2L.Control.Field.TextLocation.Left;this.OnShowChange=new D2L.EventHandler},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);this.m_isFieldSet=deserializer.GetBoolean();this.m_hasChanged=deserializer.GetBoolean(); this.m_textLocation=deserializer.GetMember();this.m_showChanges=deserializer.GetBoolean();if(this.m_textLocation==D2L.Control.Field.TextLocation.Top){this.m_fieldRow1=this.GetDomNode().previousSibling;this.m_fieldRow2=this.GetDomNode()}else this.m_fieldRow1=this.GetDomNode()},GetState:function(serializer){serializer.AddMember("HasChanged",this.m_hasChanged)},HandleOnChange:function(event){if(!event.hasChangeBeenShown&&this.m_showChanges){if(!this.m_hasChanged)this.SetHasChanged(true);this.OnShowChange.Trigger(); event.hasChangeBeenShown=true}},HandleOnChangeReset:function(){if(this.m_showChanges){this.m_hasChanged=false;if(this.m_fieldRow1!==null)$(this.m_fieldRow1).removeClass("vui-changed");if(this.m_fieldRow2!==null)$(this.m_fieldRow2).removeClass("vui-changed")}},HandleOnTransform:function(event){if(this.m_fieldRow1.cells.length==2)this.m_fieldRow1.cells[0].style.paddingTop="0.3em";var me=this;setTimeout(function(){D2L.Control.Field.DoAlignment(me.GetDomNode());D2L.Control.Field.AdjustForFieldSet(me.GetDomNode())}, 0)},HandleOnDisplayVisible:function(event){var me=this;setTimeout(function(){D2L.Control.Field.AdjustForFieldSet(me.GetDomNode())},0)},HasChanged:function(){return this.m_hasChanged},SetHasChanged:function(hasChanged){this.m_hasChanged=hasChanged;if(this.m_fieldRow1!==null)$(this.m_fieldRow1).toggleClass("vui-changed",hasChanged);if(this.m_fieldRow2!==null)$(this.m_fieldRow2).toggleClass("vui-changed",hasChanged)},Hide:function(){UI.GetMessageArea().AddWarningMessage(new D2L.LP.Text.PlainText("Field.Hide() is obsolete. Please use "+ "SetIsDisplayed() instead."),true);this.SetIsDisplayed(false)},SetIsDisplayed:function(isDisplayed){var display="none";if(isDisplayed)if(UI.GetBrowserInfo().Type==D2L.UI.BrowserType.IE)display="inline";else display="table-row";if(this.m_fieldRow1!==null)this.m_fieldRow1.style.display=display;if(this.m_fieldRow2!==null)this.m_fieldRow2.style.display=display;var tEvent=new D2L.TransformEvent(this.GetDomNode());tEvent.Bubble()},SetText:function(text){var daylight=D2L.LP.Web.UI.Daylight.IsEnabled();text= D2L.LP.Text.IText.Normalize(text,"D2L.Control.Field","SetText","text");if(this.IsRendered()){var span=this.m_fieldRow1.cells[0].firstChild.firstChild;if(span.firstChild){D2L.Util.Dom.Purge(span.firstChild);span.removeChild(span.firstChild)}var me=this;text.GetText().Register(function(val){span.appendChild(me.CreateTextNode(val+":"));if(daylight){var label=me.m_fieldRow1.cells[0].firstChild;label.classList.remove("d2l-field-label-empty")}})}},Show:function(){UI.GetMessageArea().AddWarningMessage(new D2L.LP.Text.PlainText("Field.Show() is obsolete. Please use "+ "SetIsDisplayed() instead."),true);this.SetIsDisplayed(true)}});D2L.Control.Field.TextLocation={Left:0,Top:1,None:2}; D2L.Control.Field.InstallEvents=function(domNode,GetControl){var me=null;if(domNode.ID2LOnChange===undefined)UI.AttachObject(domNode,"ID2LOnChange",new D2L.EventHandler);domNode.ID2LOnChange.RegisterMethod(function(evt){if(me===null)me=GetControl();me.HandleOnChange(evt)});if(domNode.ID2LOnTransform===undefined)UI.AttachObject(domNode,"ID2LOnTransform",new D2L.EventHandler);if(domNode.ID2LOnDisplayVisible===undefined)UI.AttachObject(domNode,"ID2LOnDisplayVisible",new D2L.EventHandler);domNode.ID2LOnDisplayVisible.RegisterMethod(function(evt){if(me=== null)me=GetControl();me.HandleOnDisplayVisible()});domNode.ID2LOnTransform.RegisterMethod(function(evt){if(me===null)me=GetControl();me.HandleOnTransform()});FormManager.OnChangeReset.RegisterMethod(function(){if(me===null)me=GetControl();me.HandleOnChangeReset()});D2L.Control.Field.DoAlignment(domNode);D2L.Control.Field.AdjustForFieldSet(domNode)}; D2L.Control.Field.AdjustForFieldSet=function(domNode){try{if(D2L.Util.Dom.HasClassName("D2LIFS",domNode)||D2L.Util.Dom.HasClassName("D2LIFS_TOP",domNode)){var textLocation=D2L.Control.Field.TextLocation.Left;if(domNode.childNodes.length==1)textLocation=D2L.Control.Field.TextLocation.None;if(D2L.Util.Dom.HasClassName("D2LIFS_TOP",domNode))textLocation=D2L.Control.Field.TextLocation.Top;var labelCell=null;var contentCell=null;if(textLocation==D2L.Control.Field.TextLocation.Left){labelCell=domNode.cells[0]; contentCell=domNode.cells[1]}else if(textLocation==D2L.Control.Field.TextLocation.Top){labelCell=domNode.previousSibling.cells[0];contentCell=domNode.cells[0]}else if(textLocation==D2L.Control.Field.TextLocation.None){labelCell=null;contentCell=domNode.cells[0]}if(labelCell!=null&&textLocation!=D2L.Control.Field.TextLocation.Top){var legendNode=contentCell.firstChild.firstChild;var labelNode=labelCell.firstChild;var width=labelNode.offsetWidth;if(width>0&&legendNode.className=="dsr"){var leftPosition= UI.GetCulture().GetMarginPaddingPosition(D2L.Culture.MarginPaddingPosition.First);var rightPosition=UI.GetCulture().GetMarginPaddingPosition(D2L.Culture.MarginPaddingPosition.Second);legendNode.style.width=width+"px";legendNode.style["margin"+leftPosition]=-width+"px";legendNode.style[leftPosition.toLowerCase()]="-0.2em";if(labelCell.d2lLegendPaddingTop!==undefined)legendNode.style.paddingTop=labelCell.d2lLegendPaddingTop+"em";legendNode.className="dfs_l_f";labelCell.style.visibility="hidden"}}}}catch(e){}}; D2L.Control.Field.DoAlignment=function(domNode){if(domNode.cells.length==2){var field,content,fieldY,contentY,fieldMid,contentMid;var field=domNode.cells[0];var content=domNode.cells[1];var FindElem=function(node){var className=node.className!==undefined?node.className:"";var tagName=node.tagName!==undefined?node.tagName.toLowerCase():"";var isDisplayed=node.style&&node.style.display=="none"?false:true;if(node.nodeType==1)if(className=="dsr"||className=="fgskip"||!isDisplayed||tagName=="input"&&node.type.toLowerCase()== "hidden")return null;else{if(tagName=="select"||tagName=="applet"||tagName=="object")return node}else if(node.nodeType==3)if(node.data.trim().length==0)return null;else return node;if(tagName=="table"){for(var i=0;i<node.rows.length;i++)if(node.rows[i].style.display!="none")for(var j=0;j<node.rows[i].cells.length;j++)for(var k=0;k<node.rows[i].cells[j].childNodes.length;k++){var elem=FindElem(node.rows[i].cells[j].childNodes[k]);if(elem!==null)return elem}return null}else{for(var i=0;i<node.childNodes.length;i++){var elem= FindElem(node.childNodes[i]);if(elem!==null)return elem}return node}};var content=FindElem(content);if(content&&content.parentNode){var space=document.createElement("span");if(field.firstChild)space=field.insertBefore(space,field.firstChild);else space=field.appendChild(space);space.appendChild(document.createTextNode("\ufeff"));fieldY=D2L.Util.Dom.FindPosY(space);fieldMid=Math.round((fieldY+(fieldY+space.offsetHeight))/2);var space2=document.createElement("span");space2=content.parentNode.insertBefore(space2, content);space2.appendChild(document.createTextNode("\ufeff"));contentY=D2L.Util.Dom.FindPosY(space2);contentMid=Math.round((contentY+(contentY+space2.offsetHeight))/2);if(contentMid>fieldMid){var cellTopPadding=(contentMid-fieldMid)/UI.GetRelativeFontSizeManager().GetBaseFontSize()+0.3;field.style.paddingTop=cellTopPadding+"em";if(field.parentNode&&(D2L.Util.Dom.HasClassName("D2LIFS",field.parentNode)||D2L.Util.Dom.HasClassName("D2LIFS_TOP",field.parentNode)))field.d2lLegendPaddingTop=cellTopPadding- 0.3}D2L.Util.Dom.Purge(space);space.parentNode.removeChild(space);space=null;D2L.Util.Dom.Purge(space2);space2.parentNode.removeChild(space2);space2=null}}}; D2L.Control.Field.GetFieldParentText=function(control){var domNode=control.GetDomNode();if(domNode!==null&&domNode.parentNode&&domNode.parentNode.className){var span=null;if(domNode.parentNode.className=="fcl_w")span=domNode.parentNode.previousSibling.firstChild.lastChild;else if(domNode.parentNode.className=="fct_w")span=domNode.parentNode.parentNode.previousSibling.firstChild.firstChild.lastChild;if(span!==null){var text=span.innerHTML;if(text.endsWith(":"))text=text.substr(0,text.length-1);return new D2L.LP.Text.PlainText(text)}}return null}; D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-fieldgroup-track-changes",function(node){var fields=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("vui-change-tracker",node);for(var i=0;i<fields.length;i++){var childNode=fields[i];if(childNode.ID2LOnChange===undefined)UI.AttachObject(childNode,"ID2LOnChange",new D2L.EventHandler);(function(index){childNode.ID2LOnChange.RegisterMethod(function(evt){if(!evt.hasChangeBeenShown){$(fields[index]).addClass("vui-changed");evt.hasChangeBeenShown=true}})})(i)}}); D2L.Control.HiddenPropertyGroup=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_isModified=false;this.m_infoIsDisplayed=false;this.m_infoText=new D2L.LP.Text.PlainText("");this.m_isFieldGroup=false;this.m_isOpened=true;this.m_openedText=new D2L.LP.Text.PlainText("");this.m_text=new D2L.LP.Text.PlainText("");this.m_header=null;this.m_icon=null;this.m_infoBar=null;this.m_contents=null;this.m_fields=[];this.m_showChanges=true},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this, deserializer);this.m_isOpened=deserializer.GetBoolean();this.m_isFieldGroup=deserializer.GetBoolean();this.m_text=new D2L.LP.Text.PlainText(deserializer.GetMember());this.m_openedText=new D2L.LP.Text.PlainText(deserializer.GetMember());this.m_infoText=new D2L.LP.Text.PlainText(deserializer.GetMember());this.m_infoIsDisplayed=deserializer.GetBoolean();this.m_isModified=deserializer.GetBoolean();this.m_fields=deserializer.GetMember();this.m_showChanges=deserializer.GetBoolean();this.m_icon=UI.GetControl(this.GetMappedId()+ "_icon");if(this.m_isFieldGroup)this.m_header=this.GetDomNode().cells[0].firstChild;else{this.m_header=this.GetDomNode();this.m_contents=this.m_header.nextSibling}this.m_infoBar=this.m_header.childNodes[this.m_header.childNodes.length-1];var me=this;var Attach=function(container){me.AttachObject(container,"ID2LOnExpand",new D2L.EventHandler);container.ID2LOnExpand.Register(me,"Open");if(container.ID2LOnChange===undefined)me.AttachObject(container,"ID2LOnChange",new D2L.EventHandler);container.ID2LOnChange.RegisterMethod(function(){me.m_isModified= true})};if(!this.m_isFieldGroup)Attach(this.m_contents);else{var rowIndex=this.GetDomNode().rowIndex+1;var row=null;for(var i=0;i<this.m_fields.length;i++){Attach(this.GetDomNode().parentNode.rows[rowIndex]);rowIndex++;if(this.m_fields[i]==D2L.Control.Field.TextLocation.Top){Attach(this.GetDomNode().parentNode.rows[rowIndex]);rowIndex++}}}},Close:function(){if(this.m_isFieldGroup){var rowIndex=this.GetDomNode().rowIndex+1;var row=null;for(var i=0;i<this.m_fields.length;i++){row=this.GetDomNode().parentNode.rows[rowIndex]; row.style.display="none";rowIndex++;if(this.m_fields[i]==D2L.Control.Field.TextLocation.Top){row=this.GetDomNode().parentNode.rows[rowIndex];row.style.display="none";rowIndex++}}}else this.m_contents.style.display="none";this.m_icon.SetImage(new D2L.Images.ImageTerm("Shared.Main.actShow"));this.m_icon.SetText(this.m_text);if(this.m_isModified&&this.m_showChanges)this.m_header.className="D2LModified";if(this.m_infoIsDisplayed)this.ShowInfo();this.m_isOpened=false;var tEvent=new D2L.TransformEvent(this.m_header); tEvent.Bubble()},GetState:function(serializer,stateType){if(stateType=="showchanges")serializer.AddMember("IsModified",this.m_isModified);else serializer.AddMember("IsOpened",this.m_isOpened)},HideInfo:function(){this.m_infoBar.style.display="none"},IsOpen:function(){return this.m_isOpened},Open:function(){if(this.m_isFieldGroup){var rowIndex=this.GetDomNode().rowIndex+1;var row=null;for(var i=0;i<this.m_fields.length;i++){row=this.GetDomNode().parentNode.rows[rowIndex];row.style.display="table-row"; (new D2L.DisplayVisibleEvent(row)).Bubble();rowIndex++;if(this.m_fields[i]==D2L.Control.Field.TextLocation.Top){row=this.GetDomNode().parentNode.rows[rowIndex];row.style.display="table-row";(new D2L.DisplayVisibleEvent(row)).Bubble();rowIndex++}}}else{this.m_contents.style.display="block";(new D2L.DisplayVisibleEvent(this.m_contents)).Bubble()}this.m_icon.SetImage(new D2L.Images.ImageTerm("Shared.Main.actHide"));this.m_icon.SetText(this.m_openedText);if(this.m_isModified)this.m_header.className=""; if(this.m_infoIsDisplayed)this.HideInfo();this.m_isOpened=true;var tEvent=new D2L.TransformEvent(this.m_header);tEvent.Bubble();D2L.LP.Web.UI.Events.OnVisibilityChange.Trigger(document.body,true)},ShowInfo:function(){this.m_infoBar.style.display="block"},SetInfoIsDisplayed:function(infoIsDisplayed){this.m_infoIsDisplayed=infoIsDisplayed;if(!this.m_isOpened)if(infoIsDisplayed)this.ShowInfo();else this.HideInfo()},Toggle:function(){if(this.IsOpen())this.Close();else this.Open()}}); D2L.Control.MultiFileInput=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.input_id=null},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);this.m_input_id=deserializer.GetMember()},Focus:function(){var id=new D2L.LP.Web.UI.Html.AbsoluteHtmlId(this.input_id);var uploadButtonId=D2L.LP.Web.UI.Desktop.Controls.FileInput.GetUploadButtonId(id);var uploadButton=D2L.LP.Web.UI.Html.Dom.GetElementById(uploadButtonId); uploadButton.focus()},Children:function(){var id=new D2L.LP.Web.UI.Html.AbsoluteHtmlId(this.input_id);var fileParam=D2L.LP.Web.UI.Desktop.Controls.FileInput.GetParam(id);var files=fileParam.GetFiles();var fileList=[];for(var i=0;i<files.length;i++)if(files[i].GetActionType()=="Add"){var fileWrapper=new Object;fileWrapper.m_fileObj=files[i];fileWrapper.GetFile=function(){return this.m_fileObj};fileList.push(fileWrapper)}return fileList}}); D2L.Control.MultiFileInput.ValidateRequired=function(obj,id){id=new D2L.LP.Web.UI.Html.AbsoluteHtmlId(id);var fileParam=D2L.LP.Web.UI.Desktop.Controls.FileInput.GetParam(id);var files=fileParam.GetFiles();for(var i=0;i<files.length;i++)if(files[i].GetActionType()=="Add")return true;return false}; D2L.Control.SingleFileInput=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.input_id=null},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);this.m_input_id=deserializer.GetMember()},Focus:function(){var id=new D2L.LP.Web.UI.Html.AbsoluteHtmlId(this.input_id);var uploadButtonId=D2L.LP.Web.UI.Desktop.Controls.FileInput.GetUploadButtonId(id);var uploadButton=D2L.LP.Web.UI.Html.Dom.GetElementById(uploadButtonId); uploadButton.focus()}});D2L.Control.SingleFileInput.ValidateRequired=function(obj,id){id=new D2L.LP.Web.UI.Html.AbsoluteHtmlId(id);var fileParam=D2L.LP.Web.UI.Desktop.Controls.FileInput.GetParam(id);var files=fileParam.GetFiles();for(var i=0;i<files.length;i++)if(files[i].GetActionType()=="Add")return true;return false}; D2L.Control.FileLink=D2L.Control.extend({Construct:function(file,source){if(file===undefined)file=null;if(source===undefined)source=null;arguments.callee.$.Construct.call(this);this.m_displayInBrowser=false;this.m_iconIsDisplayed=true;this.m_img=null;this.m_link=null;this.m_name="";this.m_navigation="";this.m_size=0;this.m_sizeIsDisplayed=true;this.m_sizeNode=null;this.m_text=new D2L.LP.Text.PlainText("");this.m_fileName="";this.m_textIsOveridden=false;this.m_altIsOveridden=false;this.m_textNode= null;this.m_textFormat=D2L.Control.TextFormat.Normal;this.m_alt=new D2L.LP.Text.PlainText("");this.m_limitChars=50;this.m_hasLink=true;this.m_source=source;if(file)this.SetFile(file,false)},BuildDom:function(){if(this.IsRendered())return;arguments.callee.$.BuildDom.call(this);if(!this.GetDomNode()){this.SetDomNode(this.CreateElement("span"));this.GetDomNode().className=this.GetTextFormat()==D2L.Control.TextFormat.Bold?"dfl dfl_b":"dfl"}var parent=this.GetDomNode();if(this.m_hasLink){this.m_link=this.CreateElement("a"); this.GetDomNode().appendChild(this.m_link);parent=this.m_link;var dotIndex=this.m_fileName.lastIndexOf(".");if(dotIndex>-1){var extension=this.m_fileName.substr(dotIndex);if(extension==".d2lresource"||this.m_displayInBrowser)this.m_link.target="_blank"}}if(this.IconIsDisplayed()){this.m_img=this.CreateElement("img");this.m_img.src="/d2l/img/lp/pixel.gif";this.m_img.width=1;this.m_img.height=1;this.m_img.alt="";if(parent.firstChild)parent.insertBefore(this.m_img,parent.firstChild);else parent.appendChild(this.m_img); if(this.m_fileName.length>0){var me=this;D2L.Files.GetFileTypeInfo(this.m_fileName).Register(function(fileTypeInfo){fileTypeInfo.GetImage().Assign(me.m_img)})}}if(this.m_textNode===null){this.m_textNode=this.CreateElement("span");parent.appendChild(this.m_textNode)}this.SetNavigation(this.m_navigation);this.SetText(this.m_text);this.SetAlt(this.m_alt);if(this.SizeIsDisplayed()){this.m_sizeNode=this.CreateElement("span");this.GetDomNode().appendChild(this.m_sizeNode);this.SetSize(this.m_size)}if(this.m_source!= null){var sourceSpan=this.CreateElement("span");sourceSpan.className="dfl_s";sourceSpan.style.paddingLeft="19px";sourceSpan.appendChild(this.CreateTextNode(new D2L.LP.Text.LangTerm("Framework.FileSelector.lblSource")));var trimmedSource=this.m_source;if(trimmedSource.length>60)trimmedSource="..."+trimmedSource.substr(trimmedSource.length-60);sourceSpan.appendChild(this.CreateTextNode(trimmedSource));this.AppendChild(sourceSpan);var me=this;setTimeout(function(){if(me.m_img)sourceSpan.style.paddingLeft= me.m_img.offsetWidth+"px"},0)}},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);this.SetFile(new D2L.Files.FileInfo(deserializer.GetMember(),deserializer.GetMember(),deserializer.GetMember()),false);var overrideText=deserializer.GetMember();var overrideAlt=deserializer.GetMember();this.m_iconIsDisplayed=deserializer.GetBoolean();this.m_sizeIsDisplayed=deserializer.GetBoolean();this.m_hasLink=deserializer.GetBoolean();this.m_limitChars=deserializer.GetMember(); this.m_textFormat=deserializer.GetMember();if(overrideText.length>0){this.m_textIsOveridden=true;this.m_text=new D2L.LP.Text.PlainText(overrideText)}if(overrideAlt.length>0){this.m_altIsOveridden=true;this.m_alt=new D2L.LP.Text.PlainText(overrideAlt)}var domNode=this.GetDomNode();if(domNode.childNodes.length>0){if(this.m_hasLink){this.m_link=domNode.firstChild;if(this.IconIsDisplayed()){this.m_img=this.m_link.firstChild;this.m_textNode=this.m_link.childNodes[1]}}else if(this.IconIsDisplayed()){this.m_img= this.IDomNode.firstChild;this.m_textNode=this.IDomNode.childNodes[1]}else this.m_textNode=this.IDomNode.firstChild;if(this.SizeIsDisplayed())this.m_sizeNode=domNode.childNodes[domNode.childNodes.length-1]}},Focus:function(){if(this.m_link)this.m_link.focus()},GetText:function(){return this.m_text},GetTextFormat:function(){return this.m_textFormat},IconIsDisplayed:function(){return this.m_iconIsDisplayed},SetAlt:function(alt){this.m_alt=D2L.LP.Text.IText.Normalize(alt,"D2L.Control.FileLink","SetAlt", "alt");if(this.m_link!==null){var me=this;this.m_alt.GetText().Register(function(val){me.m_link.title=val})}},SetFile:function(file,buildDom,displayInBrowser){if(buildDom===undefined)buildDom=true;if(buildDom)file=D2L.Serialization.JsonDeserializer.Deserialize(file,D2L.Files.FileInfo);if(displayInBrowser!==undefined)this.m_displayInBrowser=displayInBrowser;this.m_fileName=file.FileName;this.SetNavigation(D2L.Util.GetViewFileUrl(file,this.m_displayInBrowser));this.SetSize(file.Size);if(!this.m_textIsOveridden){this.SetText(new D2L.LP.Text.PlainText(file.FileName)); if(!this.m_altIsOveridden)this.SetAlt(new D2L.LP.Text.LangTerm("Framework.FileSelector.altOpenFile",file.FileName))}else if(!this.m_altIsOveridden)this.SetAlt(new D2L.LP.Text.LangTerm("Framework.FileSelector.altOpenFile",this.m_text));if(buildDom){this.m_hasDomBeenBuilt=false;this.BuildDom()}else if(this.IconIsDisplayed()&&this.m_fileName.length>0&&this.m_img!==null){var me=this;D2L.Files.GetFileTypeInfo(this.m_fileName).Register(function(fileTypeInfo){fileTypeInfo.GetImage().Assign(me.m_img)})}}, SetNavigation:function(navigation){this.m_navigation=navigation;if(this.m_link)this.m_link.href=navigation},SetSize:function(size){if(this.SizeIsDisplayed()){this.m_size=size;if(this.m_sizeNode){if(this.m_sizeNode.firstChild){D2L.Util.Dom.Purge(this.m_sizeNode.firstChild);this.m_sizeNode.removeChild(this.m_sizeNode.firstChild)}this.m_sizeNode.appendChild(this.CreateTextNode(new D2L.LP.Text.SmlText(" ([0])",Culture.FormatFileSize(this.m_size))))}}},SetText:function(text){this.m_text=D2L.LP.Text.IText.Normalize(text, "D2L.Control.FileLink","SetText","text");if(this.m_textNode){if(this.m_textNode.firstChild){D2L.Util.Dom.Purge(this.m_textNode.firstChild);this.m_textNode.removeChild(this.m_textNode.firstChild)}var me=this;this.m_text.GetText().Register(function(val){var txt=val;if(me.m_limitChars>0&&val.length>me.m_limitChars)txt=val.substr(0,me.m_limitChars-3)+"...";me.m_textNode.appendChild(me.CreateTextNode(txt))})}},SetTextFormat:function(textFormat){this.m_textFormat=textFormat;if(this.GetDomNode())this.GetDomNode().className= this.GetTextFormat()==D2L.Control.TextFormat.Bold?"dfl dfl_b":"dfl"},SetSizeIsDisplayed:function(sizeIsDisplayed){this.m_sizeIsDisplayed=sizeIsDisplayed},SizeIsDisplayed:function(){return this.m_sizeIsDisplayed}});D2L.Files.FileLink=D2L.Control.FileLink;D2L.RemovePaddingElement=function(iframeEl){var paddingNode=D2L.LP.Web.UI.Html.Dom.GetParentElementByClassName("d2l-page-main-padding",iframeEl);if(paddingNode)paddingNode.style.padding="0px"}; D2L.MakeIFrameFullscreen=function(id){var iframe=document.getElementById(id);if(!iframe)return;document.body.style.overflow="hidden";D2L.RemovePaddingElement(iframe);var resize=function(){var viewportHeight=UI.GetWindowHeight(window);var iframeY=D2L.Util.Dom.FindPosY(iframe);var height=viewportHeight-iframeY;iframe.style.height=height+"px"};setTimeout(resize,1E3);UI.OnPageLoad().RegisterMethod(resize);UI.GetWindowEventManager().Resize.RegisterMethod(function(){resize()})}; window.addEventListener("message",function(event){if(event.data&&event.data==="d2l-sequence-launcher-hide-padding")D2L.RemovePaddingElement(document.querySelector("iframe"))}); D2L.TransferFrameClicks=function(frame){var win=window;try{while(win!==win.parent&&win.parent.D2L&&win.parent.D2L.LP){var throwsIfXDomain=win.parent.document;win=win.parent}}catch(xdomainErr){}var handleClick=function(evt){win.D2L.LP.Web.UI.Events.OnClick.Trigger(evt)};var handleFraEvent=function(evt){win.D2L.LP.Web.UI.Events.OnFraUserEvent.Trigger(evt)};try{if(frame.contentWindow.D2L!==undefined){frame.contentWindow.D2L.LP.Web.UI.Events.OnClick.AddListener(handleClick);frame.contentWindow.D2L.LP.Web.UI.Events.OnFraUserEvent.AddListener(handleFraEvent)}else D2L.LP.Web.UI.Html.Dom.AddEventListener("click", frame.contentWindow.document,handleClick)}catch(e){}}; D2L.Control.Heading=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_text=new D2L.LP.Text.PlainText("");this.m_isInFieldGroup=false;this.m_hasActions=false;this.m_isDisplayed=true;this.m_domHeading=null},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);this.m_isInFieldGroup=deserializer.GetBoolean();this.m_hasActions=deserializer.GetBoolean();this.m_isDisplayed=deserializer.GetBoolean();if(this.m_isInFieldGroup)this.m_domHeading= this.GetDomNode().cells[0].firstChild;else this.m_domHeading=this.GetDomNode();this.m_text=new D2L.LP.Text.PlainText(this.m_domHeading.innerHTML)},SetIsDisplayed:function(isDisplayed){if(isDisplayed!=this.m_isDisplayed){if(this.IsRendered())if(!isDisplayed)this.GetDomNode().style.display="none";else if(this.m_isInFieldGroup)if(UI.GetBrowserInfo().Type==D2L.UI.BrowserType.IE)this.GetDomNode().style.display="inline";else this.GetDomNode().style.display="table-row";else this.GetDomNode().style.display= "block";this.m_isDisplayed=isDisplayed}},SetText:function(text){this.m_text=D2L.LP.Text.IText.Normalize(text,"D2L.Control.Heading","SetText","text");if(this.IsRendered())this.m_text.AssignHtml(this.m_domHeading,"innerHTML",true)}}); D2L.Control.Hidden=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_value=""},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);if(deserializer.HasMember())this.GetDomNode().ID2L=null;this.m_value=this.GetDomNode().value},BuildDom:function(){if(!this.IsRendered()){arguments.callee.$.BuildDom.call(this);this.SetDomNode(this.CreateElement("input"));this.GetDomNode().type="hidden";this.GetDomNode().name=this.GetMappedId(); this.GetDomNode().value=this.m_value}},GetMultiEditValue:function(){return this.GetValue()},GetState:function(serializer){serializer.AddMember("Value",this.GetValue())},GetValue:function(){if(this.IsRendered())return this.GetDomNode().value;else return this.m_value},SetValue:function(value){this.m_value=value;if(this.IsRendered())this.GetDomNode().value=value}}); D2L.Control.HtmlEditor=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_mvcId=null;this.m_isInline=null;this.OnTempFileInsert=new D2L.EventHandler},AppendToEnd:function(html){D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.AppendHtml(this.m_mvcId,html)},Focus:function(){D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.Focus(this.m_mvcId)},GetHtml:function(){var htmlParam=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.GetHtml(this.m_mvcId);if(htmlParam!=null)return htmlParam.GetHtml(); else return""},HasChanged:function(){return D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.IsDirty(this.m_mvcId)},HasValue:function(){return new D2L.Util.DelayedReturn(this.GetHtml().trim().length>0)},Hide:function(){D2L.LP.Web.UI.Html.Dom.SetIsDisplayed(this.m_mvcId,false)},Initialize:function(){var me=this;$(this.GetDomNode()).on("vui-change",function(){UI.GetFormManager().ForceChange(me.GetDomNode())})},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer); this.m_mvcId=new D2L.LP.Web.UI.Html.AbsoluteHtmlId(deserializer.GetMember());this.m_isInline=deserializer.GetBoolean()},IsEmpty:function(){return D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.IsEmpty(this.m_mvcId)},MoveCursorToStart:function(){D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.MoveToStart(this.m_mvcId)},PasteHtml:function(html){var evt=new D2L.LP.Web.UI.Events.Event;D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.PasteDelayed(this.m_mvcId,function(){return evt});evt.Trigger(html)},SetIsDisplayed:function(isDisplayed){if(isDisplayed)this.Show(); else this.Hide()},SetHtml:function(html){var keepFiles=true;D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.SetHtml(this.m_mvcId,html,null,keepFiles)},Show:function(){D2L.LP.Web.UI.Html.Dom.SetIsDisplayed(this.m_mvcId,true)},SetSize:function(width,height){D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.SetSize(this.m_mvcId,height,width)}});D2L.Control.HtmlEditor.Initialize=function(id){var control=UI.GetControl(id);if(control==null)control=UI.GetByName(id);control.Initialize()}; D2L.Control.HtmlEditor.ValidateRequired=function(obj,id){return D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.ValidateRequired(new D2L.LP.Web.UI.Html.AbsoluteHtmlId(id))}; D2L.Control.Image=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_text=null;this.m_isEnabled=true;this.m_isDisplayed=true;this.m_onClick=null;this.m_textNode=null;this.m_hasDefaultPadding=true;this.m_img=null;this.m_imgDisabled=null;this.m_imgNode=null;this.m_imgNodeWrapper=null;this.m_alt=null;this.m_anchorNode=null;this.m_childSpan=null;this.m_navInfo=null;this.OnMouseOver=new D2L.EventHandler;this.OnMouseOut=new D2L.EventHandler},BuildDom:function(){if(!this.IsRendered()){var daylightEnabled= D2L.LP.Web.UI.Daylight.IsEnabled();arguments.callee.$.BuildDom.call(this);this.SetDomNode(this.CreateElement("span"));this.m_imgNode=this.CreateElement("img");if(this.HasDefaultPadding())this.m_imgNode.className="di_i";else this.m_imgNode.className="di_in";this.m_imgNode.alt="";if(!this.m_img&&this.m_isEnabled||!this.m_imgDisabled&&!this.m_isEnabled)this.m_imgNode.style.display="none";if(daylightEnabled){this.m_imgNodeWrapper=this.CreateElement("span");this.m_imgNodeWrapper.className="di_s";this.m_imgNodeWrapper.insertBefore(this.m_imgNode, null)}else this.m_imgNodeWrapper=this.m_imgNode;this.GetDomNode().insertBefore(this.m_imgNodeWrapper,null);this.SetText(this.m_text);this.SetAlt(this.m_alt);this.SetIsEnabled(this.m_isEnabled);this.SetIsDisplayed(this.m_isDisplayed);this.SetNav(this.m_navInfo);var me=this;D2L.Control.Image.InstallEvents(this.GetDomNode(),function(){return me})}},BuildAnchorNode:function(){var daylightEnabled=D2L.LP.Web.UI.Daylight.IsEnabled();if(!this.m_anchorNode&&this.m_imgNode){var anchor=this.CreateElement("a"); if(!this.IsDisplayed())anchor.style.display="none";else anchor.style.display="inline";if(this.m_isEnabled)anchor.className=daylightEnabled?"di_l d2l-link d2l-link-inline":"di_l vui-link";else anchor.className=daylightEnabled?"di_l d2l-link d2l-link-inline di_l_d":"di_l di_l_d vui-link";if(this.m_imgNodeWrapper){this.m_anchorNode=this.m_imgNodeWrapper.parentNode.insertBefore(anchor,this.m_imgNodeWrapper);if(this.GetDomNode()==this.m_imgNodeWrapper)this.SetDomNode(this.m_anchorNode)}if(this.m_imgNodeWrapper){this.m_anchorNode.parentNode.removeChild(this.m_imgNodeWrapper); this.m_anchorNode.insertBefore(this.m_imgNodeWrapper,null)}if(this.m_textNode){this.m_anchorNode.parentNode.removeChild(this.m_textNode);this.m_anchorNode.insertBefore(this.m_textNode,null)}if(this.m_childSpan){this.m_anchorNode.parentNode.removeChild(this.m_childSpan);this.m_anchorNode.insertBefore(this.m_childSpan,null)}}},BuildTextNode:function(){if(!this.m_textNode&&this.m_imgNodeWrapper){var textSpan=this.CreateElement("span");if(!this.IsDisplayed())textSpan.style.display="none";else textSpan.style.display= "inline";if(this.m_isEnabled)textSpan.className="di_t";else textSpan.className="di_t di_t_d";this.m_textNode=this.m_imgNodeWrapper.parentNode.insertBefore(textSpan,this.m_imgNodeWrapper.nextSibling)}},IntegrateControlMin:function(deserializer){var daylightEnabled=D2L.LP.Web.UI.Daylight.IsEnabled();arguments.callee.$.IntegrateControlMin.call(this,deserializer);this.m_img=deserializer.GetObjectMin(D2L.Images.Image);this.m_imgDisabled=deserializer.GetObjectMin(D2L.Images.Image);this.m_isDisplayed=deserializer.GetBoolean(); var hasChildren=deserializer.GetBoolean();var hasText=deserializer.GetBoolean();this.m_isEnabled=deserializer.GetBoolean();this.m_href=deserializer.GetMember();this.m_imgNode=this.GetDomNode();this.m_imgNodeWrapper=daylightEnabled?this.m_imgNode.parentNode:this.m_imgNode;if(this.m_href.length>0)this.m_anchorNode=this.m_imgNodeWrapper.parentNode;if(hasText){this.m_textNode=this.m_imgNodeWrapper.nextSibling;if(this.m_textNode.textContent)this.m_text=new D2L.LP.Text.PlainText(this.m_textNode.textContent); else this.m_text=new D2L.LP.Text.PlainText(this.m_textNode.innerText)}if(hasChildren){if(this.m_textNode)this.m_childSpan=this.m_textNode.nextSibling;else this.m_childSpan=this.m_imgNodeWrapper.nextSibling;this.SetIsDisplayed(this.m_isDisplayed)}this.m_alt=new D2L.LP.Text.PlainText(this.m_imgNode.alt)},SetIsEnabled:function(isEnabled){this.m_isEnabled=isEnabled;var daylightEnabled=D2L.LP.Web.UI.Daylight.IsEnabled();if(this.m_imgNode)if(isEnabled){if(this.m_img){this.m_img.Assign(this.m_imgNode);this.m_imgNode.style.display= "inline"}if(this.m_textNode)this.m_textNode.className="di_t";if(this.m_anchorNode){this.m_anchorNode.className=daylightEnabled?"di_l":"di_l vui-link";var href=this.GetWindow().document.createAttribute("href");href.value=this.m_href;this.m_anchorNode.attributes.setNamedItem(href)}}else{if(this.m_imgDisabled){this.m_imgDisabled.Assign(this.m_imgNode);this.m_imgNode.style.display="inline"}if(this.m_textNode)this.m_textNode.className="di_t di_t_d";if(this.m_anchorNode){this.m_anchorNode.className=daylightEnabled? "di_l di_l_d":"di_l di_l_d vui-link";if(this.m_anchorNode.attributes.getNamedItem("href"))this.m_anchorNode.attributes.removeNamedItem("href")}}},Focus:function(){if(this.m_anchorNode)this.m_anchorNode.focus()},GetImage:function(){return this.m_img},GetAnchorNode:function(){return this.m_anchorNode},GetImageDisabled:function(){return this.m_imgDisabled},GetOnClick:function(){if(this.m_navInfo!=null)return this.m_navInfo.GetOnClick();else return null},GetText:function(){return this.m_text},GetAlt:function(){return this.m_alt}, HasDefaultPadding:function(){return this.m_hasDefaultPadding},Hide:function(){if(this.IsDisplayed()){this.SetIsDisplayed(false);var e=new D2L.TransformEvent(this.IDomNode);e.Bubble()}},IsEnabled:function(){return this.m_isEnabled},IsDisplayed:function(){return this.m_isDisplayed},SetHasDefaultPadding:function(val){this.m_hasDefaultPadding=val;if(this.IsRendered()&&this.m_imgNode)if(val)this.m_imgNode.className="di_i";else this.m_imgNode.className="di_in"},SetOnClick:function(onClick){UI.GetMessageArea().AddWarningMessage(new D2L.LP.Text.PlainText("Image.SetOnClick() is obsolete. "+ "Please use SetNav() instead."),true);if(onClick){if(this.m_navInfo==null)this.m_navInfo=new D2L.NavInfo;this.m_navInfo.SetOnClick(onClick);this.SetNav(this.m_navInfo)}},SetNav:function(navInfo){if(navInfo){this.m_navInfo=navInfo;if(this.IsRendered()){this.BuildAnchorNode();if(this.m_anchorNode){if(this.m_alt){var me=this;this.m_alt.GetText().Register(function(val){if(val.length>0)me.m_anchorNode.title=val})}var navStruct=this.m_navInfo.SetupHrefOnClick(this);this.m_href=navStruct.Href;if(this.m_isEnabled)this.m_anchorNode.href= this.m_href;if(navStruct.Target==null||navStruct.Target==""){if(this.m_anchorNode.attributes.getNamedItem("target"))this.m_anchorNode.attributes.removeNamedItem("target")}else this.m_anchorNode.target=navStruct.Target;var me=this;if(navStruct.OnClick)this.AttachObject(this.m_anchorNode,"onclick",function(){if(navStruct.OnClick&&me.IsEnabled())return navStruct.OnClick.call()})}}}},SetImage:function(image){if(image){this.m_img=image;if(this.m_imgNode&&this.m_isEnabled){this.m_img.Assign(this.m_imgNode); this.m_imgNode.style.display="inline"}}},SetImageDisabled:function(image){if(image){this.m_imgDisabled=image;if(this.m_imgNode&&!this.m_isEnabled){this.m_imgDisabled.Assign(this.m_imgNode);this.m_imgNode.style.display="inline"}}},SetText:function(text){if(text){this.m_text=D2L.LP.Text.IText.Normalize(text,"D2L.Control.Image","SetText","text");this.BuildTextNode();if(this.m_textNode){var me=this;this.m_text.GetHtml().Register(function(val){if(val.length>0)me.m_textNode.innerHTML=val})}}},SetAlt:function(alt){if(alt){this.m_alt= D2L.LP.Text.IText.Normalize(alt,"D2L.Control.Image","SetAlt","alt");if(this.m_imgNode){var me=this;this.m_alt.GetText().Register(function(val){if(val.length>0){me.m_imgNode.alt=val;me.m_imgNode.title=val}})}if(this.m_anchorNode){var me=this;this.m_alt.GetText().Register(function(val){if(val.length>0)me.m_anchorNode.title=val})}}},Show:function(){if(!this.IsDisplayed()){this.SetIsDisplayed(true);var e=new D2L.TransformEvent(this.IDomNode);e.Bubble()}},SetIsDisplayed:function(isDisplayed){if(this.IsRendered())if(!isDisplayed){this.IDomNode.style.display= "none";if(this.m_anchorNode)this.m_anchorNode.style.display="none";if(this.m_textNode)this.m_textNode.style.display="none"}else{this.IDomNode.style.display="inline";if(this.m_anchorNode)this.m_anchorNode.style.display="inline";if(this.m_textNode)this.m_textNode.style.display="inline"}this.m_isDisplayed=isDisplayed}}); D2L.Control.Image.InstallEvents=function(domNode,GetControl){var me=null;UI.AttachObject(domNode,"onmouseover",function(){if(me===null)me=GetControl();me.OnMouseOver.Trigger(me)});UI.AttachObject(domNode,"onmouseout",function(){if(me===null)me=GetControl();me.OnMouseOut.Trigger(me)})};D2L.Image=D2L.Control.Image;D2L.Image.ImageInfo=D2L.Images.ImageInfo; D2L.Control.ImageLink=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_alt=null;this.m_float=D2L.Style.Float.None;this.m_image=null;this.m_imageHover=null;this.m_isDisplayed=true;this.m_isEnabled=true;this.m_navInfo=null;this.m_isHover=false},BuildDom:function(){if(this.IsRendered())return;arguments.callee.$.BuildDom.call(this);var anchor=this.SetDomNode(this.GetUI().CreateElement("a"));anchor.className="dil";anchor.appendChild(this.GetUI().CreateElement("img")); this.RenderAlt();this.RenderImage();this.RenderIsDisplayed();this.RenderFloat();this.RenderNav()},IntegrateControl:function(deserializer){arguments.callee.$.IntegrateControl.call(this);this.m_image=deserializer.GetObject("Image");if(deserializer.HasMember("ImageHover"))this.m_imageHover=deserializer.GetObject("ImageHover");this.m_navInfo=deserializer.GetObject("NavInfo");this.m_isDisplayed=deserializer.GetMember("IsDisplayed",true);this.m_float=deserializer.GetMember("Float",D2L.Style.Float.None)}, Focus:function(){if(this.IsRendered())this.GetDomNode().focus()},GetAlt:function(){return this.m_alt},GetFloat:function(){return this.m_float},GetImage:function(){return this.m_image},GetNav:function(){return this.m_navInfo},GetImageNode:function(){return this.GetDomNode().firstChild},IsDisplayed:function(){return this.m_isDisplayed},RenderAlt:function(){if(this.IsRendered()){if(this.m_alt===null){this.GetUI().GetMessageArea().AddWarningMessage(new D2L.LP.Text.PlainText("ImageLink 'Alt' is required."), true);return}var imgNode=this.GetImageNode();this.m_alt.AssignText(imgNode,"alt");this.m_alt.AssignText(imgNode,"title")}},RenderFloat:function(){if(this.IsRendered())D2L.Util.Style.ApplyFloat(this.GetDomNode(),this.GetFloat())},RenderImage:function(){if(this.IsRendered())if(!this.m_isHover){if(this.m_image===null){this.GetUI().GetMessageArea().AddWarningMessage(new D2L.LP.Text.PlainText("ImageLink 'Image' is required."),true);return}this.m_image.Assign(this.GetImageNode(),false)}else{if(this.m_imageHover=== null){this.GetUI().GetMessageArea().AddWarningMessage(new D2L.LP.Text.PlainText("ImageLink 'Image' is required."),true);return}this.m_imageHover.Assign(this.GetImageNode(),false)}},RenderIsDisplayed:function(){if(this.IsRendered())this.GetDomNode().style.display=this.IsDisplayed()?"inline":"none"},RenderNav:function(){if(!this.IsRendered())return;if(this.m_navInfo===null){this.GetUI().GetMessageArea().AddWarningMessage(new D2L.LP.Text.PlainText("ImageLink must have a navigation component specified."), true);return}var anchor=this.GetDomNode();var navStruct=this.m_navInfo.SetupHrefOnClick(this,true);anchor.href=navStruct.Href;if(navStruct.Target==null||navStruct.Target==""){if(anchor.attributes.getNamedItem("target"))anchor.attributes.removeNamedItem("target")}else this.m_anchorNode.target=navStruct.Target;var me=this;if(navStruct.OnClick)this.AttachObject(anchor,"onclick",function(){return navStruct.OnClick.call()});else anchor.onclick=null},SetAlt:function(alt){this.m_alt=alt;this.RenderAlt()}, SetIsEnabled:function(isEnabled){this.m_isEnabled=isEnabled},SetFloat:function(floatVal){if(floatVal!==this.GetFloat()){this.m_float=floatVal;this.RenderFloat()}},SetImage:function(image){this.m_image=image;if(!this.m_isHover)this.RenderImage()},SetHoverImage:function(image){this.m_imageHover=image;this.RenderImage()},SetIsDisplayed:function(isDisplayed){if(isDisplayed!==this.IsDisplayed()){this.m_isDisplayed=isDisplayed;this.RenderIsDisplayed()}},SetNav:function(navInfo){this.m_navInfo=navInfo;this.RenderNav()}}); D2L.Control.ImageLink.InstallEvents=function(domNode,GetControl){var imgNode=domNode.firstChild;UI.AttachObject(imgNode,"onmouseover",function(){GetControl().m_isHover=true;GetControl().RenderImage()});UI.AttachObject(imgNode,"onmouseout",function(){GetControl().m_isHover=false;GetControl().RenderImage()})}; D2L.Control.ImageViewer=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_isDisplayed=true},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);this.m_isDisplayed=deserializer.GetBoolean()},IsDisplayed:function(){return this.m_isDisplayed},SetIsDisplayed:function(isDisplayed){if(this.IsRendered())this.GetDomNode().display.display=isDisplayed?"inline":"none";this.m_isDisplayed=isDisplayed}}); D2L.Control.InlineHelp=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_isDisplayed=true;this.m_isEnabled=true;this.m_text=new D2L.LP.Text.PlainText;this.m_isInLine=true},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);var domNode=this.GetDomNode();this.m_isDisplayed=domNode.style.display!="none";this.m_isEnabled=domNode.className!="dh_sd";this.m_text=new D2L.LP.Text.PlainText(domNode.innerHTML);if(D2L.LP.Web.UI.Html.Dom.HasAttribute(domNode, "data-isinline"))this.m_isInLine=D2L.LP.Web.UI.Html.Dom.GetAttribute(domNode,"data-isinline")!="false";else this.m_isInLine=domNode.style.display!="block"},GetText:function(){return this.m_text},IsDisplayed:function(){return this.m_isDisplayed},IsEnabled:function(){return this.m_isEnabled},SetIsDisplayed:function(isDisplayed){if(this.IsRendered()){var dis="inline";if(!this.m_isInLine)dis="block";this.GetDomNode().style.display=isDisplayed?dis:"none"}this.m_isDisplayed=isDisplayed},SetIsEnabled:function(isEnabled){this.m_isEnabled= isEnabled;if(this.IsRendered())if(isEnabled){D2L.LP.Web.UI.Html.Dom.AddClassName("dh_s",this.GetDomNode());D2L.LP.Web.UI.Html.Dom.RemoveClassName("dh_sd",this.GetDomNode())}else{D2L.LP.Web.UI.Html.Dom.AddClassName("dh_sd",this.GetDomNode());D2L.LP.Web.UI.Html.Dom.RemoveClassName("dh_s",this.GetDomNode())}},SetText:function(text){this.m_text=text;if(this.IsRendered())this.m_text.AssignHtml(this.GetDomNode(),"innerHTML")}}); D2L.Control.Label=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_isDisplayed=true;this.m_text=new D2L.LP.Text.PlainText},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);this.m_isDisplayed=this.GetDomNode().style.display!="none";this.m_text=new D2L.LP.Text.PlainText(this.GetDomNode().innerHTML)},GetText:function(){return this.m_text},IsDisplayed:function(){return this.m_isDisplayed},SetIsDisplayed:function(isDisplayed){if(this.IsRendered())this.GetDomNode().style.display= isDisplayed?"inline":"none";this.m_isDisplayed=isDisplayed},SetText:function(text){this.m_text=D2L.LP.Text.IText.Normalize(text,"D2L.Control.Label","SetText","text");if(this.IsRendered())this.m_text.AssignHtml(this.GetDomNode(),"innerHTML")}}); D2L.Control.LargeClassSize=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_viewType=0;this.m_groupTypeId=0;this.m_groupId=0},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);this.m_viewType=deserializer.GetMember();this.m_groupTypeId=deserializer.GetMember();this.m_groupId=deserializer.GetMember()},GetInfo:function(){return new D2L.Control.LargeClassSize.Info(this.m_viewType,this.m_groupTypeId,this.m_groupId)}}); D2L.Control.LargeClassSize.Info=D2L.Class.extend({Construct:function(viewType,groupTypeId,groupId){arguments.callee.$.Construct.call(this);this.m_viewType=viewType;this.m_groupTypeId=groupTypeId;this.m_groupId=groupId},GetViewType:function(){return this.m_viewType},GetGroupTypeId:function(){return this.m_groupTypeId},GetGroupId:function(){return this.m_groupId}});D2L.Control.LargeClassSize.ViewType={None:0,Users:1,Groups:2,Sections:3}; D2L.Control.Link=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_alt=new D2L.LP.Text.PlainText;this.m_float=D2L.Style.Float.None;this.m_href="javascript://";this.m_isEnabled=true;this.m_navInfo=new D2L.NavInfo;this.m_spacing=new D2L.Style.Spacing(D2L.Style.Spacing.Type.Spacing);this.m_text=new D2L.LP.Text.PlainText;this.m_languageCode=null},BuildDom:function(){if(this.IsRendered())return;var daylightEnabled=D2L.LP.Web.UI.Daylight.IsEnabled();arguments.callee.$.BuildDom.call(this); var domNode=this.SetDomNode(this.GetUI().CreateElement("a"));if(daylightEnabled)domNode.className="d2l-link d2l-link-inline";else domNode.className="vui-link";this.RenderAlt();this.RenderText();this.SetNav(this.m_navInfo);this.RenderIsEnabled();this.RenderFloat();this.RenderSpacing()},Focus:function(){try{if(this.IsRendered())this.GetDomNode().focus()}catch(e){}},GetAlt:function(){return this.m_alt},GetFloat:function(){return this.m_float},GetSpacing:function(){return this.m_spacing},GetText:function(){return this.m_text}, IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);var node=this.GetDomNode();this.m_isEnabled=!node.classList.contains("dlk_d");if(!this.m_isEnabled)D2L.Util.Aria.SetAttribute(node,"disabled","true");if(node.title.length>0)this.m_alt=new D2L.LP.Text.PlainText(node.title);if(node.firstChild)this.m_text=new D2L.LP.Text.PlainText(node.firstChild.data);this.m_href=deserializer.GetMember();this.m_float=deserializer.GetMember()},IsEnabled:function(){return this.m_isEnabled}, RenderAlt:function(){if(this.IsRendered()){var me=this;this.m_alt.GetText().Register(function(val){if(val.length>0)me.GetDomNode().title=val})}},RenderFloat:function(){if(this.IsRendered())D2L.Util.Style.ApplyFloat(this.GetDomNode(),this.GetFloat())},RenderIsEnabled:function(){var node=this.GetDomNode();if(!node)return;if(this.IsEnabled()){node.classList.remove("dlk_d");var href=this.GetWindow().document.createAttribute("href");href.value=this.m_href;node.attributes.setNamedItem(href);D2L.Util.Aria.SetAttribute(node, "disabled","false")}else{node.classList.add("dlk_d");if(node.attributes.getNamedItem("href"))node.attributes.removeNamedItem("href");D2L.Util.Aria.SetAttribute(node,"disabled","true")}},RenderSpacing:function(){if(this.IsRendered())this.GetDomNode().style.margin=this.GetSpacing().ToCss()},RenderText:function(){if(this.IsRendered()){var me=this;this.m_text.GetHtml().Register(function(val){me.GetDomNode().innerHTML="";var span=UI.CreateElement("span");span.innerHTML=val;if(me.GetLanguageCode()!==null)span.lang= me.GetLanguageCode();me.GetDomNode().appendChild(span)})}},SetAlt:function(alt){this.m_alt=D2L.LP.Text.IText.Normalize(alt,"D2L.Control.Link","SetAlt","alt");this.RenderAlt()},SetFloat:function(floatVal){if(floatVal!==this.GetFloat()){this.m_float=floatVal;this.RenderFloat()}},SetIsDisplayed:function(isDisplayed){if(this.IsRendered())if(isDisplayed)this.GetDomNode().style.display="inline";else this.GetDomNode().style.display="none"},SetIsEnabled:function(isEnabled){this.m_isEnabled=isEnabled;this.RenderIsEnabled()}, SetNav:function(navInfo){if(!navInfo)return;this.m_navInfo=navInfo;if(!this.IsRendered())return;var navStruct=this.m_navInfo.SetupHrefOnClick(this);this.m_href=navStruct.Href;if(this.IsEnabled())this.GetDomNode().href=this.m_href;if(navStruct.Target==null||navStruct.Target==""){if(this.GetDomNode().attributes.getNamedItem("target"))this.GetDomNode().attributes.removeNamedItem("target")}else this.GetDomNode().target=navStruct.Target;var me=this;this.AttachObject(this.GetDomNode(),"onclick",function(evt){D2L.Util.Dom.CancelBubble(evt); if(navStruct.OnClick&&me.IsEnabled())return navStruct.OnClick.call()})},SetOnClick:function(onClick){UI.GetMessageArea().AddWarningMessage(new D2L.LP.Text.PlainText("Link.SetOnClick() is obsolete. Please "+"use SetNav() instead."),true);if(onClick){this.m_navInfo.SetOnClick(onClick);this.SetNav(this.m_navInfo)}},SetText:function(text){this.m_text=D2L.LP.Text.IText.Normalize(text,"D2L.Control.Link","SetText","text");this.RenderText()},SetLanguageCode:function(languageCode){this.m_languageCode=languageCode; this.RenderText()},GetLanguageCode:function(){return this.m_languageCode}});D2L.Link=D2L.Control.Link; D2L.Control.List=D2L.Control.extend({Construct:function(bulletType){arguments.callee.$.Construct.call(this);this.m_altLess=new D2L.LP.Text.PlainText;this.m_altMore=new D2L.LP.Text.PlainText;this.m_bulletType=bulletType;this.m_delimiter="";this.m_threshold=-1;this.m_isExpanded=false;this.m_lineHeight=1;this.m_objectName="";this.m_numItems=0;this.m_hasThreshold=false;this.m_isOnDemand=false;this.m_moreCountIsDisplayed=true;this.m_onDemandHasLessLink=false;this.m_onDemandTotalItemsCount=-1;this.m_moreLink= null;this.m_lessLink=null;this.m_onDemandCallback=null;this.m_onDemandJsCallbackObjectJs=null;this.m_isOnDemandLoaded=false;this.m_onDemandReturnsAll=null;this.m_onDemandOrigNumItems=null},AddItem:function(item){this.AppendChild(item)},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);this.m_bulletType=deserializer.GetMember();this.m_delimiter=deserializer.GetMember();this.m_objectName=deserializer.GetMember();this.m_threshold=deserializer.GetMember(); this.m_hasThreshold=this.m_threshold>=0;var onDemandCallbackName=deserializer.GetMember();this.m_onDemandHasLessLink=deserializer.GetBoolean();this.m_onDemandReturnsAll=deserializer.GetBoolean();this.m_onDemandTotalItemsCount=deserializer.GetMember();var onDemandJsCallbackObjectJsName=deserializer.GetMember();this.m_moreCountIsDisplayed=deserializer.GetBoolean();this.m_altLess=new D2L.LP.Text.PlainText(deserializer.GetMember());this.m_altMore=new D2L.LP.Text.PlainText(deserializer.GetMember());if(onDemandJsCallbackObjectJsName.length> 0)this.m_onDemandJsCallbackObjectJs=eval(onDemandJsCallbackObjectJsName);if(onDemandCallbackName.length>0)if(this.m_onDemandJsCallbackObjectJs)this.m_onDemandCallback=this.m_onDemandJsCallbackObjectJs[onDemandCallbackName];else this.m_onDemandCallback=this.GetWindow()[onDemandCallbackName];if(this.m_onDemandCallback!==null&&this.m_onDemandCallback!==undefined)this.m_isOnDemand=true;if(this.GetDomNode().childNodes.length==1&&this.GetDomNode().childNodes[0].className=="no_disp")this.GetDomNode().removeChild(this.GetDomNode().childNodes[0]); this.m_numItems=this.GetDomNode().childNodes.length;if(this.m_hasThreshold||this.m_isOnDemand){this.m_numItems=this.m_numItems-2;this.m_moreLink=this.GetDomNode().childNodes[this.m_numItems].firstChild;this.m_lessLink=this.GetDomNode().childNodes[this.m_numItems+1].firstChild}for(var i=0;i<this.GetDomNode().childNodes.length;i++){var child=new D2L.Control.ListItem;child.IntegrateChild(this,this.GetDomNode().childNodes[i])}},BuildDom:function(){if(this.IsRendered())return;arguments.callee.$.BuildDom.call(this); var ul=this.GetUI().CreateElement("ul");this.SetDomNode(ul);var className="dl";switch(this.m_bulletType){case D2L.Control.List.BulletTypeOptions.Circle:className+=" dl_ci";break;case D2L.Control.List.BulletTypeOptions.Disc:className+=" dl_di";break;case D2L.Control.List.BulletTypeOptions.Square:className+=" dl_sq";break;case D2L.Control.List.BulletTypeOptions.None:className+=" dl_no";break;case D2L.Control.List.BulletTypeOptions.Flat:defaultSpacing="1em,0em,1em,0em";className+=" dl_fl";break}ul.className= className},AppendChild:function(child){if(this.m_hasThreshold||this.m_isOnDemand)child=arguments.callee.$.InsertBefore.call(this,child,this.Children()[this.m_numItems]);else child=arguments.callee.$.InsertBefore.call(this,child);this.m_numItems++;var delimSpan=this.CreateElement("span");if(this.m_hasThreshold&&this.m_numItems>this.m_threshold||this.m_isOnDemand&&this.m_onDemandHasLessLink)delimSpan.style.display="";else delimSpan.style.display="none";var marker="‎";if(Culture.IsRightToLeft())marker= "‏";var TextNode=this.CreateTextNode(this.m_delimiter);delimSpan.innerHTML=marker;delimSpan.appendChild(TextNode);child.GetDomNode().appendChild(delimSpan);if(this.m_numItems-2>=0){var element=this.GetDomNode().childNodes[this.m_numItems-2];var spanElement=D2L.LP.Web.UI.Html.Dom.GetLastElementChild(element);spanElement.style.display=""}if(this.m_hasThreshold)if(this.IsExpanded()){if(this.m_numItems>this.m_threshold)this.m_lessLink.parentNode.style.display="";this.UpdateLessLink()}else if(this.m_numItems> this.m_threshold){child.GetDomNode().style.display="none";this.m_moreLink.parentNode.style.display="";this.UpdateMoreLink()}return child},Collapse:function(){if(!this.m_isExpanded||!this.m_isOnDemand&&!this.m_hasThreshold)return;this.m_isExpanded=false;var visibleNum=this.m_hasThreshold?this.m_threshold:this.m_onDemandOrigNumItems;for(var i=0;i<this.m_numItems;i++)if(i<visibleNum)this.GetDomNode().childNodes[i].style.display="";else this.GetDomNode().childNodes[i].style.display="none";this.m_moreLink.parentNode.style.display= "";this.m_lessLink.parentNode.style.display="none";this.UpdateMoreLink()},Expand:function(){if(this.m_isExpanded||!this.m_isOnDemand&&!this.m_hasThreshold)return;this.m_isExpanded=true;var me=this;var image=this.CreateElement("img");D2L.LP.Text.LangTerm.AssignText("Standard.Misc.txtLoading",image,"title");D2L.LP.Text.LangTerm.AssignText("Standard.Misc.txtLoading",image,"alt");var UpdateItemsVisibility=function(){for(var i=0;i<me.m_numItems;i++)me.GetDomNode().childNodes[i].style.display="";me.m_moreLink.parentNode.style.display= "none";if(me.m_hasThreshold||me.m_onDemandHasLessLink){me.m_lessLink.parentNode.style.display="";me.UpdateLessLink()}};if(this.m_hasThreshold||this.m_isOnDemandLoaded){UpdateItemsVisibility();return}var loadingImageInfo=new D2L.Images.ImageInfo("/d2l/img/lp/loading.gif",16,16);loadingImageInfo.Assign(image);this.m_moreLink.parentNode.appendChild(image);this.m_moreLink.style.display="none";this.m_onDemandOrigNumItems=this.m_numItems;var onDemandCallbackDL;if(this.m_onDemandJsCallbackObjectJs)onDemandCallbackDL= this.m_onDemandCallback.call(this.m_onDemandJsCallbackObjectJs,this);else onDemandCallbackDL=this.m_onDemandCallback.call(this,this);onDemandCallbackDL.Register(function(result){me.m_isOnDemandLoaded=true;me.m_moreLink.style.display="";me.m_moreLink.parentNode.removeChild(image);if(result){if(me.m_onDemandReturnsAll)me.RemoveAll();me.AppendChildren(result)}UpdateItemsVisibility()})},GetBulletType:function(){return this.m_bulletType},IsExpanded:function(){return this.m_isExpanded},RemoveAll:function(){for(var i= this.m_numItems-1;i>=0;i--)this.RemoveChild(this.Children()[i]);if(this.m_moreLink!=null)this.m_moreLink.parentNode.style.display="none";if(this.m_lessLink!=null)this.m_lessLink.parentNode.style.display="none";this.m_numItems=0},RenderLineHeight:function(){if(this.IsRendered())this.GetDomNode().style.lineHeight=this.m_lineHeight+"em"},SetLineHeight:function(lineHeight){this.m_lineHeight=lineHeight;this.RenderLineHeight()},UpdateMoreLink:function(){if(!this.m_isOnDemand&&!this.m_hasThreshold)return; var numObjects;if(this.m_onDemandTotalItemsCount>=0)if(this.m_isOnDemandLoaded)numObjects=this.m_numItems-this.m_onDemandOrigNumItems;else numObjects=this.m_onDemandTotalItemsCount-this.m_numItems;else numObjects=this.m_numItems-this.m_threshold;var moreText;if(this.m_moreCountIsDisplayed&&(this.m_onDemandTotalItemsCount>=0||this.m_hasThreshold))moreText=new D2L.LP.Text.LangTerm("Framework.List.lblMore",numObjects);else moreText=new D2L.LP.Text.LangTerm("Framework.List.lblMoreNoNumber");moreText.AssignText(this.m_moreLink, "innerHTML",true);this.m_altMore.AssignText(this.m_moreLink,"title",false)},UpdateLessLink:function(){if(this.m_hasThreshold||this.m_isOnDemand&&this.m_lessLink)this.m_altLess.AssignText(this.m_lessLink,"title",false)}});D2L.Control.List.BulletTypeOptions={None:1,Flat:2,Circle:3,Disc:4,Square:5,Custom:6}; D2L.Control.ListItem=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_bulletImg=null;this.m_bulletType=D2L.Control.List.BulletTypeOptions.None;this.m_textNode=null;this.m_text=null;var me=this;this.ParentChangeEvent().RegisterMethod(function(parent){me.m_bulletType=parent.GetBulletType();me.SetBulletImage(me.m_bulletImg)})},BuildDom:function(){if(this.m_hasDomBeenBuilt)return;arguments.callee.$.BuildDom.call(this);this.SetDomNode(this.GetUI().CreateElement("li")); if(this.m_text!==null)this.SetText(this.m_text);if(this.m_bulletImg!==null)this.SetBulletImage(this.m_bulletImg)},GetText:function(){return this.m_text},SetBulletImage:function(image){this.m_bulletImg=image;if(!this.IsRendered()||this.m_bulletImg===null)return;if(this.m_bulletType!==D2L.Control.List.BulletTypeOptions.Flat&&this.m_bulletType!==D2L.Control.List.BulletTypeOptions.Custom)return;var domNode=this.GetDomNode();image.GetSrc().Register(function(src){src="url('"+src+"')";if(this.m_bulletType== D2L.Control.List.BulletTypeOptions.Custom)domNode.style.listStyleImage=src;else{var width=image.GetWidth();if(width===0)width=16;domNode.style.backgroundImage=src;domNode.style.backgroundRepeat="no-repeat";if(Culture.IsRightToLeft()){domNode.style.backgroundPosition="top right";domNode.style.paddingRight=width+4+"px"}else{domNode.style.backgroundPosition="2px 0px";domNode.style.paddingLeft=width+4+"px"}}})},SetText:function(text){this.m_text=text;if(!this.IsRendered())return;if(this.m_textNode=== null){this.m_textNode=this.GetUI().CreateElement("span");this.GetDomNode().appendChild(this.m_textNode)}this.m_text.AssignHtml(this.m_textNode,"innerHTML")}}); D2L.Control.LongEdit=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_backgroundColor="";this.m_height=-1;this.m_isDisplayed=true;this.m_isEnabled=true;this.m_text=new D2L.LP.Text.PlainText;this.m_title=new D2L.LP.Text.PlainText;this.m_width=-1},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);if(deserializer.HasMember())this.GetDomNode().ID2L=null;this.m_isDisplayed=this.GetDomNode().style.display!="none"; this.m_isEnabled=!this.GetDomNode().disabled;this.m_text=new D2L.LP.Text.PlainText(this.GetDomNode().value);this.m_title=new D2L.LP.Text.PlainText(this.GetDomNode().getAttribute("title"))},BuildDom:function(){if(!this.IsRendered()){arguments.callee.$.BuildDom.call(this);var domNode=this.SetDomNode(this.CreateElement("textarea"));domNode.name=this.GetMappedId();domNode.className="d2l-longedit";this.SetIsDisplayed(this.m_isDisplayed);this.SetText(this.m_text);this.SetTitle(this.m_title);this.SetBackgroundColor(this.m_backgroundColor); if(this.m_width>0)this.GetDomNode().style.width=this.m_width+"px";if(this.m_height>0)this.GetDomNode().style.height=this.m_height+"px"}},Focus:function(){if(this.IsRendered())this.GetDomNode().focus()},GetMultiEditValue:function(){if(this.IsEnabled()&&this.IsRendered())return this.GetDomNode().value;return""},GetText:function(){if(this.IsRendered())return new D2L.LP.Text.PlainText(this.GetDomNode().value);return this.m_text},GetTextAsString:function(){if(this.IsRendered())return this.GetDomNode().value; return""},GetTitle:function(){return this.m_title},GetState:function(serializer){if(this.IsRendered())serializer.AddMember("Text",this.GetDomNode().value)},GetValue:function(){return this.GetText().GetText()},GetValueNoDelay:function(){return this.GetTextAsString()},HasValue:function(){var dr=new D2L.Util.DelayedReturn;this.GetText().GetText().Register(function(value){dr.Trigger(value.trim().length>0)});return dr},HasValueNoDelay:function(){return this.GetTextAsString().trim().length>0},IsDisplayed:function(){return this.m_isDisplayed}, IsEnabled:function(){if(this.IsRendered())return!this.GetDomNode().disabled;else return this.m_isEnabled},OpenSpellChecker:function(){var me=this;D2L.Util.SpellChecker.OpenSpellChecker(this.GetTextAsString(),false).Register(function(result){me.SetText(new D2L.LP.Text.PlainText(result))})},SetBackgroundColor:function(color){this.m_backgroundColor=color;if(this.IsRendered())this.GetDomNode().style.backgroundColor=color},SetHeight:function(height){this.m_height=height;if(this.IsRendered())if(height> 0)this.GetDomNode().style.height=height+"px";else this.GetDomNode().style.height="auto"},SetIsDisplayed:function(isDisplayed){if(this.IsRendered())this.GetDomNode().style.display=isDisplayed?"inline":"none";this.m_isDisplayed=isDisplayed},SetIsEnabled:function(isEnabled){this.m_isEnabled=isEnabled;if(this.IsRendered())this.GetDomNode().disabled=!isEnabled},SetIsInvalid:function(isInvalid){if(!this.IsRendered())return;this.GetDomNode().setAttribute("aria-invalid",isInvalid)},SetText:function(text){this.m_text= text;if(this.IsRendered())this.m_text.AssignText(this.GetDomNode(),"value")},SetTitle:function(title){this.m_title=title;if(this.IsRendered())this.m_title.AssignText(this.GetDomNode(),"title")},SetWidth:function(width){this.m_width=width;if(this.IsRendered())if(width>0)this.GetDomNode().style.width=width+"px";else this.GetDomNode().style.width="auto"}}); D2L.Control.LongEdit.InstallEvents=function(node){if(node.classList.contains("f-13585-legacy-input-keypress-events"))node.addEventListener("keypress",function(event){WindowEventManager.BKP(this,event)})}; D2L.Control.MessageArea=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_domAriaLog=null;this.m_domStatusContainer=null;this.m_domStatus=null;this.m_domStatusLiveRegion=null;this.m_domStatusText=null;this.m_domError=null;this.m_domErrorList=null;this.m_domErrorBalloons=[];this.m_fadeOutsWaiting=0;this.m_oldHeight=0;this.m_errorDescription=new D2L.LP.Text.LangTerm("Framework.MessageArea.lblErrors");this.m_renderingDr=new D2L.Util.DelayedReturn(true);this.m_numErrors= 0;this.m_mouseOverStatus=false;this.OnHeightChange=new D2L.EventHandler;this.OnRender=new D2L.EventHandler},AddAriaMessage:function(message){var firstTime=this.m_domAriaLog===null;var log=this.GetAriaLog();var doSet=function(){message.AssignText(log,"innerHTML",true)};message.GetPlainText().Register(function(text){if(firstTime)setTimeout(function(){doSet(text)});else doSet(text)})},AddErrorObj:function(error){var control=null;if(error.m_controlId)control=UI.GetControl(error.m_controlId.ID(),error.m_controlId.SID()); this.AddError(error.m_errorText,control)},AddError:function(errorText,control){if(this.m_domError===null)this.BuildDom_Error();var me=this;var item=this.GetUI().CreateElement("li");var HasFocusControl=function(cntl){if(cntl===undefined||cntl===null)return false;if(control.HasFocusControl!==undefined)return control.HasFocusControl();return control.Focus!==undefined};if(HasFocusControl(control)){if(D2L.LP.Web.UI.Daylight.IsEnabled()&&control.SetIsInvalid){control.SetIsInvalid(true);var controlId=control.GetControlId(); if(controlId){item.setAttribute("data-control-id",controlId.ID());item.setAttribute("data-control-sid",controlId.SID())}}var subjectStr=errorText.GetSubject();var subject=new D2L.LP.Text.PlainText(subjectStr);errorText.SetSubject("{tempsubject}");if(subjectStr.length===0){subject=D2L.Control.Field.GetFieldParentText(control);if(subject===null)subject=new D2L.LP.Text.LangTerm("Framework.Validation.DefaultSubject")}var a=this.CreateElement("a");a.href="javascript://";this.AttachObject(a,"onclick",function(){control.Focus()}); item.appendChild(a);D2L.Util.DelayedReturn.RegisterAll(errorText.GetHtml(),subject.GetHtml(),function(html,subjectText){a.innerHTML=html.replace("{tempsubject}",D2L.Util.Html.Encode(subjectText));me.m_domErrorList.appendChild(item);errorText.SetSubject(subjectText);me.AttachBalloon(control,errorText)})}else{errorText.GetText().Register(function(text){item.appendChild(me.CreateTextNode(text))});this.m_domErrorList.appendChild(item);if(control!==undefined&&control!==null)me.AttachBalloon(control,errorText)}this.m_numErrors++; this.OnRender.Trigger()},AddWarningMessage:function(message){message.GetPlainText(function(text){D2L.LP.Web.UI.Html.JavaScript.Console.Warn(text)})},AttachBalloon:function(control,failureText){var domNode=control.GetDomNode();if(control.GetValidationBalloonDomNode!==undefined)domNode=control.GetValidationBalloonDomNode();if(domNode===undefined||domNode===null)return;var sibling=domNode.nextSibling;while(sibling){var nodeType=sibling.nodeType;if(nodeType==1){var tagName=sibling.tagName.toLowerCase(); var display=YAHOO.util.Dom.getStyle(sibling,"display");if(display=="block"||display.length===0){domNode=sibling.previousSibling;break}domNode=sibling;if(tagName=="br"&&display=="inline")break}else domNode=sibling;sibling=sibling.nextSibling}if(domNode!==null){var balloon=D2L.Validation.CreateErrorBalloon(failureText);failureText.GetHtml().Register(function(html){if(domNode.nextSibling)domNode.parentNode.insertBefore(balloon,domNode.nextSibling);else domNode.parentNode.appendChild(balloon)});this.m_domErrorBalloons.push(balloon); control.GetWindow().UI.GetWindowEventManager().Transform.Trigger()}},BuildDom:function(){if(this.IsRendered())return;arguments.callee.$.BuildDom.call(this);this.SetDomNode(this.GetUI().CreateElement("div"));this.GetDomNode().id=this.GetMappedId();this.GetDomNode().className="d_ma"},BuildDom_Error:function(){this.m_domError=this.GetUI().CreateElement("div");this.m_domError.className="d_ma_ve d2l-msg-container";this.m_domError.tabIndex=0;var innerContainer=this.GetUI().CreateElement("div");innerContainer.className= "d2l-msg-container-inner";D2L.Util.Aria.SetRole(this.m_domError,"alert");var h=this.GetUI().CreateElement("h2");h.id=this.GetUI().GetUniqueHtmlId();h.className="dsr";h.appendChild(this.GetUI().CreateTextNode(new D2L.LP.Text.LangTerm("Framework.MessageArea.hdrErrors")));innerContainer.appendChild(h);var p=this.GetUI().CreateElement("p");p.className="d_ma_vel";innerContainer.appendChild(p);this.m_domErrorList=this.GetUI().CreateElement("ul");this.m_domErrorList.className="d_ma_ve_list";innerContainer.appendChild(this.m_domErrorList); this.m_domError.appendChild(innerContainer);this.OnRender.Trigger()},BuildDom_Status:function(){var me=this;this.m_domStatusContainer=this.GetUI().CreateElement("div");this.m_domStatusContainer.className="d_ma_s_c";var container=this.GetUI().CreateElement("div");this.m_domStatus=this.GetUI().CreateElement("div");this.m_domStatus.className="d_ma_s";this.m_domStatus.id=this.GetUI().GetUniqueHtmlId();D2L.LP.Web.UI.Html.Dom.AddEventListener("mouseover",this.m_domStatus,function(){me.m_mouseOverStatus= true});D2L.LP.Web.UI.Html.Dom.AddEventListener("mouseout",this.m_domStatus,function(){me.m_mouseOverStatus=false;me.FadeOutStatus()});var close=this.GetUI().CreateElement("img");close.src="/d2l/img/lp/dialog/x.png";D2L.LP.Web.UI.Html.Dom.AddEventListener("click",close,function(){me.m_domStatus.style.bottom="-10000px"});this.m_domStatus.appendChild(close);this.m_domStatusLiveRegion=this.GetUI().CreateElement("div");this.m_domStatus.appendChild(this.m_domStatusLiveRegion);var img=this.GetUI().CreateElement("img"); img.alt="";img.src="/d2l/img/lp/pixel.gif";this.m_domStatusLiveRegion.appendChild(img);container.appendChild(this.m_domStatus);this.m_domStatusContainer.appendChild(container);UI.GetById("d2l_body").appendChild(this.m_domStatusContainer);$container=$(container);$container.attr("role","alert");setTimeout(function(){$container.css("visibility","hidden");$container.css("visibility","visible")},100)},ClearErrors:function(doRender){if(this.m_numErrors===0)return new D2L.Util.DelayedReturn(true);var dr= new D2L.Util.DelayedReturn;for(var i=0;i<this.m_domErrorBalloons.length;i++){D2L.Util.Dom.Purge(this.m_domErrorBalloons[i]);if(this.m_domErrorBalloons[i]&&this.m_domErrorBalloons[i].parentNode)this.m_domErrorBalloons[i].parentNode.removeChild(this.m_domErrorBalloons[i])}this.m_domErrorBalloons=[];if(this.m_domErrorList!==null)while(this.m_domErrorList.childNodes.length>0){if(D2L.LP.Web.UI.Daylight.IsEnabled()){var errorItem=this.m_domErrorList.firstChild;if(errorItem.hasAttribute("data-control-id")){var invalidControl= UI.GetControl(errorItem.getAttribute("data-control-id"),errorItem.getAttribute("data-control-sid"));if(invalidControl&&invalidControl.SetIsInvalid)invalidControl.SetIsInvalid(false)}}D2L.Util.Dom.Purge(this.m_domErrorList.firstChild);this.m_domErrorList.removeChild(this.m_domErrorList.firstChild)}this.m_numErrors=0;if(doRender)this.RenderHeight().Register(function(){setTimeout(function(){dr.Trigger(true)},200)});else dr.Trigger(true);return dr},GetAriaLog:function(){if(this.m_domAriaLog===null){this.m_domAriaLog= this.GetUI().CreateElement("div");this.m_domAriaLog.className="d_ma_al";this.m_domAriaLog.innerHTML="<p>initial value</p>";D2L.Util.Aria.SetRole(this.m_domAriaLog,"log");D2L.Util.Aria.SetAttribute(this.m_domAriaLog,"live","assertive");this.GetDomNode().appendChild(this.m_domAriaLog)}return this.m_domAriaLog},GetHeight:function(){if(!this.HasErrors())return 0;var n=this.GetDomNode();n.style.height=this.m_oldHeight+"px";var height=0;if(this.HasErrors())height+=this.m_domError.offsetHeight;return height}, HasErrors:function(){return this.m_numErrors>0},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer,false);var parentId=deserializer.GetMember();var siblingId=deserializer.GetMember();var statusType=deserializer.GetMember();var errors=deserializer.GetObjectArray(D2L.Control.MessageArea.Error);var customIcon=deserializer.GetObject();var customMessage=deserializer.GetObject();if(deserializer.HasMember())this.m_errorDescription=deserializer.GetObject(); this.BuildDom();if(errors.length>0)for(var i=0;i<errors.length;i++)this.AddErrorObj(errors[i]);var domNode=this.GetDomNode();if(siblingId==null){var parent=UI.GetById(parentId);if(parent)if(parent.childNodes.length>0)parent.insertBefore(domNode,parent.firstChild);else parent.appendChild(domNode)}else{var sibling=UI.GetById(siblingId);if(sibling)if(sibling.nextSibling)sibling.parentNode.insertBefore(domNode,sibling.nextSibling);else sibling.parentNode.appendChild(domNode)}if(statusType!==D2L.Control.MessageArea.Status.None)this.SetStatus(statusType); else if(customIcon!==null&&customMessage!==null)this.SetCustomStatus(customIcon,customMessage);else if(this.HasErrors())this.ShowErrors()},RenderErrorLabel:function(){var me=this;if(this.m_domError.childNodes[0].childNodes[1].firstChild){D2L.Util.Dom.Purge(this.m_domError.childNodes[0].childNodes[1].firstChild);this.m_domError.childNodes[0].childNodes[1].removeChild(this.m_domError.childNodes[0].childNodes[1].firstChild)}this.m_errorDescription.SetReplace(D2L.Util.Integer.Format(this.m_numErrors)); this.m_errorDescription.GetHtml().Register(function(html){me.m_domError.childNodes[0].childNodes[1].innerHTML=html})},RenderHeight:function(setFocus){var me=this;var newDr=new D2L.Util.DelayedReturn;var domNode=this.GetDomNode();this.m_renderingDr.Register(function(){me.m_renderingDr=newDr;if(me.HasErrors())domNode.className="d_ma d_ma_e";else domNode.className="d_ma";domNode.style.height=me.m_oldHeight+"px";if(me.m_domError!==null)if(me.HasErrors()){if(me.m_domError.parentNode!==domNode)domNode.appendChild(me.m_domError)}else if(me.m_domError.parentNode=== domNode)domNode.removeChild(me.m_domError);var height=me.GetHeight();if(height!=me.m_oldHeight){me.m_oldHeight=height;if(me.HasErrors())domNode.style.height="auto";else domNode.style.height="0px";UI.GetWindowEventManager().Transform.Trigger();me.m_renderingDr.Trigger(true);me.OnHeightChange.Trigger();setTimeout(function(){if(setFocus&&me.HasErrors())me.m_domError.focus()})}else me.m_renderingDr.Trigger(true)});return newDr},Reset:function(){var dr=new D2L.Util.DelayedReturn;this.ClearErrors(true).Register(function(){dr.Trigger(true)}); return dr},SetCustomStatus:function(icon,message){this.SetStatusHelper(icon,message)},SetStatus:function(type){if(type==D2L.Control.MessageArea.Status.None)return;var image="";var lang="";switch(type){case D2L.Control.MessageArea.Status.Saved:image="Shared.Main.actSave";lang="Framework.MessageArea.lblStatus1";break;case D2L.Control.MessageArea.Status.Deleted:image="Shared.Main.actDelete";lang="Framework.MessageArea.lblStatus2";break;case D2L.Control.MessageArea.Status.Created:image="Framework.MessageArea.actStatus3"; lang="Framework.MessageArea.lblStatus3";break;case D2L.Control.MessageArea.Status.Reordered:image="Shared.Main.actReorder";lang="Framework.MessageArea.lblStatus4";break;case D2L.Control.MessageArea.Status.Copied:image="Shared.Main.actCopy";lang="Framework.MessageArea.lblStatus5";break;case D2L.Control.MessageArea.Status.Imported:image="Framework.MessageArea.actStatus6";lang="Framework.MessageArea.lblStatus6";break;case D2L.Control.MessageArea.Status.Exported:image="Framework.MessageArea.actStatus7"; lang="Framework.MessageArea.lblStatus7";break;case D2L.Control.MessageArea.Status.Moved:image="Shared.Main.actMoveObject";lang="Framework.MessageArea.lblStatus8";break;case D2L.Control.MessageArea.Status.Added:image="Shared.Main.actAdd";lang="Framework.MessageArea.lblStatus9";break;case D2L.Control.MessageArea.Status.Removed:image="Shared.Main.actRemove";lang="Framework.MessageArea.lblStatus10";break;case D2L.Control.MessageArea.Status.Enrolled:image="Framework.MessageArea.actStatus11";lang="Framework.MessageArea.lblStatus11"; break;case D2L.Control.MessageArea.Status.Unenrolled:image="Framework.MessageArea.actStatus12";lang="Framework.MessageArea.lblStatus12";break;case D2L.Control.MessageArea.Status.Sent:image="Framework.MessageArea.actStatus13";lang="Framework.MessageArea.lblStatus13";break}this.SetStatusHelper(new D2L.Images.ImageTerm(image),new D2L.LP.Text.LangTerm(lang))},SetStatusHelper:function(icon,message){var me=this;if(D2L.LP.Web.UI.Flags.Flag("US116579-toasts",true)){D2L.WebComponentsReady.then(function(){message.GetText().Register(function(text){var alertToast= me.GetUI().CreateElement("d2l-alert-toast");alertToast.setAttribute("type","default");alertToast.setAttribute("open","open");alertToast.appendChild(me.GetUI().CreateTextNode(text));me.GetUI().GetById("d2l_body").appendChild(alertToast)})});return}if(!this.IsRendered())return;if(this.m_domStatus===null)this.BuildDom_Status();var img=this.m_domStatusLiveRegion.firstChild;if(icon)icon.Assign(img,false);else{img.alt="";img.src="/d2l/img/lp/pixel.gif"}if(this.m_domStatusText!==null)this.m_domStatusLiveRegion.removeChild(this.m_domStatusText); message.GetText().Register(function(text){setTimeout(function(){me.m_domStatusText=me.GetUI().CreateTextNode(text);me.m_domStatusLiveRegion.appendChild(me.m_domStatusText);me.ShowStatus()})})},SetMessages:function(messages){var me=this;this.Reset().Register(function(){if(messages.HasErrors()){me.m_errorDescription=messages.m_errorDescription;for(var i=0;i<messages.m_errors.length;i++)me.AddErrorObj(messages.m_errors[i]);me.ShowErrors()}else if(messages.HasCustomStatus())me.SetCustomStatus(messages.GetCustomIcon(), messages.GetCustomMessage());else me.SetStatus(messages.GetStatusType())})},ShowStatus:function(){var me=this;this.m_domStatus.style.opacity="0";this.m_domStatus.style.bottom="6.5em";var anim=new YAHOO.util.Anim(this.m_domStatus.id,{opacity:{to:1}},0.3,YAHOO.util.Easing.easeInStrong);anim.onComplete.subscribe(function(){me.m_domStatus.style.opacity="1"});anim.animate();this.FadeOutStatus()},FadeOutStatus:function(){var me=this;var RestoreOpacity=function(){me.m_domStatus.style.opacity="1"};this.m_fadeOutsWaiting++; setTimeout(function(){if(me.m_fadeOutsWaiting>1){me.m_fadeOutsWaiting--;return}var anim=new YAHOO.util.Anim(me.m_domStatus.id,{opacity:{to:0}},D2L.Control.MessageArea.FADE_OUT_DURATION,YAHOO.util.Easing.easeInStrong);anim.onTween.subscribe(function(){if(me.m_mouseOverStatus){anim.stop();setTimeout(RestoreOpacity)}else if(me.m_fadeOutsWaiting>1)anim.stop()});anim.onComplete.subscribe(function(){me.m_fadeOutsWaiting--;if(!me.m_mouseOverStatus&&me.m_fadeOutsWaiting==0){me.m_domStatus.style.bottom="-10000px"; me.m_domStatus.style.opacity="0"}});anim.animate()},D2L.Control.MessageArea.WAIT_DURATION)},ShowErrors:function(){if(this.m_numErrors===0)return new D2L.Util.DelayedReturn(true);this.RenderErrorLabel();return this.RenderHeight(true)}});D2L.Control.MessageArea.FADE_OUT_DURATION=2;D2L.Control.MessageArea.FADE_IN_DURATION=0.5;D2L.Control.MessageArea.WAIT_DURATION=4E3; D2L.Control.MessageArea.Error=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_errorText=new D2L.LP.Text.PlainText;this.m_controlId=null},Deserialize:function(deserializer){this.m_errorText=deserializer.GetObject("ErrorText");if(deserializer.HasMember("ControlId"))this.m_controlId=deserializer.GetObject("ControlId",D2L.Control.Id)}}); D2L.Control.MessageArea.Messages=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_customIcon=null;this.m_customMessage=null;this.m_errorDescription=new D2L.LP.Text.LangTerm("Framework.MessageArea.lblErrors");this.m_statusType=D2L.Control.MessageArea.Status.None;this.m_errors=[]},Deserialize:function(deserializer){this.m_statusType=deserializer.GetMember("StatusType");if(deserializer.HasMember("CustomIcon")&&deserializer.HasMember("CustomMessage")){this.m_customIcon= deserializer.GetObject("CustomIcon");this.m_customMessage=deserializer.GetObject("CustomMessage")}if(deserializer.HasMember("ErrorDescription"))this.m_errorDescription=deserializer.GetObject("ErrorDescription",D2L.LP.Text.IText);this.m_errors=deserializer.GetObjectArray("Errors",D2L.Control.MessageArea.Error)},GetCustomIcon:function(){return this.m_customIcon},GetCustomMessage:function(){return this.m_customMessage},GetStatusType:function(){return this.m_statusType},HasCustomStatus:function(){return this.m_customIcon!== null},HasErrors:function(){return this.m_errors.length>0}});D2L.Control.MessageArea.Status={None:0,Saved:1,Deleted:2,Created:3,Reordered:4,Copied:5,Imported:6,Exported:7,Moved:8,Added:9,Removed:10,Enrolled:11,Unenrolled:12,Sent:13};D2L.LP.Web.UI.Common={Controls:{MessageArea:{Init:function(){}}}}; D2L.Control.MenuBar=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_clearFloat=null;this.m_hasBorderTop=true;this.m_hasBorderRight=true;this.m_hasBorderBottom=true;this.m_hasBorderLeft=true;this.m_isDisplayed=true;this.m_padding=new D2L.Style.Spacing(D2L.Style.Spacing.Type.Padding,D2L.Style.Spacing.UnitType.Pixel,2);this.m_spacing=new D2L.Style.Spacing(D2L.Style.Spacing.Type.Spacing,D2L.Style.Spacing.UnitType.Pixel,0)},BuildDom:function(){if(this.IsRendered())return; arguments.callee.$.BuildDom.call(this);var domNode=this.SetDomNode(this.GetUI().CreateElement("div"));domNode.className="dmb";this.IChildrenDomNode=this.GetUI().CreateElement("div");domNode.appendChild(this.IChildrenDomNode);this.m_clearFloat=new D2L.Control.ClearFloat;this.m_clearFloat.AppendTo(domNode);this.RenderIsDisplayed();this.RenderPadding();this.RenderSpacing();this.InstallEvents()},GetPadding:function(){return this.m_padding},GetSpacing:function(){return this.m_spacing},HasBorderTop:function(){return this.m_hasBorderTop}, HasBorderRight:function(){return this.m_hasBorderRight},HasBorderBottom:function(){return this.m_hasBorderBottom},HasBorderLeft:function(){return this.m_hasBorderLeft},IntegrateControl:function(deserializer){arguments.callee.$.IntegrateControl.call(this,deserializer);this.IChildrenDomNode=this.GetDomNode().firstChild;this.m_hasBorderTop=deserializer.GetMember("HasBorderTop",true);this.m_hasBorderRight=deserializer.GetMember("HasBorderRight",true);this.m_hasBorderBottom=deserializer.GetMember("HasBorderBottom", true);this.m_hasBorderLeft=deserializer.GetMember("HasBorderLeft",true);this.m_isDisplayed=deserializer.GetMember("IsDisplayed",true);if(deserializer.HasMember("Padding"))this.m_padding=deserializer.GetObject("Padding");if(deserializer.HasMember("Spacing"))this.m_spacing=deserializer.GetObject("Spacing");this.InstallEvents()},InstallEvents:function(){var me=this;this.m_spacing.OnChange().RegisterMethod(function(){me.RenderSpacing()});this.m_padding.OnChange().RegisterMethod(function(){me.RenderPadding()})}, IsDisplayed:function(){return this.m_isDisplayed},RenderBorder:function(direction,hasBorder){if(this.IsRendered()){var value=hasBorder?"solid":"none";this.GetDomNode().style["border"+direction+"Style"]=value}},RenderIsDisplayed:function(){if(this.IsRendered())this.GetDomNode().style.display=this.IsDisplayed()?"block":"none"},RenderPadding:function(){if(this.IsRendered())this.GetDomNode().style.padding=this.GetPadding().ToCss()},RenderSpacing:function(){if(this.IsRendered())this.GetDomNode().style.margin= this.GetSpacing().ToCss()},SetHasBorderTop:function(hasBorderTop){this.m_hasBorderTop=hasBorderTop;this.RenderBorder("Top",hasBorderTop)},SetHasBorderRight:function(hasBorderRight){this.m_hasBorderRight=hasBorderRight;this.RenderBorder("Right",hasBorderRight)},SetHasBorderBottom:function(hasBorderBottom){this.m_hasBorderBottom=hasBorderBottom;this.RenderBorder("Bottom",hasBorderBottom)},SetHasBorderLeft:function(hasBorderLeft){this.m_hasBorderLeft=hasBorderLeft;this.RenderBorder("Left",hasBorderLeft)}, SetIsDisplayed:function(isDisplayed){this.m_isDisplayed=isDisplayed;this.RenderIsDisplayed()}}); D2L.Nav=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_params=null;this.OnBeforeNavigate=new D2L.EventHandler;this.OnNavigate=new D2L.EventHandler;this.OnNavigationFailure=new D2L.EventHandler},Go:function(navInfo,skipValidation,skipHandlers){var result=true;if(!skipHandlers&&(navInfo.target=="_self"||navInfo.target=="_parent"||navInfo.target===""||navInfo.action=="RPC")){result=this.OnBeforeNavigate.Trigger(navInfo);if(!result)this.OnNavigationFailure.Trigger(navInfo)}if(result)if(navInfo.IsAction())this.GoAction(navInfo, skipValidation);else{if(navInfo.target=="_self"||navInfo.target=="_parent"||navInfo.target===""||navInfo.action=="RPC"){result=this.OnNavigate.Trigger(navInfo);if(!result)this.OnNavigationFailure.Trigger(navInfo);else navInfo.OnNavigate.Trigger(navInfo)}if(result)if(navInfo.IsReload())this.GoSelf(navInfo);else this.GoTo(navInfo)}},GoRpc:function(rpc,rpcPage,ni){var PostCallback=function(rpcResponse){if(rpcResponse.GetResponseType()==D2L.Rpc.ResponseType.Success)if(ni)Nav.Go(ni)};D2L.Rpc.CreatePost(rpc, PostCallback,rpcPage).Call()},SetAnchor:function(anchor){if(window.location.hash==anchor||window.location.hash=="#"+anchor)window.location.hash="d2l";window.location.hash=anchor},GetAnchor:function(){var ret=window.location.href.split("#")[1];if(!ret)ret="";return ret},GetParam:function(name){if(!this.m_params)this.m_params=this.GetParamArray();if(this.m_params[name])return this.m_params[name];else return null},Reload:function(navParams,skipHandlers){var n=new D2L.NavInfo;if(navParams)for(var paramName in navParams.m_params)n.SetParam(paramName, navParams.m_params[paramName]);this.Go(n,true,skipHandlers)},SubmitAction:function(action,actionParam,navParams){var n=new D2L.NavInfo;if(!action){alert("action is required for the Nav.SubmitAction function");return}n.action=action;if(actionParam)n.actionParam=actionParam;if(navParams)for(var paramName in navParams.m_params)n.SetParam(paramName,navParams.m_params[paramName]);this.Go(n)},GetWindow:function(target){function hasSafeParent(win){try{var throwsIfXDomain=win.parent.document;return win.parent!== win}catch(xdomainErr){return false}}if(!target||target===""||target=="_self")return window;else if(target=="_parent")return hasSafeParent(window)?window.parent:window;else if(target=="_top"){var candidate=window;while(hasSafeParent(candidate))candidate=candidate.parent;return candidate}else if(target=="_blank")return null;else try{return D2L.Util.Html.FindFrame(target,window)}catch(e){return null}},GetParamArray:function(){var params=new Object;var qs=window.location.href.split("?")[1];if(qs)qs=qs.split("#")[0]; else qs="";var currName,currVal;if(qs.length>0){var qsArr=qs.split("&");var len=qsArr.length;for(var x=0;x<len;x++){currName=qsArr[x].split("=")[0];currVal=qsArr[x].split("=")[1];if(currName){if(!currVal)currVal="";currName=D2L.Util.Url.Decode(currName);currVal=D2L.Util.Url.Decode(currVal);params[currName]=currVal}}}return params},GoTo:function(navInfo){var href=navInfo.GetHref();this.GoHelper(href,navInfo.target)},GoSelf:function(navInfo){UI.GetStateManager().SetSaveStateOnUnload(false);UI.GetStateManager().AddStateToNavInfo(navInfo); var change=this.GetParam("d2l_change");var newChange="0";if(change)if(change=="0")newChange="1";else newChange="0";else newChange="0";navInfo.SetParam("d2l_change",newChange);var href=navInfo.GetHref();this.GoHelper(href,navInfo.target)},GoUrl:function(href){this.GoHelper(href,"_self")},GoHelper:function(href,target){if(href.length<2E3){var win=this.GetWindow(target);if(win)win.location.href=href;else if(target=="_blank")window.open(href);else window.open(href,target)}else{var body=document.getElementById("d2l_body"); var frm=document.createElement("form");body.appendChild(frm);var url=href.split("?")[0].split("#")[0];var qs=href.split("?")[1];if(!qs)qs="";var anchor=href.split("#")[1];if(!anchor)anchor="";var pairs=qs.split("&");var i;var newUrl=url;var firstTime=true;for(i=0;i<pairs.length;i++){var currPair=pairs[i];if(!currPair)currPair="";var currName=currPair.split("=")[0];if(!currName)currName="";var currVal=currPair.split("=")[1];if(!currVal)currVal="";if(currName.substring(0,9)=="d2l_state"){var input= document.createElement("input");input.type="hidden";input.name=D2L.Util.Url.Decode(currName);input.value=D2L.Util.Url.Decode(currVal);frm.appendChild(input)}else{if(firstTime){newUrl+="?";firstTime=false}else newUrl+="&";newUrl=newUrl+currName+"="+currVal}}if(anchor.length>0)newUrl=newUrl+"#"+anchor;var xsrfTokenInput=document.createElement("input");xsrfTokenInput.type="hidden";xsrfTokenInput.name=D2L.LP.Web.Authentication.Xsrf.GetXsrfTokenParameterName();xsrfTokenInput.value=D2L.LP.Web.Authentication.Xsrf.GetXsrfToken(); frm.appendChild(xsrfTokenInput);frm.method="post";frm.action=newUrl;frm.target=target;frm.submit()}},GoAction:function(navInfo,skipValidation,skipBeforeNavigateEvent){if(skipValidation===undefined)skipValidation=false;if(skipBeforeNavigateEvent===undefined)skipBeforeNavigateEvent=false;var me=this;var DoNavigation=function(){if(UI.form.target=="_self"||navInfo.target=="_parent"||UI.form.target===""||navInfo.action=="RPC")if(!me.OnNavigate.Trigger(navInfo))return;UI.GetByName("d2l_action").value=UI.form.d2l_submitted? "":navInfo.action;UI.GetByName("d2l_actionparam").value=navInfo.actionParam;if(navInfo.GetParam("d2l_rf")!==undefined)UI.GetByName("d2l_rf").value=navInfo.GetParam("d2l_rf");UI.form.action=navInfo.GetHref();if(navInfo.target&&navInfo.target.length>0)UI.form.target=navInfo.target;if(navInfo.IsAction())UI.GetMultiEditManager().AddMultiEditToForm();if(!navInfo.IgnoreState()){UI.GetStateManager().SetSaveStateOnUnload(false);UI.GetStateManager().AddStateToForm()}UI.GetControlMap().AddControlMapToForm(); var goesToLegacyPage=UI.form.action.indexOf("/d2l/tools/")>=0;if(goesToLegacyPage){var hasFileInput=false;var arrElements=UI.form.elements;var currElemLength=arrElements.length;var currElem;for(var i=0;i<currElemLength;i++){currElem=arrElements[i];if(currElem.name&&currElem.type&&currElem.name=="input"&&currElem.type=="file"){hasFileInput=true;break}}if(!hasFileInput&&!navInfo.doMultipartSubmission){UI.form.enctype="application/x-www-form-urlencoded";UI.form.encoding="application/x-www-form-urlencoded"}}var xsrfTokenParameterName= D2L.LP.Web.Authentication.Xsrf.GetXsrfTokenParameterName();UI.GetByName(xsrfTokenParameterName).value=D2L.LP.Web.Authentication.Xsrf.GetXsrfToken();UI.form.method="post";UI.GenerateHitCode();if((UI.GetBrowserInfo().Type==D2L.UI.BrowserType.Safari||UI.GetBrowserInfo().Type==D2L.UI.BrowserType.Chrome)&&UI.GetBodyType()!=D2L.UI.BodyType.Normal)setTimeout(function(){UI.form.submit()});else UI.form.submit();if(UI.form.target=="_self"||UI.form.target==="")UI.form.d2l_submitted=true};if(!skipValidation)UI.GetValidationManager().Validate(["Action", "Action"+navInfo.action]).Register(function(success){if(success)DoNavigation();else me.OnNavigationFailure.Trigger(navInfo)});else DoNavigation()},GetNavigation:function(){var ret=window.location.href.split("?")[0];if(!ret)ret="";ret=ret.split("#")[0];if(ret.indexOf("/d2l/")>=0)ret=ret.substring(ret.indexOf("/d2l/"),ret.length);return ret},OpenWindow:function(name,navigation,width,height,hasMenubar,hasScrollbars,hasToolbar,hasLocation){if(width===undefined)width=640;if(height===undefined)height=480; if(hasMenubar===undefined)hasMenubar=true;if(hasScrollbars===undefined)hasScrollbars=true;if(hasToolbar===undefined)hasToolbar=true;if(hasLocation===undefined)hasLocation=true;name=name.replace(".","_");var features="width="+width+",height="+height+","+"location="+(hasLocation?"1":"0")+","+"menubar="+(hasMenubar?"1":"0")+","+"resizable=1,"+"scrollbars="+(hasScrollbars?"1":"0")+","+"status=0,"+"toolbar="+(hasToolbar?"1":"0");var w=window.open(navigation,name,features);if(w)w.focus()}}); D2L.NavInfo=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.action="none";this.actionParam="";this.anchor="";this.doSmartScroll=false;this.navigation=Nav.GetNavigation();this.target="_self";this.m_params={};this.m_ignoreState=false;this.m_ignoreCurrentQueryParamsOnReload=false;this.m_event="";this.m_eventParams="";this.m_statusIsSet=false;this.m_forceSaveConfirmation=false;this.m_isNavigationSet=false;this.m_onClick=null;this.OnNavigate=new D2L.EventHandler},ForceSaveConfirmation:function(){this.m_forceSaveConfirmation= true},GetAction:function(){return this.action},GetActionParam:function(){return this.actionParam},GetAnchor:function(){return this.anchor},GetHref:function(){var isAction=this.IsAction();var newParams;var currName;var currVal;var navigation=this.navigation;var params=new Object;var anchor=this.anchor;for(var n in this.m_params)params[n]=this.m_params[n];if(!anchor||anchor.length===0){anchor=navigation.split("#")[1];if(!anchor)anchor=""}navigation=navigation.split("#")[0];if(navigation.indexOf("?")> 0){var navQs=navigation.split("?")[1];navigation=navigation.split("?")[0];var navQsArr=navQs.split("&");for(var i=0;i<navQsArr.length;i++){var nameValArr=navQsArr[i].split("=");currName=D2L.Util.Url.Decode(nameValArr[0]);if(nameValArr.length==2)currVal=D2L.Util.Url.Decode(nameValArr[1]);else currVal=undefined;if(currName&&!params[currName])params[currName]=currVal}}if(this.IsReload()&&!this.m_ignoreCurrentQueryParamsOnReload){newParams=Nav.GetParamArray();for(currName in params)newParams[currName]= params[currName];var scrollx,scrolly;if(this.doSmartScroll){scrollx=UI.GetScrollLeft();scrolly=UI.GetScrollTop()}else{scrollx=null;scrolly=null}newParams["d2l_scrollx"]=scrollx;newParams["d2l_scrolly"]=scrolly;if(!this.m_statusIsSet)newParams["dst"]=null}else{newParams=params;if(!this.IsExternal()&&this.GetTarget().toLowerCase()!="_top"&&this.GetTarget().toLowerCase()!="_blank"){var oldParams=Nav.GetParamArray();if(oldParams["d2l_body_type"])newParams["d2l_body_type"]=oldParams["d2l_body_type"]}}if(!newParams["ou"]&& !this.IsExternal())newParams["ou"]=Nav.GetParam("ou")||Global.OrgUnitId;var qs="";var amp="";for(currName in newParams)if(newParams[currName]!==null)if(D2L.Util.JavaScript.IsArray(newParams[currName]))for(var i=0;i<newParams[currName].length;i++){qs+=amp+D2L.Util.Url.Encode(currName)+"="+D2L.Util.Url.Encode(newParams[currName][i]);amp="&"}else{qs+=amp+D2L.Util.Url.Encode(currName);if(newParams[currName]!==undefined)qs+="="+D2L.Util.Url.Encode(newParams[currName]);amp="&"}var ret=navigation;if(qs.length> 0)ret+="?"+qs;if(anchor.length>0)ret+="#"+D2L.Util.Url.Encode(anchor);return ret},GetNavigation:function(){return this.navigation},GetOnClick:function(){return this.m_onClick},GetEventParams:function(){return this.m_eventParams},GetEvent:function(){return this.m_event},GetParam:function(name){return this.m_params[name]},GetTarget:function(){return this.target},HasSmartScroll:function(){return this.doSmartScroll},IgnoreState:function(){return this.m_ignoreState},IsAction:function(){return!(this.action.toString().toLowerCase()== "none")},IsEvent:function(){return this.m_event!==""},IsExternal:function(){var hasProtocal=this.navigation.search(new RegExp("^[a-zA-Z]+:","i"))>-1;return hasProtocal},IsReload:function(){return this.navigation.split("#")[0].split("?")[0].toLowerCase()==Nav.GetNavigation().split("#")[0].split("?")[0].toLowerCase()},SetAction:function(action){this.action=action},SetActionParam:function(actionParam){this.actionParam=actionParam},SetAnchor:function(anchor){this.anchor=anchor},SetEventParams:function(eventParams){this.m_eventParams= eventParams},SetEvent:function(event){this.m_event=event},SetHasSmartScroll:function(doSmartScroll){this.doSmartScroll=doSmartScroll},SetIgnoreCurrentQueryParamsOnReload:function(bool){this.m_ignoreCurrentQueryParamsOnReload=bool},SetIgnoreState:function(ignoreState){this.m_ignoreState=ignoreState},SetMessageAreaStatusType:function(statusType){this.SetParam("dst",statusType);this.m_statusIsSet=true},SetNavigation:function(navigation){if(navigation&&navigation!=""){if(navigation.toLowerCase()!="self")this.navigation= navigation;this.m_isNavigationSet=true}},SetOnClick:function(onClick){this.m_onClick=onClick},SetParam:function(name,value){if(!name)return;name=name.toString();if(name.length===0)return;if(value===null)value="";if(D2L.Util.JavaScript.IsArray(value))this.m_params[name]=value;else this.m_params[name]=value.toString()},SetTarget:function(target){this.target=target},SetupHrefOnClick:function(control,hasHref){var result=[];var executeHref=false;if(hasHref===undefined)hasHref=true;result["Href"]=null; result["OnClick"]=null;result["Target"]=null;if(hasHref&&!this.IsAction()&&this.m_isNavigationSet&&!this.IsReload()&&!this.IsEvent()){result["Href"]=this.GetHref();if(this.GetTarget()!="_self"&&this.GetTarget()!=""&&this.GetTarget()!=null)result["Target"]=this.GetTarget();if(result["Href"].length<2E3)executeHref=true;else{executeHref=false;result["Href"]="javascript://"}}else if(hasHref)result["Href"]="javascript://";var me=this;var onClickFunction=function(){if(me.IsEvent())if(Events!==undefined)Events[me.GetEvent()].Raise(me.GetEventParams()); if(me.GetOnClick()!=null)me.GetOnClick().call(control);if(!hasHref||!executeHref){if(me.m_isNavigationSet||me.IsAction())Nav.Go(me);return false}else return true};result["OnClick"]=onClickFunction;return result},Deserialize:function(deserializer){if(deserializer.HasMember("Action"))this.SetAction(deserializer.GetMember("Action"));if(deserializer.HasMember("ActionParam"))this.SetActionParam(deserializer.GetMember("ActionParam"));if(deserializer.HasMember("Anchor"))this.SetAnchor(deserializer.GetMember("Anchor")); if(deserializer.HasMember("Navigation"))this.SetNavigation(deserializer.GetMember("Navigation"));if(deserializer.HasMember("OnClick")){var onClick=deserializer.GetMember("OnClick");onClick=new Function(onClick);this.SetOnClick(onClick)}this.SetTarget(deserializer.GetMember("Target","_self"));if(deserializer.HasMember("NavParams"))this.m_params=deserializer.GetDictionary("NavParams");if(deserializer.HasMember("Event"))this.SetEvent(deserializer.GetMember("Event"));if(deserializer.HasMember("EventParams"))this.SetEventParams(deserializer.GetMember("EventParams"))}, DeserializeMin:function(deserializer){this.SetAction(deserializer.GetMember());this.SetActionParam(deserializer.GetMember());this.SetAnchor(deserializer.GetMember());this.SetNavigation(deserializer.GetMember());var onClick=deserializer.GetMember();onClick=new Function(onClick);this.SetOnClick(onClick);this.SetTarget(deserializer.GetMember());this.m_params=deserializer.GetDictionaryMin();this.SetEvent(deserializer.GetMember());this.SetEventParams(deserializer.GetMember())},Serialize:function(serializer){serializer.AddMember("A", this.GetAction());serializer.AddMember("AP",this.GetActionParam());serializer.AddMember("AN",this.GetAnchor());if(this.m_isNavigationSet)serializer.AddMember("N",this.GetNavigation());else serializer.AddMember("N","");var onClick="";if(this.GetOnClick())onClick=this.GetOnClick().toString();if(onClick.substr(0,8)=="function")onClick=onClick.substring(onClick.indexOf("{")+1,onClick.lastIndexOf("}"));serializer.AddMember("O",onClick);serializer.AddMember("T",this.GetTarget());var data=new D2L.Util.Dictionary; for(i in this.m_params)if(this.m_params)data.Add(i.toString(),this.m_params[i].toString());serializer.AddMember("NP",data);serializer.AddMember("E",this.GetEvent());serializer.AddMember("EP",this.GetEventParams())}});D2L.NavParams=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_params=new Object},SetParam:function(name,value){if(!name)return;name=name.toString();if(name.length===0)return;if(value===null)value="";this.m_params[name]=value.toString()}}); D2L.UI.AriaController=D2L.Class.extend({Construct:function(ui){arguments.callee.$.Construct.call(this);this.m_ui=ui;if(D2L.Util.Aria.IsEnabled()){var me=this;this.m_ui.OnPageLoad().RegisterMethod(function(){me.OnPageLoad()})}},OnPageLoad:function(){var main=this.m_ui.GetById("d_content");if(main!==null)try{var topWindow=window.top;var topMost=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-page-main",topWindow.contentDocument);var bodyType=this.m_ui.GetBodyType();if(bodyType==D2L.UI.BodyType.Frame)D2L.Util.Aria.SetRole(main, "complementary");else if(bodyType!=D2L.UI.BodyType.IFrame&&main.getAttribute("role")===null)if(main==topMost)D2L.Util.Aria.SetRole(main,"main")}catch(e){}}}); D2L.FormManager=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_fileUploads=[];this.hasChanged=false;this.m_uploadIsPrepared=false;this.m_hasSaveConfirmation=false;this.m_hasSaveConfirmationOriginal=false;this.m_formElementDisabled=[];this.m_saveConfirmationDialog=null;this.m_saveConfirmationMethod=null;this.m_skipUploads=false;this.OnChange=new D2L.EventHandler;this.OnChangeReset=new D2L.EventHandler;this.IDomNode=null;Nav.OnNavigate.Register(this,"ShowSaveConfirmation"); Nav.OnNavigate.Register(this,"UploadFilesNav");var me=this;UI.OnPageLoad().RegisterMethod(function(){me.IDomNode=UI.GetById("d2l_form");if(me.IDomNode){me.AttachObject(me.IDomNode,"ID2L",this);me.AttachObject(me.IDomNode,"ID2LOnChange",new D2L.EventHandler);me.IDomNode.ID2LOnChange.Register(me,"HandleFormChange");me.AttachObject(me.IDomNode,"ID2LOnTransform",new D2L.EventHandler);me.IDomNode.ID2LOnTransform.Register(me,"HandleTransform")}})},ForceChange:function(elem){if(elem===undefined||elem=== null){this.hasChanged=true;return}if(D2L.Util.IsD2LControl(elem))elem=elem.GetDomNode();WindowEventManager.BubbleChangeEvent(elem,null)},GetSaveConfirmationDialog:function(){if(!this.m_saveConfirmationDialog)this.m_saveConfirmationDialog=new D2L.Dialog.SaveConfirmation;return this.m_saveConfirmationDialog},HandleFormChange:function(event){if(event.hasChangeBeenShown){this.hasChanged=true;this.OnChange.Trigger(event)}},HandleTransform:function(event){WindowEventManager.Transform.Trigger(event)},HasChanged:function(){return this.hasChanged}, ResetChanges:function(){this.hasChanged=false;this.m_hasSaveConfirmation=this.m_hasSaveConfirmationOriginal;this.OnChangeReset.Trigger()},SetHasSaveConfirmation:function(hasSaveConfirmation){this.m_hasSaveConfirmation=hasSaveConfirmation},SetSaveConfirmation:function(methodName){if(methodName.length>0)if(window[methodName])this.m_saveConfirmationMethod=window[methodName];this.m_hasSaveConfirmation=true;this.m_hasSaveConfirmationOriginal=true},ShowSaveConfirmation:function(ni){if(this.m_hasSaveConfirmation&& this.HasChanged()&&(!ni.IsAction()||ni.m_forceSaveConfirmation)){var formManager=this;var DoNavigation=function(ret){if(ret){formManager.m_hasSaveConfirmation=false;setTimeout(function(){Nav.Go(ni)})}};var DialogCallback=function(response){if(response.GetType()==D2L.Dialog.ResponseType.Positive)if(formManager.m_saveConfirmationMethod){var dr=formManager.m_saveConfirmationMethod();dr.Register(function(ret){if(ret===true)DoNavigation(true)})}else{var PostCallback=function(response){if(response.GetResponseType()== D2L.Rpc.ResponseType.Success)return true;else return false};var dr=D2L.Rpc.CreatePost("Save",PostCallback).Call();dr.Register(DoNavigation)}else if(response.GetType()==D2L.Dialog.ResponseType.Negative)DoNavigation(true)};var dialog=this.GetSaveConfirmationDialog();dialog.SetCallback(DialogCallback);dialog.Open();return false}return true},RegisterFileUpload:function(fileUpload){this.m_fileUploads.push(fileUpload)},PrepareForUpload:function(delayedReturn){var me=this;if(!this.m_uploadIsPrepared){var formAction= UI.form.action;var formTarget=UI.form.target;delayedReturn.Register(function(){try{UI.form.action=formAction;UI.form.target=formTarget}catch(e){}for(var x in me.m_formElementDisabled)me.m_formElementDisabled[x].disabled=false;me.m_uploadIsPrepared=false});var iframe=UI.GetById("upload_frame");if(iframe===null)if(document.body.insertAdjacentHTML)document.body.insertAdjacentHTML("beforeEnd","<iframe id='upload_frame' name='upload_frame' style='position:absolute;left:-200px;top:-200px;width:1px;height:1px;'></iframe>"); else{iframe=document.createElement("iframe");iframe.id="upload_frame";iframe.name="upload_frame";iframe.style.position="absolute";iframe.style.left="-200px";iframe.style.top="-200px";iframe.style.width="1px";iframe.style.height="1px";document.body.appendChild(iframe)}UI.form.target="upload_frame";this.m_uploadIsPrepared=true}for(var i=0;i<UI.form.elements.length;i++)if(!UI.form.elements[i].disabled&&UI.form.elements[i].tagName.toLowerCase()!="fieldset"){this.m_formElementDisabled.push(UI.form.elements[i]); UI.form.elements[i].disabled=true}},UploadFilesNav:function(ni){if(this.m_skipUploads||!ni.IsAction())return true;var numToUpload=0;for(var i=0;i<this.m_fileUploads.length;i++)numToUpload+=this.m_fileUploads[i].GetNumToUpload();if(numToUpload===0)return true;var me=this;this.UploadFiles().Register(function(success){if(success&&ni){me.m_skipUploads=true;Nav.Go(ni);me.m_skipUploads=false}});return false},UploadFiles:function(){var delayedReturn=new D2L.Util.DelayedReturn;var me=this;var FinishUpload= function(success){delayedReturn.Trigger(success)};if(this.m_fileUploads.length===0)FinishUpload(true);var Upload=function(index){if(index<me.m_fileUploads.length){var uploadReturn=me.m_fileUploads[index].Upload();uploadReturn.Register(function(success){if(success)Upload(++index);else FinishUpload(false)})}else FinishUpload(true)};var totalUploads=0;var PrepareUpload=function(index){if(index<me.m_fileUploads.length){var fi=me.m_fileUploads[index];if(fi.IsEnabled())fi.UploadPrepare().Register(function(numUploads){if(numUploads< 0)FinishUpload(false);else totalUploads+=numUploads;if(index==me.m_fileUploads.length-1)if(totalUploads===0)FinishUpload(true);else{me.PrepareForUpload(delayedReturn);Upload(0)}PrepareUpload(++index)})}};PrepareUpload(0);return delayedReturn}}); D2L.UI.ShimController=D2L.Class.extend({Construct:function(ui){arguments.callee.$.Construct.call(this);this.m_shims=[];this.m_ui=ui;var me=this;ui.OnPageUnload().RegisterMethod(function(){me.ClearShims()})},ClearShim:function(handle){if(handle===undefined||handle===null)return;for(var i=0;i<this.m_shims.length;i++)if(this.m_shims[i]==handle){this.m_shims.splice(i,1);break}for(var i=0;i<handle.shims.length;i++)if(handle.shims[i]!==null)handle.shims[i].SetIsVisible(false)},ClearShims:function(depth){if(depth=== undefined||depth==-1||depth>this.m_shims.length)depth=this.m_shims.length;for(var i=0;i<depth;i++){var shimsData=this.m_shims.pop();for(var j=0;j<shimsData.shims.length;j++)if(shimsData.shims[j]!==null)shimsData.shims[j].SetIsVisible(false)}},ShimWindow:function(w,isTimeBased,isTransparent){var me=this;var shims=[];var TravelDown=function(win){var wFrames=win.document.getElementsByTagName("frame");var iframes=win.document.getElementsByTagName("iframe");var shimFrame=wFrames.length===0;for(var i=0;i< wFrames.length;i++)try{TravelDown(wFrames[i].contentWindow)}catch(e){}for(var i=0;i<iframes.length;i++){var test=null;try{if(iframes[i].contentWindow!==undefined&&iframes[i].contentWindow.document!=undefined)test=iframes[i].contentWindow.document.location}catch(e){}if(isTransparent||test===null)shims.push(me.AddShim(win,iframes[i],isTimeBased,isTransparent));else if(D2L.LP.Web.UI.Html.Dom.HasClassName("dif",iframes[i])&&(iframes[i].offsetWidth>0||iframes[i].offsetHeight>0)){shimFrame=false;TravelDown(iframes[i].contentWindow)}}if(shimFrame)shims.push(me.AddShim(win, win.document,isTimeBased,isTransparent))};var w=window;while(w.parent!=w)w=w.parent;TravelDown(w);return shims},AddShim:function(w,domNode,isTimeBased,isTransparent){if(w===undefined)w=window;if(isTimeBased===undefined)isTimeBased=false;if(isTransparent==undefined)isTransparent=false;var ui=this.m_ui;var offset=0;if(ui.GetBrowserInfo().Type==D2L.UI.BrowserType.IE)offset=-1;var shim=null;try{shim=new D2L.Control.Shim(domNode,isTimeBased,ui.GetZIndex());if(isTransparent)shim.SetBackgroundColour("transparent"); shim.SetWindow(w);shim.SetIsVisible(true)}catch(e){}return shim},Shim:function(control,isTimeBased,isTransparent){var shimsData={"control":control,"shims":[]};if(this.m_shims.length===0)shimsData.shims=this.ShimWindow(window,isTimeBased,isTransparent);else if(!isTimeBased){var prevShim=this.m_shims[this.m_shims.length-1];shimsData.shims.push(this.AddShim(window,prevShim.control.GetDomNode(),isTimeBased,isTransparent))}this.m_shims.push(shimsData);if(control)control.IDomNode.style.zIndex=this.m_ui.GetZIndex(); return shimsData}});D2L.UI.BodyType={Normal:0,Frame:1,Dialog:2,IFrame:3,PrimaryFrame:4};D2L.UI.BrowserType={Unknown:0,IE:1,Safari:4,Firefox:6,Chrome:10}; D2L.Control.UserProfileBadge=D2L.Control.extend({Construct:function(userProfileBadgeInfo){arguments.callee.$.Construct.call(this);this.m_cacheBuster="";this.m_isDisplayed=true;this.m_orgId=0;this.m_size=100;this.m_userId=0;this.m_contextUserId=0;this.m_userProfileBadgeInfo=null;if(userProfileBadgeInfo!==undefined)this.m_userProfileBadgeInfo=userProfileBadgeInfo},BuildDom:function(){if(this.IsRendered())return;arguments.callee.$.BuildDom.call(this);this.SetDomNode(this.CreateElement("img"));var profilebadgeImage= this.m_userProfileBadgeInfo.GetProfileBadgeImage();var delayedSrc=profilebadgeImage.GetSrc();var domNode=this.GetDomNode();var me=this;delayedSrc.Register(function(src){domNode.src=src;domNode.style.width=profilebadgeImage.GetWidth()+"px";domNode.style.height=profilebadgeImage.GetHeight()+"px"});this.m_userProfileBadgeInfo.GetProfileBadgeAlternativeText().AssignText(this.GetDomNode(),"alt")},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer); this.m_isDisplayed=this.GetDomNode().style.display!="none";this.m_orgId=deserializer.GetMember();this.m_userId=deserializer.GetMember();this.m_size=deserializer.GetMember();this.m_cacheBuster=deserializer.GetMember();this.m_contextUserId=deserializer.GetMember()},IsDisplayed:function(){return this.m_isDisplayed},SetFile:function(json){var fileInfo=D2L.Serialization.JsonDeserializer.Deserialize(json,D2L.Files.FileInfo);this.GetDomNode().src="/d2l/common/viewprofileimage.d2l?"+"oi="+this.m_orgId+"&ui="+ this.m_userId+"&s="+this.m_size+"&lm="+fileInfo.GetLastModified()+"&v="+this.m_cacheBuster+"&cui="+this.m_contextUserId},SetIsDisplayed:function(isDisplayed){if(this.IsRendered())this.GetDomNode().style.display=isDisplayed?"inline":"none";this.m_isDisplayed=isDisplayed},SetProfileImage:function(profileImage){if(profileImage!==null)this.GetDomNode().src=D2L.Control.Thumbnail.GetViewThumbUrl(profileImage,this.m_size);else{var me=this;var img=new D2L.Images.ImageTerm("Framework.UserProfileBadge.actProfile"+ this.m_size);img.GetSrc().Register(function(src){me.GetDomNode().src=src})}}}); D2L.Control.ProgressBar=D2L.Control.extend({Construct:function(progressId){arguments.callee.$.Construct.call(this);this.m_allowCancel=true;this.m_cancelCallback=null;this.m_domBar=null;this.m_domBarProgress=null;this.m_errorCode=null;this.m_errorMessage=null;this.m_pollInterval=3E3;this.m_progress=0;this.m_progressId=0;this.m_status=D2L.Control.ProgressBar.ProgressStatus.NotStarted;this.m_steps=[];this.m_total=0;this.OnStatusChange=new D2L.EventHandler;if(progressId!==undefined)this.SetProgressId(progressId)}, BuildDom:function(){if(this.IsRendered())return;arguments.callee.$.BuildDom.call(this);var me=this;var domNode=this.SetDomNode(this.GetUI().CreateElement("span"));domNode.className="dpb_c";this.m_domBar=this.GetUI().CreateElement("span");this.m_domBar.className="dpb_s";domNode.appendChild(this.m_domBar);this.m_domBarProgress=this.GetUI().CreateElement("img");this.m_domBarProgress.className="dpb_p";this.m_domBarProgress.alt="0%";this.m_domBarProgress.src="/d2l/img/lp/pixel.gif";this.m_domBarProgress.style.display= "none";this.m_domBar.appendChild(this.m_domBarProgress);this.m_domBarTotal=this.GetUI().CreateElement("img");this.m_domBarTotal.className="dpb_b";this.m_domBarTotal.alt="";this.m_domBarTotal.src="/d2l/img/lp/pixel.gif";this.m_domBar.appendChild(this.m_domBarTotal);this.m_domCancel=this.GetUI().CreateElement("a");this.m_domCancel.href="javascript://";this.AttachObject(this.m_domCancel,"onclick",function(){me.CancelConfirm()});this.m_domCancel.appendChild(this.GetUI().CreateTextNode(new D2L.LP.Text.LangTerm("Framework.ProgressBar.lblCancel"))); this.m_domCancel.className="dpb_merr";this.m_domCancel.style.display="none";domNode.appendChild(this.m_domCancel);this.m_domMessage=this.GetUI().CreateElement("span");this.m_domMessage.className="dpb_merr";this.m_domMessage.style.display="none";domNode.appendChild(this.m_domMessage);this.m_domSteps=this.GetUI().CreateElement("ul");this.m_domSteps.className="dpb_sl";domNode.appendChild(this.m_domSteps);this.Render()},Cancel:function(doRpc){if(doRpc===undefined)doRpc=false;this.SetStatus(D2L.Control.ProgressBar.ProgressStatus.Cancel); this.Render();if(doRpc&&this.m_progressId>0)D2L.Rpc.Create("Cancel",undefined,"/d2l/common/rpc/progress/progress.d2l").Call(this.m_progressId)},CancelConfirm:function(){if(this.m_cancelCallback===null){this.Cancel(true);return}var me=this;this.m_cancelCallback.call(this.m_cancelCallback,this.m_domCancel).Register(function(proceed){if(proceed)me.Cancel(true)})},Complete:function(){this.SetProgress(this.m_total)},Fail:function(errorCode,errorMessage){if(errorCode===undefined)errorCode=null;if(errorMessage=== undefined||errorMessage.length===0)errorMessage=null;this.m_errorCode=errorCode;this.m_errorMessage=errorMessage;this.SetStatus(D2L.Control.ProgressBar.ProgressStatus.Fail);this.Render()},GetStatus:function(){return this.m_status},GetErrorCode:function(){if(this.GetStatus()==D2L.Control.ProgressBar.ProgressStatus.Fail)return this.m_errorCode;return null},GetErrorMessage:function(){if(this.GetStatus()==D2L.Control.ProgressBar.ProgressStatus.Fail)return this.m_errorMessage;return null},OnStatusChangeEvent:function(){return this.OnStatusChange}, Render:function(){var className="dpb_c";if(this.GetStatus()==D2L.Control.ProgressBar.ProgressStatus.Fail||this.GetStatus()==D2L.Control.ProgressBar.ProgressStatus.Cancel)className+=" dpb_cd";else if(this.m_progress==this.m_total)className+=" dpb_cc";this.GetDomNode().className=className;this.Render_Cancel();this.Render_Progress();this.Render_Message();this.Render_Steps()},Render_Cancel:function(){if(this.m_domCancel&&this.m_allowCancel)if(this.GetStatus()==D2L.Control.ProgressBar.ProgressStatus.InProgress)this.m_domCancel.style.display= "inline";else this.m_domCancel.style.display="none"},Render_Progress:function(){if(!this.m_domBar)return;var totalSrc="/d2l/img/lp/pixel.gif";var totalIsDisplayed=true;var progressIsDisplayed=true;var barIsDisplayed=true;if(this.GetStatus()==D2L.Control.ProgressBar.ProgressStatus.InProgress||this.GetStatus()==D2L.Control.ProgressBar.ProgressStatus.NotStarted||this.GetStatus()==D2L.Control.ProgressBar.ProgressStatus.Complete){var percent=0;if(this.m_total>0){var percent=Math.round(this.m_progress/ this.m_total*100);var width=Math.round(percent/100*28)*7;this.GetUI().GetMessageArea().AddAriaMessage(new D2L.LP.Text.PlainText(percent+"%"));this.m_domBarProgress.alt=percent+"%";this.m_domBarProgress.title=percent+"%";this.m_domBarProgress.style.width=width+"px"}else{progressIsDisplayed=false;totalSrc="/d2l/img/lp/progressBar/a.gif"}}this.m_domBarTotal.src=totalSrc;this.m_domBarTotal.style.display=totalIsDisplayed?"inline":"none";this.m_domBarProgress.style.display=progressIsDisplayed?"inline": "none";this.m_domBar.style.display=barIsDisplayed?"inline":"none"},Render_Message:function(){if(!this.m_domMessage)return;var term=null;if(this.GetStatus()==D2L.Control.ProgressBar.ProgressStatus.NotStarted){term=new D2L.LP.Text.LangTerm("Framework.ProgressBar.lblPleaseWait");this.m_domMessage.style.color="#000000"}else if(this.GetStatus()==D2L.Control.ProgressBar.ProgressStatus.Cancel){term=new D2L.LP.Text.LangTerm("Framework.ProgressBar.lblCancelled");this.m_domMessage.style.color="#cc0000"}else if(this.GetStatus()== D2L.Control.ProgressBar.ProgressStatus.Fail){if(this.m_errorMessage!==null)term=new D2L.LP.Text.LangTerm("Framework.ProgressBar.lblErrorWithMessage",this.m_errorMessage);else term=new D2L.LP.Text.LangTerm("Framework.ProgressBar.lblError");this.m_domMessage.style.color="#cc0000"}else if(this.GetStatus()==D2L.Control.ProgressBar.ProgressStatus.Complete){this.m_domMessage.style.color="#000000";term=new D2L.LP.Text.LangTerm("Framework.ProgressBar.lblComplete")}if(term!==null){this.GetUI().GetMessageArea().AddAriaMessage(term); term.AssignText(this.m_domMessage,"innerHTML",true);this.m_domMessage.style.display="inline"}else this.m_domMessage.style.display="none"},Render_Steps:function(){if(!this.m_domSteps)return;for(var i=0;i<this.m_steps.length;i++){var step=this.m_steps[i];var created=true;if(this.m_domSteps.childNodes.length<=i){this.m_domSteps.appendChild(this.CreateElement("li"));created=false}var domStep=this.m_domSteps.childNodes[i];var inProgress=domStep.className=="dbp_sip";var className="";if(step.Status==D2L.Control.ProgressBar.ProgressStatus.InProgress){if(!inProgress|| !created)this.GetUI().GetMessageArea().AddAriaMessage(new D2L.LP.Text.PlainText(step.Title));className="dbp_sip"}else if(step.Status==D2L.Control.ProgressBar.ProgressStatus.Complete)className="dbp_sc";domStep.className=className;domStep.innerHTML=step.Title}this.m_domSteps.style.display=this.m_steps.length>0?"block":"none"},SetAllowCancel:function(allowCancel){this.m_allowCancel=allowCancel;this.Render_Cancel()},SetCancelCallback:function(callback){this.m_cancelCallback=callback},SetProgressId:function(progressId){this.m_progressId= progressId;this.Start()},SetProgress:function(progress){if(progress>=this.m_total)progress=this.m_total;if(progress<0)progress=0;if(progress!=this.m_progress){if(progress==this.m_total)this.SetStatus(D2L.Control.ProgressBar.ProgressStatus.Complete);else if(progress>0)this.SetStatus(D2L.Control.ProgressBar.ProgressStatus.InProgress);this.m_progress=progress;this.Render()}},SetStatus:function(status){if(this.GetStatus()!=status){this.m_status=status;this.OnStatusChange.Trigger(this.m_status)}},Start:function(){var me= this;var callback=function(response){if(response.GetResponseType()==D2L.Rpc.ResponseType.Success){var pbi=response.GetResult();me.m_total=pbi.Total;me.SetProgress(pbi.Progress);me.m_steps=pbi.Steps;me.Render_Steps();if(pbi.Status==D2L.Control.ProgressBar.ProgressStatus.Cancel)me.Cancel(false);else if(pbi.Status==D2L.Control.ProgressBar.ProgressStatus.Fail)me.Fail(pbi.ErrorCode,pbi.ErrorMessage);else if(pbi.Status==D2L.Control.ProgressBar.ProgressStatus.InProgress||pbi.Status==D2L.Control.ProgressBar.ProgressStatus.NotStarted)if(response.GetDuration()>= me.m_pollInterval)poll();else setTimeout(poll,me.m_pollInterval-response.GetDuration())}else me.Cancel(false)};var poll=function(){if(me.GetStatus()<D2L.Control.ProgressBar.ProgressStatus.Complete)D2L.Rpc.Create("GetProgressBar",callback,"/d2l/common/rpc/progress/progress.d2l").Call(me.m_progressId)};poll()}});D2L.Control.ProgressBar.ProgressStatus={NotStarted:1,InProgress:2,Complete:3,Fail:4,Cancel:5}; D2L.Control.RadioButton=D2L.Control.extend({Construct:function(group,text,value){arguments.callee.$.Construct.call(this);if(group===undefined)group="";text=D2L.LP.Text.IText.Normalize(text,"D2L.Control.RadioButton","Constructor","text");if(value===undefined)value="";this.m_group=group;this.m_text=text;this.m_value=value;this.m_isEnabled=true;this.m_label=null;this.m_input=null;this.m_isSelected=false;this.m_showText=true;this.m_onClickEvent=new D2L.EventHandler},BuildDom:function(){if(this.IsRendered())return; arguments.callee.$.BuildDom.call(this);this.SetDomNode(this.GetUI().CreateElement("span"));this.m_input=this.GetUI().CreateElement("input");this.m_input.type="radio";this.m_input.name=this.m_group;this.m_input.className="d2l-radio";this.m_input.id=this.GetMappedId();this.m_input.value=this.m_value;this.GetDomNode().appendChild(this.m_input);this.SetIsSelected(this.m_isSelected);this.SetIsEnabled(this.m_isEnabled);this.SetText(this.m_text);this.InstallEvents()},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this, deserializer);this.m_showText=deserializer.GetBoolean();this.m_input=this.GetDomNode();this.m_isEnabled=!this.m_input.disabled;if(this.m_showText){this.m_label=this.m_input.nextSibling;this.m_text=new D2L.LP.Text.PlainText(this.m_label.innerHTML)}else{var text=deserializer.GetMember();this.m_text=new D2L.LP.Text.PlainText(text)}this.m_group=this.m_input.name;this.m_value=this.m_input.value;this.InstallEvents()},GetMultiEditValue:function(){return D2L.Control.RadioButton.GetSelectedValue(this.m_group)}, GetState:function(serializer){serializer.AddMember("SelectedVal",D2L.Control.RadioButton.GetSelectedValue(this.m_group))},GetText:function(){return this.m_text},GetValue:function(){return this.m_value},InstallEvents:function(){var me=this;var clickFunc=function(evt){me.OnClickEvent().Trigger(me);D2L.Util.Dom.CancelBubble(evt)};if(this.m_input.addEventListener)this.m_input.addEventListener("click",clickFunc,false);else if(this.m_input.attachEvent)this.m_input.attachEvent("onclick",clickFunc)},IsEnabled:function(){return this.m_isEnabled}, IsSelected:function(){if(this.IsRendered())return this.m_input.checked;else return this.m_isSelected},OnClickEvent:function(){return this.m_onClickEvent},SetIsEnabled:function(isEnabled){this.m_isEnabled=isEnabled;if(this.IsRendered()){if(this.m_label!==null)this.m_label.className=this.m_isEnabled?"":"d2l-radio-disabled";this.m_input.disabled=!this.m_isEnabled}},SetIsSelected:function(isSelected){this.m_isSelected=isSelected;if(this.IsRendered())this.m_input.checked=isSelected},SetShowText:function(showText){if(showText!= this.m_showText&&this.IsRendered()){if(this.m_label!==null){D2L.Util.Dom.Purge(this.m_label);this.m_label.parentNode.removeChild(this.m_label);this.m_label=null}this.m_input.title=""}this.m_showText=showText;this.SetText(this.m_text)},SetText:function(text){this.m_text=text;if(this.IsRendered())if(this.ShowText()){if(this.m_label===null){this.m_label=this.CreateElement("label");this.m_label.htmlFor=this.GetMappedId();this.m_label.className=this.m_isEnabled?"":"d2l-radio-disabled";if(this.m_input.nextSibling)this.m_input.parentNode.insertBefore(this.m_label, this.m_input.nextSibling);else this.m_input.parentNode.appendChild(this.m_label)}while(this.m_label.childNodes.length>0)this.m_label.removeChild(this.m_label.childNodes[0]);this.m_label.appendChild(this.CreateTextNode(this.m_text))}else this.m_text.AssignText(this.m_input,"title")},SetValue:function(value){this.m_value=value;if(this.IsRendered())this.m_input.value=value},ShowText:function(){return this.m_showText}}); D2L.Control.RadioButton.GetSelectedValue=function(group){var form=UI.GetForm();if(form){var rdoGroup=form[group];if(rdoGroup)if(rdoGroup.length===undefined){if(rdoGroup.checked)return rdoGroup.value}else for(var i=0;i<rdoGroup.length;i++)if(rdoGroup[i].checked)return rdoGroup[i].value}return""}; D2L.Control.RadioButton.SetSelectedValue=function(group,value){var form=UI.GetForm();if(form){var rdoGroup=form[group];if(rdoGroup)if(rdoGroup.length===undefined){if(rdoGroup.value==value)rdoGroup.checked=true}else for(var i=0;i<rdoGroup.length;i++)if(rdoGroup[i].value==value)rdoGroup[i].checked=true}};D2L.Reorder={}; D2L.Reorder.ReorderManager=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_groups=[]},DeserializeMin:function(deserializer){this.m_groups=deserializer.GetObjectArrayMin(D2L.Reorder.ReorderManager.ItemGroupData)},Init:function(){for(var i=0;i<this.m_groups.length;i++){var group=UI.GetControl(this.m_groups[i].m_controlId.ID(),this.m_groups[i].m_controlId.SID());if(group){group.m_name=this.m_groups[i].m_name;for(var j=0;j<this.m_groups[i].m_items.length;j++)this.m_groups[i].m_items[j].IntegrateChild(group, UI.GetById(this.m_groups[i].m_items[j].m_myMappedId));group.Init()}}},GetGroup:function(groupName){groupName=groupName.toLowerCase();for(var i=0;i<this.m_groups.length;i++)if(this.m_groups[i].m_name==groupName)return UI.GetControl(this.m_groups[i].m_controlId.ID(),this.m_groups[i].m_controlId.SID());return null}}); D2L.Reorder.ReorderManager.ItemGroupData=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_controlId=null;this.m_name="";this.m_items=[]},DeserializeMin:function(deserializer){this.m_controlId=deserializer.GetObjectMin(D2L.Control.Id);this.m_name=deserializer.GetMember();this.m_items=deserializer.GetObjectArrayMin(D2L.Control.ReorderItem)}}); D2L.Control.ReorderItemGroup=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_name="";this.m_hasChangedHidden=null},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer)},Init:function(){var c;for(var i=0;i<this.Children().length;i++){if(i===0){this.m_hasChangedHidden=this.CreateElement("input");this.m_hasChangedHidden.type="hidden";this.m_hasChangedHidden.name=this.m_name+"_hasChanged";this.Children()[i].GetDomNode().parentNode.insertBefore(this.m_hasChangedHidden, this.Children()[i].GetDomNode())}var child=this.Children()[i];if(child.IsEnabled()){if(child.GetDomNode().remove)child.GetDomNode().remove(0);else;c=-1;for(var j=0;j<this.Children().length;j++)if(i==j||this.Children()[j].IsEnabled()){c++;var option=document.createElement("option");option.appendChild(document.createTextNode(D2L.Util.Integer.Format(j+1)));if(i==j){option.selected=true;child.m_prevSortOrder=j+1}option.value=j+1+"_"+child.GetKey();child.GetDomNode().appendChild(option)}}else{child.GetDomNode().innerHTML= D2L.Util.Integer.Format(i+1);child.m_hidden.value=i+1+"_"+child.GetKey()}if(this.m_hasChangedHidden.value.length>0)this.m_hasChangedHidden.value+=",";this.m_hasChangedHidden.value+=child.GetKey()}},GetItem:function(key){for(var i=0;i<this.Children().length;i++)if(this.Children()[i].GetKey()==key)return this.Children()[i];return null},Update:function(item,prevSortOrder,sortOrder){var temp;var i=item.m_prevSortOrder-1;var direction=sortOrder>i?1:-1;var offset=0;var j;while(i+1!=sortOrder){offset=0; j=i+direction;while(j<this.Children().length&&j>-1&&!this.Children()[j].IsEnabled()){offset=offset+direction;j=j+direction}temp=this.Children()[i+direction+offset];this.Children()[i+direction+offset]=item;this.Children()[i]=temp;i=i+direction+offset}for(i=0;i<this.Children().length;i++)if(this.Children()[i].m_prevSortOrder!=i+1){this.Children()[i].m_prevSortOrder=0;this.Children()[i].SetSortOrder(i+1)}}}); D2L.Control.ReorderItem=D2L.Control.extend({Construct:function(key){arguments.callee.$.Construct.call(this);this.m_hidden=null;this.m_isEnabled=true;this.m_key=key;this.m_prevSortOrder=0;this.m_myMappedId=""},DeserializeMin:function(deserializer){this.m_key=deserializer.GetMember();this.m_myMappedId=deserializer.GetMember()},IntegrateChild:function(parent,domNode){arguments.callee.$.IntegrateChild.call(this,parent,domNode);this.m_isEnabled=this.GetDomNode().tagName.toLowerCase()=="select"?!this.GetDomNode().disabled: false;if(!this.IsEnabled())this.m_hidden=this.GetDomNode().previousSibling;var me=this;this.AttachObject(this.GetDomNode(),"onchange",function(){me.SetSortOrder(parseInt(this.options[this.selectedIndex].value.split("_")[0]))})},GetKey:function(){return this.m_key},GetSortOrder:function(){if(this.IsEnabled())return parseInt(this.GetDomNode().options[this.GetDomNode().selectedIndex].value.split("_")[0]);else return parseInt(this.m_hidden.value.split("_")[0])},IsEnabled:function(){return this.m_isEnabled}, SetSortOrder:function(sortOrder){if(this.IsEnabled())for(var i=0;i<this.GetDomNode().options.length;i++)if(parseInt(this.GetDomNode().options[i].value.split("_")[0])==sortOrder){this.GetDomNode().selectedIndex=i;this.GetDomNode().options[i].value=sortOrder+"_"+this.GetKey();if(this.m_hidden)this.m_hidden.value=sortOrder+"_"+this.GetKey();WindowEventManager.BubbleChangeEvent(this.GetDomNode());if(this.m_prevSortOrder!==0)this.Parent().Update(this,this.m_prevSortOrder,sortOrder);this.m_prevSortOrder= sortOrder;break}}}); D2L.Control.RichEdit=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this)},Initialize:function(){var me=this;$(this.GetDomNode()).on("vui-change",function(){me.m_hasChangedNode.value="1";UI.GetFormManager().ForceChange(me.GetDomNode())})},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);this.m_mvcId=new D2L.LP.Web.UI.Html.AbsoluteHtmlId(deserializer.GetMember());this.m_hasChangedNode=D2L.LP.Web.UI.Html.Dom.GetElementById(this.m_mvcId.GetValue()+"_hc")}, Disable:function(){},Enable:function(){},Focus:function(){},GetMultiEditValue:function(){return this.GetText()},GetText:function(){var htmlParam=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.GetHtml(this.m_mvcId);if(htmlParam)return htmlParam.GetHtml();else return""},HasChanged:function(){return D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.IsDirty(this.m_mvcId)},HasValue:function(){return new D2L.Util.DelayedReturn(this.HasValueNoDelay())},HasValueNoDelay:function(){return this.GetText().trim().length>0}, IsEmpty:function(){return this.GetText().length===0},IsEnabled:function(){return true},IsHtml:function(){return true},SetIsEnabled:function(isEnabled){if(isEnabled)this.Enable();else this.Disable()},SetText:function(text){this.m_hasChangedNode.value="1";D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.SetHtml(this.m_mvcId,text)},ToggleEnabled:function(){if(this.IsEnabled())this.Disable();else this.Enable()}}); D2L.Control.RichEdit.Initialize=function(id,sid){var control=UI.GetControl(id,sid);if(!control)control=UI.GetByName(id);if(control.Initialize)control.Initialize()};D2L.Control.RichEdit.ValidateRequired=function(obj,id){return D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.ValidateRequired(new D2L.LP.Web.UI.Html.AbsoluteHtmlId(id))}; D2L.Control.EditableRichEdit=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this)},Initialize:function(){var me=this;$(this.GetDomNode()).on("vui-change",function(){me.m_hasChangedNode.value="1";UI.GetFormManager().ForceChange(me.GetDomNode())})},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);this.m_mvcId=new D2L.LP.Web.UI.Html.AbsoluteHtmlId(deserializer.GetMember());this.m_hasChangedNode=D2L.LP.Web.UI.Html.Dom.GetElementById(this.m_mvcId.GetValue()+ "_hc")},Disable:function(){},Enable:function(){},Focus:function(){},GetMultiEditValue:function(){return this.GetText()},GetText:function(){var isOpen=D2L.LP.Web.UI.Desktop.Controls.EditInPlace.IsEditorOpen(this.m_mvcId);if(isOpen=="true"){var htmlParam=D2L.LP.Web.UI.Desktop.Controls.EditInPlace.GetHtmlEditorContent(this.m_mvcId);if(htmlParam)return htmlParam.GetHtml();else return""}else{var htmlObject=D2L.LP.Web.UI.Html.Dom.GetElementById(this.m_mvcId.GetValue()+"_data");var html=htmlObject.value; return html}},HasChanged:function(){return D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.IsDirty(this.m_mvcId)},HasValue:function(){return new D2L.Util.DelayedReturn(this.HasValueNoDelay())},HasValueNoDelay:function(){return this.GetText().trim().length>0},IsEmpty:function(){return this.GetText().length===0},IsEnabled:function(){return true},IsHtml:function(){return true},SetIsEnabled:function(isEnabled){if(isEnabled)this.Enable();else this.Disable()},SetText:function(text){this.m_hasChangedNode.value= "1";D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.SetHtml(this.m_mvcId,text)},ToggleEnabled:function(){if(this.IsEnabled())this.Disable();else this.Enable()}});D2L.Control.EditableRichEdit.Initialize=function(id){var control=UI.GetControl(id);if(!control)control=UI.GetByName(id);if(control.Initialize)control.Initialize()};D2L.Control.EditableRichEdit.ValidateRequired=function(obj,id){return D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.ValidateRequired(new D2L.LP.Web.UI.Html.AbsoluteHtmlId(id))}; D2L.Control.RichText=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_text=new D2L.LP.Text.PlainText;this.m_isHtml=false;this.m_isInline=false;this.m_textDomNode=null},BuildDom:function(){if(!this.IsRendered()){arguments.callee.$.BuildDom.call(this);var className="drt";if(D2L.LP.Web.UI.Daylight.IsEnabled())className+=" d2l-htmlblock";this.SetDomNode(this.CreateElement("div"));this.GetDomNode().className=className;this.m_textDomNode=this.GetDomNode();this.SetIsInline(this.m_isInline); this.SetText(this.m_text)}},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);this.m_isInline=deserializer.GetBoolean();this.m_isHtml=deserializer.GetBoolean();var domNode=this.GetDomNode();if(domNode.firstChild&&domNode.firstChild.tagName&&domNode.firstChild.tagName.toLowerCase()=="label")this.m_textDomNode=domNode.firstChild;else this.m_textDomNode=domNode;if(this.m_isHtml)this.m_text=new D2L.LP.Text.HtmlText(this.m_textDomNode.innerHTML,false); else this.m_text=new D2L.LP.Text.PlainText(D2L.Util.Html.Decode(this.m_textDomNode.innerHTML))},IsInline:function(){return this.m_isInline},GetText:function(){return this.m_text},SetIsInline:function(isInline){this.m_isInline=isInline;if(this.IsRendered())this.GetDomNode().style.display=this.m_isInline?"inline":"block"},SetText:function(text){this.m_text=D2L.LP.Text.IText.Normalize(text,"D2L.Control.RichText","SetText","text");if(this.IsRendered()){this.m_textDomNode.innerHTML="";this.m_text.AssignHtml(this.m_textDomNode, "innerHTML");D2L.LP.Web.UI.Html.Math.UpdateNode(this.m_textDomNode)}}});D2L.Control.SaveStatus=D2L.Control.extend({Start:function(){if(!this.IsRendered())return;this.GetDomNode().start()},End:function(){if(!this.IsRendered())return;this.GetDomNode().end()},ForceEnd:function(){if(!this.IsRendered())return;this.GetDomNode().forceEnd()},Error:function(){if(!this.IsRendered())return;this.GetDomNode().error()}}); D2L.Control.ShareButton={InstallEvents:function(node){var tweet=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-twitter",node);for(var i=0;i<tweet.length;i++)D2L.LP.Web.UI.Desktop.Controls.TweetButton.Init(tweet[i]);var gplusone=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-gplusone",node);for(var i=0;i<gplusone.length;i++)D2L.LP.Web.UI.Desktop.Controls.GooglePlusOne.Init(gplusone[i])}}; D2L.Control.Selector=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_isRequired=false;this.m_itemListNode=null;this.m_items=[];this.m_keysNode=null;this.m_orientation=D2L.Control.Selector.Orientation.Horizontal;this.m_selectedItem=null;this.m_selectedMsg=new D2L.LP.Text.LangTerm("Framework.Selector.lblItemIsSelected");this.m_selectionMode=D2L.Control.Selector.SelectionModes.Single;this.m_selectItemEvent=new D2L.EventHandler;this.m_summary="";this.m_summaryNode= null;this.m_unSelectedMsg=new D2L.LP.Text.LangTerm("Framework.Selector.lblItemIsNotSelected");this.m_unSelectItemEvent=new D2L.EventHandler;this.Init()},AddItem:function(item){if(item===null)return;for(var i=0;i<this.m_items.length;i++)if(item.GetKey()==this.m_items[i].GetKey()){UI.GetMessageArea().AddWarningMessage(new D2L.LP.Text.SmlText("Selector item already has the specified key '[0]'.",item.GetKey()),true);return}if(this.m_selectionMode==D2L.Control.Selector.SelectionModes.Single)item.SetIsSelected(false); item.Init(this);this.m_items.push(item);if(this.IsRendered())this.RenderItems([item])},BuildDom:function(){if(this.IsRendered())return;arguments.callee.$.BuildDom.call(this);this.SetDomNode(this.CreateElement("div"));this.GetDomNode().className="dsel_c";this.Render()},GetItemByKey:function(key){if(key===null)return null;for(var i=0;i<this.m_items.length;i++)if(this.m_items[i].GetKey()==key)return this.m_items[i];return null},GetItemSummaryMsg:function(isSelected){if(isSelected)return this.m_selectedMsg; else return this.m_unSelectedMsg},GetOrientation:function(){return this.m_orientation},GetSelectedItem:function(){return this.m_selectedItem},GetSelectedItemCount:function(){return this.GetSelectedItems().length},GetSelectedItemKey:function(){if(this.m_selectedItem!=null)return this.m_selectedItem.GetKey();return null},GetSelectedItems:function(){var items=[];for(var i=0;i<this.m_items.length;i++)if(this.m_items[i].IsSelected())items.push(this.m_items[i]);return items},GetSelectionMode:function(){return this.m_selectionMode}, GetSummary:function(){return this.m_summary},Init:function(){},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this);this.SetSummary(deserializer.GetObject(D2L.LP.Text.IText));this.m_orientation=deserializer.GetMember();this.m_isRequired=deserializer.GetBoolean();this.m_selectionMode=deserializer.GetMember();var selectedItemKey=deserializer.GetMember();var onSelect=deserializer.GetMember();if(onSelect.length>0&&window[onSelect]!==undefined)this.m_selectItemEvent.RegisterMethod(function(item){window[onSelect](item)}); var onUnSelect=deserializer.GetMember();if(onUnSelect.length>0&&window[onUnSelect]!==undefined)this.m_unSelectItemEvent.RegisterMethod(function(item){window[onUnSelect](item)});this.m_items=deserializer.GetObjectArrayMin(D2L.Control.Selector.Item);for(var i=0;i<this.m_items.length;i++)this.m_items[i].Init(this);this.SelectItem(this.GetItemByKey(selectedItemKey),false);this.Render()},IsRequired:function(){return this.m_isRequired},IsChangeSelectionAllowed:function(item){if(item!=null)return true;else return false}, RemoveItem:function(item){if(item==null||!this.IsRequired()||this.m_selectedItem!=item)return;var index=-1;for(var i=0;i<this.m_items.length;i++)if(this.m_items[i]==item){index=i;break}if(index!=-1){this.m_items.splice(index,1);for(var i=0;i<this.m_items.length;i++)if(i==0)this.m_keysNode.value=this.m_items[i].GetKey();else this.m_keysNode.value=this.m_keysNode.value+","+this.m_items[i].GetKey();this.m_itemListNode.removeChild(item.GetNode());if(this.m_selectedItem==item)this.UnSelectItem(item)}}, Render:function(){this.m_summaryNode=this.CreateElement("span");this.m_summaryNode.className="dsr";this.m_summary.AssignText(this.m_summaryNode,"innerHTML");this.GetDomNode().appendChild(this.m_summaryNode);this.m_itemListNode=this.CreateElement("ul");this.SetOrientation(this.m_orientation);this.GetDomNode().appendChild(this.m_itemListNode);this.m_keysNode=this.CreateElement("input");this.m_keysNode.name=this.GetMappedId()+"_keys";this.m_keysNode.type="hidden";this.m_keysNode.value="";this.GetDomNode().appendChild(this.m_keysNode); this.RenderItems(this.m_items);var clear=this.CreateElement("span");clear.className="clear";this.GetDomNode().appendChild(clear)},RenderItems:function(items){var item=null;var itemNode=null;for(var i=0;i<items.length;i++){item=items[i];itemNode=item.Render();if(i==0&&this.m_itemListNode.childNodes.length==0){itemNode.className="f";this.m_keysNode.value=item.GetKey()}else this.m_keysNode.value=this.m_keysNode.value+","+item.GetKey();this.m_itemListNode.appendChild(itemNode)}},SelectItem:function(item, doTriggerSelectEvent){if(doTriggerSelectEvent===undefined)doTriggerSelectEvent=true;if(this.m_selectionMode==D2L.Control.Selector.SelectionModes.Single){if(this.m_selectedItem!=null&&this.m_selectedItem!=item)this.m_selectedItem.SetIsSelected(false);this.m_selectedItem=item}else this.m_selectedItem=null;if(doTriggerSelectEvent)this.SelectItemEvent().Trigger(item)},SelectItemEvent:function(){return this.m_selectItemEvent},SetIsRequired:function(isRequired){this.m_isRequired=isRequired},SetOrientation:function(orientation){this.m_orientation= orientation;if(this.IsRendered())if(this.m_orientation==D2L.Control.Selector.Orientation.Vertical)this.m_itemListNode.className=D2L.LP.Web.UI.Daylight.IsEnabled()?"dsel_lv d2l-body-compact":"dsel_lv";else this.m_itemListNode.className="dsel_lh"},SetSelectedItem:function(item){if(item!=null)item.SetIsSelected(true);else if(!this.IsRequired()){item=this.m_selectedItem;if(item!=null)item.SetIsSelected(false)}},SetSelectedItemByKey:function(key){if(key!=null)this.SetSelectedItem(this.GetItemByKey(key)); else this.SetSelectedItem(null)},SetSelectionMode:function(selectionMode){this.m_selectionMode=selectionMode},SetSummary:function(summary){this.m_summary=summary;if(this.m_summaryNode!=null)this.m_summary.AssignText(this.m_summaryNode,"innerHTML")},UnSelectItem:function(item,doTriggerUnSelectEvent){if(doTriggerUnSelectEvent===undefined)doTriggerUnSelectEvent=true;if(this.m_selectedItem==item)this.m_selectedItem=null;if(doTriggerUnSelectEvent)this.UnSelectItemEvent().Trigger(item)},UnSelectItemEvent:function(){return this.m_unSelectItemEvent}}); D2L.Control.Selector.Orientation={Horizontal:0,Vertical:1};D2L.Control.Selector.SelectionModes={Single:0,Multiple:1}; D2L.Control.Selector.Item=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_description="";this.m_descriptionNode=null;this.m_image=new D2L.Control.Image;this.m_isSelected=false;this.m_key="";this.m_node=null;this.m_selectEvent=new D2L.EventHandler;this.m_selector=null;this.m_summaryNode=null;this.m_titleNode=null;this.m_title="";this.m_unSelectEvent=new D2L.EventHandler;this.m_valueNode=null},ApplyStyle:function(){if(this.m_node!=null)if(this.IsSelected())this.m_node.firstChild.className= "s";else this.m_node.firstChild.className=""},ApplyText:function(){if(this.m_node!=null)this.m_selector.GetItemSummaryMsg(this.IsSelected()).AssignText(this.m_summaryNode,"innerHTML")},DeserializeMin:function(deserializer){this.SetKey(deserializer.GetMember());this.SetTitle(deserializer.GetObject(D2L.LP.Text.IText));this.SetDescription(deserializer.GetObject(D2L.LP.Text.IText));this.SetIsSelected(deserializer.GetBoolean());this.SetAlt(deserializer.GetObject(D2L.LP.Text.IText));this.SetImage(deserializer.GetObjectMin(D2L.Images.Image)); var onSelect=deserializer.GetMember();if(onSelect.length>0&&window[onSelect]!==undefined)this.m_selectEvent.RegisterMethod(function(item){window[onSelect](item)});var onUnSelect=deserializer.GetMember();if(onUnSelect.length>0&&window[onUnSelect]!==undefined)this.m_unSelectEvent.RegisterMethod(function(item){window[onUnSelect](item)})},GetAlt:function(){return this.m_image.GetAlt()},GetDescription:function(){return this.m_description},GetImage:function(){return this.m_image.GetImage()},GetKey:function(){return this.m_key}, GetNode:function(){return this.m_node},GetTitle:function(){return this.m_title},Init:function(selector){this.m_selector=selector},IsSelected:function(){return this.m_isSelected},HandleOnClick:function(){if(this.m_selector.IsRequired())if(this.m_selector.GetSelectionMode()==D2L.Control.Selector.SelectionModes.Single)this.SetIsSelected(true);else if(this.m_selector.GetSelectedItemCount()>1)this.ToggleSelected();else this.SetIsSelected(true);else this.ToggleSelected()},Render:function(){this.m_node= this.m_selector.CreateElement("li");var anchorNode=this.m_selector.CreateElement("a");this.m_title.AssignText(anchorNode,"title");anchorNode.href="javascript://";var me=this;this.AttachObject(anchorNode,"onclick",function(){me.HandleOnClick()});this.m_image.AppendTo(anchorNode);this.m_titleNode=this.m_selector.CreateElement("span");this.m_titleNode.className="dsel_it";this.m_title.AssignText(this.m_titleNode,"innerHTML");if(this.m_description!=null&&this.m_description!=""){this.m_descriptionNode= this.m_selector.CreateElement("div");this.m_descriptionNode.className="dsel_id";this.m_description.AssignText(this.m_descriptionNode,"innerHTML")}this.m_summaryNode=this.m_selector.CreateElement("span");this.m_summaryNode.className="dsr";this.m_valueNode=this.m_selector.CreateElement("input");this.m_valueNode.name=this.m_selector.GetMappedId()+"_key_"+this.m_key;this.m_valueNode.type="hidden";this.m_valueNode.value=this.m_isSelected;anchorNode.appendChild(this.m_titleNode);anchorNode.appendChild(this.m_summaryNode); if(this.m_descriptionNode!=null)anchorNode.appendChild(this.m_descriptionNode);anchorNode.appendChild(this.m_valueNode);this.m_node.appendChild(anchorNode);this.ApplyStyle();this.ApplyText();return this.m_node},SelectEvent:function(){return this.m_selectEvent},SetAlt:function(alt){this.m_image.SetAlt(alt)},SetDescription:function(description){this.m_description=description;if(this.m_descriptionNode!=null)this.m_description.AssignText(this.m_descriptionNode,"innerHTML")},SetImage:function(image){this.m_image.SetImage(image)}, SetIsSelected:function(isSelected){if(this.m_selector!=null){if(this.m_selector.IsChangeSelectionAllowed(this)){this.m_isSelected=isSelected;if(isSelected){this.m_selector.SelectItem(this);this.m_selectEvent.Trigger(this)}else{this.m_selector.UnSelectItem(this);this.m_unSelectEvent.Trigger(this)}}}else this.m_isSelected=isSelected;if(this.m_valueNode!=null)this.m_valueNode.value=this.m_isSelected;this.ApplyStyle();this.ApplyText()},SetKey:function(key){this.m_key=key},SetTitle:function(title){this.m_title= title;if(this.m_titleNode!=null)this.m_title.AssignText(this.m_titleNode,"innerHTML")},ToggleSelected:function(){this.SetIsSelected(!this.IsSelected())},UnSelectEvent:function(){return this.m_unSelectEvent}}); D2L.Control.SelectList=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_float=D2L.Style.Float.None;this.m_isDisplayed=true;this.options=[];this.m_onChange=null;this.m_spacing=new D2L.Style.Spacing(D2L.Style.Spacing.Type.Spacing);this.m_title=null;this.m_hasEnablerTargetItem=false;this.m_containerNode=null;var me=this;this.m_spacing.GetTop().SetUnitType(D2L.Style.Measurement.UnitType.Pixel);this.m_spacing.GetTop().SetValue(2);this.m_spacing.GetBottom().SetUnitType(D2L.Style.Measurement.UnitType.Pixel); this.m_spacing.GetBottom().SetValue(2);this.m_spacing.OnChange().RegisterMethod(function(){me.RenderSpacing()});this.OnDomInsertion.RegisterMethod(function(){me.WrapInContainer()})},AddOption:function(parentKey,opt){var parentOpt=this.GetOption(parentKey);if(parentOpt)return parentOpt.AppendChild(opt);else return this.AppendChild(opt)},AppendChild:function(opt){return this.InsertBefore(opt,null)},Blur:function(){if(this.GetDomNode())this.GetDomNode().blur()},BuildDom:function(){if(this.IsRendered())return; arguments.callee.$.BuildDom.call(this);var domNode=this.SetDomNode(this.GetUI().CreateElement("select"));D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-select",domNode);if(UI.GetBrowserInfo().Type==D2L.UI.BrowserType.Safari||UI.GetBrowserInfo().Type==D2L.UI.BrowserType.Chrome)D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-select-sidepad",domNode);domNode.name=this.GetMappedId();var container=this.GetUI().CreateElement("div");D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-select-container",container);this.m_containerNode= container;this.RenderTitle();this.RenderFloat();this.RenderSpacing();this.AttachObject(domNode,"ID2L",this);for(var i=0;i<this.options.length;i++){this.options[i].BuildDom();if(UI.GetBrowserInfo().Type==D2L.UI.BrowserType.IE)domNode.add(this.options[i].GetDomNode());else domNode.add(this.options[i].GetDomNode(),null)}var me=this;D2L.Control.SelectList.InstallEvents(domNode,function(){return me})},ClearOptions:function(){while(this.options.length>0)this.RemoveChild(this.options[this.options.length- 1])},Disable:function(){this.GetDomNode().disabled=true},Enable:function(){this.GetDomNode().disabled=false},Focus:function(){if(this.IsRendered())this.GetDomNode().focus()},GetContainer:function(){return this.m_containerNode},GetFloat:function(){return this.m_float},GetIndex:function(opt){for(var i=0;i<this.GetDomNode().options.length;i++)if(this.GetDomNode().options[i].ID2L==opt)return i;return-1},GetMultiEditValue:function(){return this.GetSelectedValue()},GetOption:function(key){for(var i=0;i< this.options.length;i++)if(this.options[i].key==key)return this.options[i];return null},GetOptions:function(){return this.options},GetSelectedIndex:function(){return this.GetDomNode().selectedIndex},GetSelectedOption:function(){if(this.GetDomNode().selectedIndex>=0)return this.GetDomNode().options[this.GetDomNode().selectedIndex].ID2L;else return null},GetSelectedKey:function(){var opt=this.GetSelectedOption();if(opt!=null)return this.GetSelectedOption().key;else return null},GetSelectedValue:function(){var opt= this.GetSelectedOption();if(opt!==null&&opt!==undefined)return opt.val;else return null},GetSpacing:function(){return this.m_spacing},GetState:function(serializer){var selectedOption=this.GetSelectedOption();if(selectedOption){serializer.AddMember("SelectedKey",selectedOption.GetKey());serializer.AddMember("SelectedVal",selectedOption.GetVal())}},GetTitle:function(){return this.m_title},GetValidationDomNode:function(){return this.GetContainer()},Hide:function(){this.SetIsDisplayed(false)},InsertBefore:function(opt, beforeOpt){if(!opt||opt===undefined||opt===null)return null;if(!beforeOpt||beforeOpt===undefined||beforeOpt===null)beforeOpt=null;this.BuildDom();var index=-1,insertBefore=null;if(beforeOpt){for(var i=0;i<this.m_children.length;i++)if(this.m_children[i]==beforeOpt){index=i;break}if(index!=-1){if(beforeOpt.m_previousSibling){beforeOpt.m_previousSibling.m_nextSibling=opt;opt.m_previousSibling=beforeOpt.m_previousSibling}beforeOpt.m_previousSibling=opt;opt.m_nextSibling=beforeOpt}}if(index!=-1){insertBefore= beforeOpt;this.m_children.splice(index,0,opt)}else{if(this.m_children.length>0){var optTemp=this.m_children[this.m_children.length-1];optTemp.m_nextSibling=opt;opt.m_previousSibling=optTemp}this.m_children.push(opt)}opt.m_parent=this;opt.m_sl=this;this.InsertHelper(opt,insertBefore);return opt},InsertHelper:function(opt,beforeOpt){if(beforeOpt===undefined||beforeOpt===null){opt.BuildDom();if(UI.GetBrowserInfo().Type==D2L.UI.BrowserType.IE)this.GetDomNode().add(opt.GetDomNode());else this.GetDomNode().add(opt.GetDomNode(), null);this.options.push(opt)}else{var index=this.GetIndex(beforeOpt);opt.BuildDom();if(UI.GetBrowserInfo().Type==D2L.UI.BrowserType.IE)this.GetDomNode().add(opt.GetDomNode(),index);else this.GetDomNode().add(opt.GetDomNode(),beforeOpt.GetDomNode());this.options.splice(index,0,opt)}},InsertSorted:function(opt){var isGreaterThan=function(opt1,opt2){return opt1.text.toLowerCase()>opt2.text.toLowerCase()};return arguments.callee.$.InsertSorted.call(this,opt,isGreaterThan)},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this, deserializer);this.m_containerNode=this.GetDomNode().parentNode;this.m_isDisplayed=this.GetContainer().style.display!=="none";this.SetOnChange(new Function(deserializer.GetMember()));this.m_hasEnablerTargetItem=deserializer.GetBoolean();this.m_float=deserializer.GetMember();var start=deserializer.GetMember();var end=deserializer.GetMember();var interval=deserializer.GetMember();var c=[];if(start>-1&&end>-1)for(var i=start;i<end+1;i=i+interval)c.push(new D2L.Control.SelectOption(i.toString(),i.toString())); else c=deserializer.GetObjectArrayMin(D2L.Control.SelectOption);for(var i=0;i<c.length;i++){this.options.push(c[i]);c[i].IntegrateChild(this,this.GetDomNode().childNodes[this.options.length-1])}},IsDisplayed:function(){return this.m_isDisplayed},IsEnabled:function(){return!this.GetDomNode().disabled},OnChange:function(event){event=event!==undefined?event:window.event!==undefined?window.event:null;WindowEventManager.BubbleChangeEvent(this.GetDomNode(),event);if(this.m_hasEnablerTargetItem&&this.Enablers)this.Enablers.ResetEnablers(); if(this.m_onChange!==undefined&&this.m_onChange!==null)this.m_onChange.call(this)},RemoveChild:function(opt){if(opt){if(opt.m_parent==this){while(opt.m_children.length>0)opt.RemoveChild(opt.m_children[0]);arguments.callee.$.RemoveChild.call(this,opt);for(var i=0;i<this.options.length;i++)if(this.options[i]==opt){this.options.splice(i,1);break}}else opt.m_parent.RemoveChild(opt);return opt}return null},RenderFloat:function(){if(this.IsRendered())D2L.Util.Style.ApplyFloat(this.GetContainer(),this.GetFloat())}, RenderSpacing:function(){if(this.IsRendered())this.GetDomNode().style.margin=this.GetSpacing().ToCss()},RenderTitle:function(){if(this.IsRendered())if(this.m_title!==null)this.m_title.AssignText(this.GetDomNode(),"title");else this.GetDomNode().removeAttribute("title")},SelectOption:function(opt,triggerChange){if(opt)if(opt.canSelect){var index=this.GetIndex(opt);if(index==-1)return;this.GetDomNode().options.selectedIndex=index;if(triggerChange)this.OnChange()}},SelectOptionByKey:function(key,triggerChange){var opt= this.GetOption(key);if(opt!==null)this.SelectOption(opt,triggerChange)},SetFloat:function(val){this.m_float=val;this.RenderFloat()},SetIsEnabled:function(isEnabled){if(isEnabled)this.Enable();else this.Disable()},SetIsInvalid:function(isInvalid){if(!this.IsRendered())return;this.GetDomNode().setAttribute("aria-invalid",isInvalid)},SetTitle:function(title){this.m_title=title===undefined?null:title;this.RenderTitle()},SetIsDisplayed:function(isDisplayed){if(this.IsDisplayed()!=isDisplayed){if(isDisplayed)this.GetContainer().style.display= "inline-block";else this.GetContainer().style.display="none";this.m_isDisplayed=isDisplayed;var transformEvent=new D2L.TransformEvent(this.GetDomNode());transformEvent.Bubble()}},SetOnChange:function(onChange){this.m_onChange=onChange},Show:function(){this.SetIsDisplayed(true)},ToggleEnabled:function(){if(this.IsEnabled())this.Disable();else this.Enable()},WrapInContainer:function(){var selectList=this.GetDomNode();if(selectList&&selectList.parentNode!==this.m_containerNode){selectList.parentNode.insertBefore(this.m_containerNode, selectList);this.m_containerNode.appendChild(selectList)}}});D2L.Control.SelectList.InstallEvents=function(domNode,GetControl){UI.AttachObject(domNode,"onchange",function(e){var me=GetControl();me.OnChange.call(me,e)})};D2L.SelectList=D2L.Control.SelectList.extend({Construct:function(name,onChange){arguments.callee.$.Construct.call(this);this.m_onChange=onChange}}); D2L.Control.SelectOption=D2L.Control.extend({Construct:function(key,val,text){arguments.callee.$.Construct.call(this);if(key===undefined)key="";if(val===undefined)val="";if(text===undefined||text===null)text="";else if(text.isString===undefined)text=text.toString();this.canSelect=true;this.depth=0;this.key=key;this.m_depthStr="";this.m_sl=null;this.text=text.stripHtml();this.val=val;this.m_options=[]},AppendChild:function(opt){return this.InsertBefore(opt,null)},BuildDom:function(){if(!this.IsRendered()){arguments.callee.$.BuildDom.call(this); if(this.canSelect){this.SetDomNode(document.createElement("OPTION"));this.AttachObject(this.IDomNode,"ID2L",this);this.GetDomNode().value=this.val;var depthStr="";for(var i=0;i<this.depth;i++)depthStr+=" ";if(UI.GetBrowserInfo().Type==D2L.UI.BrowserType.IE){depthStr=depthStr.replace(/ /g," ");this.GetDomNode().text=depthStr+this.text}else this.GetDomNode().innerHTML=depthStr+this.text}else{this.SetDomNode(document.createElement("OPTGROUP"));this.AttachObject(this.IDomNode,"ID2L", this);this.GetDomNode().label=this.text}this.m_depthStr=depthStr}},DeserializeMin:function(deserializer){this.key=deserializer.GetMember();this.val=deserializer.GetMember();this.canSelect=deserializer.GetBoolean();this.m_options=deserializer.GetObjectArrayMin(D2L.Control.SelectOption)},GetDepth:function(){return this.depth},GetKey:function(){return this.key},GetText:function(){return this.text},GetVal:function(){return this.val},InsertBefore:function(opt,beforeOpt){if(!opt||opt===undefined||opt=== null)return null;if(!beforeOpt||beforeOpt===undefined||beforeOpt===null)beforeOpt=null;this.BuildDom();var index=-1,insertBefore=null;if(beforeOpt!==null){for(var i=0;i<this.m_children.length;i++)if(this.m_children[i]==beforeOpt){index=i;break}if(index!=-1){if(beforeOpt.m_previousSibling){beforeOpt.m_previousSibling.m_nextSibling=opt;opt.m_previousSibling=beforeOpt.m_previousSibling}beforeOpt.m_previousSibling=opt;opt.m_nextSibling=beforeOpt}}if(index!=-1){insertBefore=beforeOpt;this.m_children.splice(index, 0,opt)}else{if(this.m_children.length>0){var optTemp=this.m_children[this.m_children.length-1];optTemp.m_nextSibling=opt;opt.m_previousSibling=optTemp}insertBefore=this.m_nextSibling;var temp=this;while(insertBefore===null&&temp.m_parent!==this.m_sl){temp=temp.m_parent;insertBefore=temp.m_nextSibling}this.m_children.push(opt)}opt.depth=this.depth+1;opt.m_parent=this;opt.m_sl=this.m_sl;this.m_sl.InsertHelper(opt,insertBefore);return opt},InsertSorted:function(opt){var isGreaterThan=function(opt1,opt2){return opt1.text.toLowerCase()> opt2.text.toLowerCase()};return arguments.callee.$.InsertSorted.call(this,opt,isGreaterThan)},IntegrateChild:function(parent,domNode){arguments.callee.$.IntegrateChild.call(this,parent,domNode);this.m_sl=this.GetDomNode().parentNode.ID2L;this.text=this.GetDomNode().innerHTML.toString().stripHtml().replace(/^( )*/,"");if(parent!==this.m_sl)this.depth=parent.depth+1;for(var i=0;i<this.m_options.length;i++){this.m_sl.options.push(this.m_options[i]);this.m_options[i].IntegrateChild(this,this.m_sl.GetDomNode().childNodes[this.m_sl.options.length- 1])}},RemoveChild:function(opt){if(opt&&opt.m_parent==this){while(opt.m_children.length>0)opt.RemoveChild(opt.m_children[0]);arguments.callee.$.RemoveChild.call(this,opt);for(var i=0;i<this.m_sl.options.length;i++)if(this.m_sl.options[i]==opt){this.m_sl.options.splice(i,1);break}return opt}return null},SetText:function(text){this.text=text.stripHtml();if(this.GetDomNode())if(this.canSelect)this.GetDomNode().text=this.m_depthStr+this.text;else this.GetDomNode().label=this.text},SetVal:function(val){this.val= val;if(this.GetDomNode())this.GetDomNode().value=val}});D2L.SelectOption=D2L.Control.SelectOption; D2L.Control.Shim=D2L.Control.extend({Construct:function(domScope,isTimeBased,zIndex){if(isTimeBased===undefined)isTimeBased=false;arguments.callee.$.Construct.call(this);this.m_backgroundColour="#333300";this.m_domScope=domScope;this.m_externalObjects=[];this.m_height=0;this.m_isTimeBased=isTimeBased;this.m_opacity=0.5;this.m_posX=0;this.m_posY=0;this.m_width=0;this.m_zIndex=zIndex;if(isTimeBased){this.m_backgroundColour="#ffffff";this.m_opacity=0}},BuildDom:function(){if(this.IsRendered())return; arguments.callee.$.BuildDom.call(this);var domNode=this.SetDomNode(this.GetWindow().document.createElement("div"));domNode.className="ddial_shim";domNode.style.zIndex=this.m_zIndex;this.RenderOpacity()},GetBackgroundColour:function(){return this.m_backgroundColour},GetHeight:function(){return this.m_height},GetOpacity:function(){return this.m_opacity},GetPosition:function(){return{"x":this.m_posX,"y":this.m_posY}},GetWidth:function(){return this.m_width},RenderBackgroundColour:function(){if(this.IsRendered())this.GetDomNode().style.backgroundColor= this.GetBackgroundColour()},RenderOpacity:function(){if(!this.IsRendered())return;this.GetDomNode().style.opacity=this.GetOpacity()},SetBackgroundColour:function(colour){this.m_backgroundColour=colour;this.RenderBackgroundColour()},SetIsVisible:function(isVisible){if(isVisible){this.SetObjectVisibility(this.m_domScope);this.BuildDom();var me=this;var body=me.GetWindow().document.getElementsByTagName("body");if(body&&body.length==1)body[0].appendChild(me.GetDomNode());if(UI.GetBrowserInfo().Type== D2L.UI.BrowserType.IE&&UI.GetBrowserInfo().MajorVersion>=8)setTimeout(function(){me.RenderBackgroundColour()},0);else me.RenderBackgroundColour();if(this.m_isTimeBased)setTimeout(function(){me.GetDomNode().className+=" ddial_shim_loading";me.SetBackgroundColour("#d6e1f3");me.SetOpacity(0.3)},500)}else if(this.IsRendered()){for(var n=0;n<this.m_externalObjects.length;n++)try{this.m_externalObjects[n].style.visibility="visible"}catch(e){}try{this.GetDomNode().parentNode.removeChild(this.GetDomNode())}catch(e){}}}, SetObjectVisibility:function(domNode){var tags=["applet","object","embed"];for(var tagIndex=0;tagIndex<tags.length;tagIndex++){var domNodes=domNode.getElementsByTagName(tags[tagIndex]);for(var n=0;n<domNodes.length;n++){domNodes[n].style.visibility="hidden";this.m_externalObjects.push(domNodes[n])}}var iframes=domNode.getElementsByTagName("iframe");for(var m=0;m<iframes.length;m++)try{if(iframes[m].contentWindow)this.SetObjectVisibility(iframes[m].contentWindow.document)}catch(e){}},SetOpacity:function(opacity){this.m_opacity= opacity;this.RenderOpacity()}});D2L.Control.Tabs={};D2L.Control.Tabs.AriaIsEnabled=true; D2L.Control.Tabs.AriaController=D2L.Class.extend({Construct:function(tabGroup){arguments.callee.$.Construct.call(this);this.m_tabGroup=tabGroup},Init:function(){var me=this;this.m_tabGroup.SelectTabEvent().RegisterMethod(function(tab){D2L.Util.Aria.SetAttribute(tab.m_objL.firstChild,"selected","true");if(me.m_tabGroup.m_isFromTab)tab.m_objL.firstChild.focus()});this.m_tabGroup.UnSelectTabEvent().RegisterMethod(function(tab){D2L.Util.Aria.SetAttribute(tab.m_objL.firstChild,"selected","false")});var header= this.m_tabGroup.GetDomNode().firstChild;var headerRow=header.firstChild.rows[0];D2L.Util.Aria.SetRole(headerRow,"tablist");for(var i=0;i<headerRow.cells.length;i++){var cell=headerRow.cells[i];D2L.Util.Aria.SetRole(cell,"presentation");D2L.Util.Aria.SetRole(cell.firstChild,"tab")}var container=this.m_tabGroup.GetDomNode().childNodes[1];D2L.Util.Aria.SetRole(container,"tabpanel");D2L.Util.Aria.SetAttribute(container,"expanded","true")}}); D2L.Control.Tab=D2L.Control.extend({Construct:function(text,name,onClick){arguments.callee.$.Construct.call(this);if(name===undefined)name="";if(onClick===undefined)onClick="";this.m_name=name;this.m_text=text;this.m_isSelected=false;this.m_onClick=new Function(onClick);this.m_objL=null;this.m_objLink=null;this.m_paddingTop="1em";this.m_paddingRight="1em";this.m_paddingBottom="1em";this.m_paddingLeft="1em"},BuildDom:function(){if(this.IsRendered())return;arguments.callee.$.BuildDom.call(this);if(this.m_name=== undefined)this.m_name=this.GetUI().GetUniqueHtmlId();this.SetDomNode(this.GetUI().CreateElement("div"));this.GetDomNode().className="d_tabs_tab";this.IChildrenDomNode=this.GetUI().CreateElement("div");this.IChildrenDomNode.className="d_tabs_tabcontent";this.SetPadding(this.m_paddingTop,this.m_paddingRight,this.m_paddingBottom,this.m_paddingLeft);this.GetDomNode().appendChild(this.IChildrenDomNode)},Click:function(){this.Parent().m_tabToSelect=this;return this.m_onClick.call(this)},DeserializeMin:function(deserializer){this.m_name= deserializer.GetMember();this.m_text=deserializer.GetMember();this.m_isSelected=deserializer.GetBoolean();this.m_onClick=new Function(deserializer.GetMember())},GetName:function(){return this.m_name},IntegrateChild:function(parent,domNode){arguments.callee.$.IntegrateChild.call(this,parent,domNode);this.m_objL=UI.GetById(parent.GetMappedId()+"_"+this.m_name+"_l");this.m_objLink=this.m_objL.firstChild;this.InstallEvents()},InstallEvents:function(){var me=this;this.AttachObject(this.m_objL,"onclick", function(){me.Parent().ClickTab(me.GetName())});this.AttachObject(this.m_objLink,"onclick",function(){return false})},IsSelected:function(){return this.m_isSelected},SetPadding:function(top,right,bottom,left){this.m_paddingTop=top;this.m_paddingRight=right;this.m_paddingBottom=bottom;this.m_paddingLeft=left;if(this.IsRendered()){this.IChildrenDomNode.style.paddingTop=this.m_paddingTop;this.IChildrenDomNode.style.paddingRight=this.m_paddingRight;this.IChildrenDomNode.style.paddingBottom=this.m_paddingBottom; this.IChildrenDomNode.style.paddingLeft=this.m_paddingLeft}}}); D2L.Control.TabGroup=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_ariaController=new D2L.Control.Tabs.AriaController(this);this.m_isFromTab=false;this.m_container=null;this.m_hasBorder=true;this.m_selectedTab=null;this.m_selectTabEvent=new D2L.EventHandler;this.m_tabToSelect=null;this.m_unSelectTabEvent=new D2L.EventHandler;this.OnClick=new D2L.EventHandler;var me=this;Nav.OnNavigate.RegisterMethod(function(navInfo){if(me.m_tabToSelect)if(navInfo.action!="RPC"){me.m_oldSelectedTab= me.m_selectedTab;me.m_selectedTab=me.m_tabToSelect;if(me.m_tabToSelect!=me.m_oldSelectedTab)navInfo.SetParam("d2l_isfromtab","1");me.m_tabToSelect=null}});Nav.OnNavigationFailure.RegisterMethod(function(){me.m_tabToSelect=null;if(me.m_oldSelectedTab)me.m_selectedTab=me.m_oldSelectedTab});this.OnChildAdd.RegisterMethod(function(evt,child){if(me.IsRendered())me.BuildDom_Tab(child)})},IntegrateControlMin:function(deserializer){this.m_container=this.GetDomNode().childNodes[1];var tabs=deserializer.GetObjectArrayMin(D2L.Control.Tab); this.m_isFromTab=deserializer.GetBoolean();var selectedTab="";for(var i=0;i<tabs.length;i++){tabs[i].IntegrateChild(this,UI.GetById(this.GetMappedId()+"_"+tabs[i].m_name));if(tabs[i].IsSelected())selectedTab=tabs[i].m_name}if(D2L.Control.Tabs.AriaIsEnabled)this.m_ariaController.Init();if(selectedTab.length>0)this.SelectTab(selectedTab)},BuildDom:function(){if(this.IsRendered())return;arguments.callee.$.BuildDom.call(this);var domNode=this.SetDomNode(this.GetUI().CreateElement("div"));domNode.className= "d_tabs";var header=this.GetUI().CreateElement("div");header.className="d_tabs_header";if(!this.m_hasBorder)header.style.background="none";domNode.appendChild(header);var headerTable=this.GetUI().CreateElement("table");headerTable.cellSpacing="0";headerTable.cellPadding="0";header.appendChild(headerTable);var headerTableRow=headerTable.insertRow(-1);this.m_container=this.GetUI().CreateElement("div");this.m_container.className="d_tabs_container";if(!this.m_hasBorder){this.m_container.style.border= "none";this.m_container.style.background="none"}domNode.appendChild(this.m_container);for(var i=0;i<this.Children().length;i++){if(i==0){var beforeTabsSpacerCell=headerTableRow.insertCell(-1);var beforeTabsSpacerImg=this.GetUI().CreateElement("img");beforeTabsSpacerImg.width="2";beforeTabsSpacerImg.height="1";beforeTabsSpacerImg.src="/d2l/tools/img/pixel.gif";beforeTabsSpacerCell.appendChild(beforeTabsSpacerImg)}this.BuildDom_Tab(this.Children()[i])}},BuildDom_Tab:function(tab){if(!this.IsRendered())return; var headerTableRow=this.GetDomNode().firstChild.firstChild.rows[0];tab.BuildDom();var highlightOuter=this.GetUI().CreateElement("span");highlightOuter.className="d_tabs_highlight_outer";var highlight=this.GetUI().CreateElement("span");highlight.className="d_tabs_highlight";var text=this.GetUI().CreateElement("span");text.className="d_tabs_text";text.appendChild(this.CreateTextNode(tab.m_text));text.appendChild(highlightOuter);text.appendChild(highlight);tab.m_objL=headerTableRow.insertCell(-1);tab.m_objL.id= this.GetMappedId()+"_"+tab.m_name+"_l";tab.m_objL.className="d_tabs_c";tab.m_objLink=this.GetUI().CreateElement("a");tab.m_objLink.className="d_tabs_link";tab.m_objLink.href="javascript://";tab.m_objLink.appendChild(text);tab.m_objL.appendChild(tab.m_objLink);if(tab.GetDomNode())this.m_container.appendChild(tab.GetDomNode());tab.InstallEvents()},ClickTab:function(name){var tab=this.GetTab(name);if(tab&&tab!=this.m_selectedTab){tab.Click();this.OnClick.Trigger(tab)}},GetSelectedTab:function(){return this.m_selectedTab}, GetState:function(serializer){var tab=this.GetSelectedTab();if(tab)serializer.AddMember("SelectedTab",tab.m_name);else serializer.AddMember("SelectedTab","")},GetTab:function(name){for(var i=0;i<this.Children().length;i++)if(this.Children()[i].m_name==name)return this.Children()[i];return null},SelectTab:function(name){if(this.m_selectedTab){var selectedTab=this.m_selectedTab;if(selectedTab.m_objL)selectedTab.m_objL.className="d_tabs_c";if(selectedTab.GetDomNode())selectedTab.GetDomNode().style.display= "none";selectedTab.m_isSelected=false;this.m_selectedTab=null;this.UnSelectTabEvent().Trigger(selectedTab)}var tab=this.GetTab(name);if(tab){if(tab.m_objL)tab.m_objL.className="d_tabs_c_s";if(tab.GetDomNode())tab.GetDomNode().style.display="block";tab.m_isSelected=true;this.m_selectedTab=tab;this.m_tabToSelect=tab;this.SelectTabEvent().Trigger(tab)}},SelectTabEvent:function(){return this.m_selectTabEvent},SetHasBorder:function(hasBorder){this.m_hasBorder=hasBorder},UnSelectTabEvent:function(){return this.m_unSelectTabEvent}}); D2L.Control.TextBlock=D2L.Control.extend({Construct:function(text){arguments.callee.$.Construct.call(this);if(text===undefined)text=new D2L.LP.Text.PlainText;this.m_float=D2L.Style.Float.None;this.m_isDisplayed=true;this.m_isInline=true;this.m_text=text;this.m_languageCode=null},BuildDom:function(){if(this.IsRendered())return;arguments.callee.$.BuildDom.call(this);this.SetDomNode(this.GetUI().CreateElement("span"));this.RenderFloat();this.RenderIsDisplayed();this.RenderIsInline();this.RenderText()}, GetFloat:function(){return this.m_float},GetText:function(){return this.m_text},IntegrateControl:function(deserializer){arguments.callee.$.IntegrateControl.call(this,deserializer);this.m_float=deserializer.GetMember("Float",D2L.Style.Float.None);this.m_isDisplayed=deserializer.GetMember("IsDisplayed",true);this.m_isInline=deserializer.GetMember("IsInline",true);this.m_text=new D2L.LP.Text.PlainText(this.GetDomNode().innerHTML)},IsDisplayed:function(){return this.m_isDisplayed},IsInline:function(){return this.m_isInline}, RenderFloat:function(){if(this.IsRendered())D2L.Util.Style.ApplyFloat(this.GetDomNode(),this.GetFloat())},RenderIsDisplayed:function(){if(this.IsRendered())if(this.IsDisplayed())if(this.IsInline())this.GetDomNode().style.display="inline";else this.GetDomNode().style.display="block";else this.GetDomNode().style.display="none"},RenderIsInline:function(){if(this.IsRendered()&&this.IsDisplayed())if(this.IsInline())this.GetDomNode().style.display="inline";else this.GetDomNode().style.display="block"}, RenderText:function(){if(this.IsRendered()){this.GetText().AssignHtml(this.GetDomNode(),"innerHTML");if(this.GetLanguageCode()!==null)this.GetDomNode().lang=this.GetLanguageCode()}},SetFloat:function(val){this.m_float=val;this.RenderFloat()},SetIsDisplayed:function(isDisplayed){this.m_isDisplayed=isDisplayed;this.RenderIsDisplayed()},SetIsInline:function(isInline){this.m_isInline=isInline;this.RenderIsInline()},SetText:function(text){this.m_text=D2L.LP.Text.IText.Normalize(text,"D2L.Control.TextBlock", "SetText","text");this.RenderText()},SetLanguageCode:function(languageCode){this.m_languageCode=languageCode;this.RenderText()},GetLanguageCode:function(){return this.m_languageCode}}); D2L.Control.Thumbnail=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_size=100;this.m_isDisplayed=true;this.m_fileInfo=null;this.m_queryString=""},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);this.m_isDisplayed=deserializer.GetBoolean();this.m_size=deserializer.GetMember();this.m_queryString=deserializer.GetMember()},SetFile:function(json){var fileInfo=D2L.Serialization.JsonDeserializer.Deserialize(json, D2L.Files.FileInfo);this.SetImageFile(fileInfo)},SetImageFile:function(fileInfo){if(this.IsRendered()){this.GetDomNode().src="/d2l/img/lp/pixel.gif";var me=this;setTimeout(function(){me.GetDomNode().src=D2L.Control.Thumbnail.GetViewThumbUrl(fileInfo,me.m_size)+me.m_queryString})}this.m_fileInfo=fileInfo},SetIsDisplayed:function(isDisplayed){if(this.IsRendered())this.GetDomNode().style.display=isDisplayed?"inline":"none";this.m_isDisplayed=isDisplayed}}); D2L.Control.Thumbnail.GetViewThumbUrl=function(fileInfo,size){var fileId=fileInfo.GetFileId();var fileSystemType=fileInfo.GetFileSystemType();var lastModified=fileInfo.GetLastModified();fileId=D2L.Util.Base64.Encode(fileId);fileId=fileId.replace("=","").replace("/","_");if(fileId.Length>100)return"/d2l/common/viewThumb.d2lfile/"+fileSystemType+"/"+DateTime.Now.Ticks+"/"+lastModified+"/"+size+"?ou="+Global.OrgUnitId+"&fid="+fileId;else return"/d2l/common/viewThumb.d2lfile/"+fileSystemType+"/"+fileId+ "/"+lastModified+"/"+size+"?ou="+Global.OrgUnitId};D2L.Util.Aria={};D2L.Util.Aria.IsEnabled=function(){return true};D2L.Util.Aria.RemoveAttribute=function(element,attribute){if(D2L.Util.Aria.IsEnabled()&&element!==undefined&&element!==null)element.removeAttribute("aria-"+attribute)};D2L.Util.Aria.SetAttribute=function(element,attribute,value){if(D2L.Util.Aria.IsEnabled()&&element!==undefined&&element!==null)element.setAttribute("aria-"+attribute,value)}; D2L.Util.Aria.SetRole=function(element,role){if(D2L.Util.Aria.IsEnabled()&&element!==undefined&&element!==null)element.setAttribute("role",role)};D2L.Util.Aria.Politeness={Off:"off",Polite:"polite",Assertive:"assertive",Rude:"rude"}; D2L.Util.Aria.MakeLiveRegion=function(control,politeness){if(politeness===undefined)politeness=D2L.Util.Aria.Politeness.Assertive;var domNode=control;if(D2L.Util.IsD2LControl(control)){if(!control.IsRendered())control.BuildDom();domNode=control.GetDomNode()}D2L.Util.Aria.SetAttribute(domNode,"live",politeness)};D2L.Util.Base64={}; D2L.Util.Base64.Encode=function(data){var chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var reg=new RegExp("([^%])|(%[a-fA-F0-9][a-fA-F0-9])","g");var binary="";var ret=encodeURIComponent(data).replace(reg,function(m){var val;if(m.length==1)val=m.charCodeAt(0);else val=parseInt(m.substr(1),16);val=val.toString(2);while(val.length<8)val="0"+val;binary+=val;val="";while(binary.length>=6){val+=chars.charAt(parseInt(binary.substr(0,6),2));binary=binary.substr(6)}return val}); if(binary.length>0){while(binary.length<6)binary+="0";ret+=chars.charAt(parseInt(binary,2))}while(ret.length%4!=0)ret+="=";return ret}; D2L.Util.Base64.Decode=function(data){data=data.replace(/[^a-z0-9\+\/]/ig,"");var chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var ret="";var binary="";for(var i=0;i<data.length;i++){var val=chars.indexOf(data.charAt(i));val=val.toString(2);while(val.length<6)val="0"+val;binary+=val;while(binary.length>=8){var ch=binary.substr(0,8);binary=binary.substr(8);ch=parseInt(ch,2);ch=ch.toString(16);if(ch.length==1)ch="0"+ch;ret+="%"+ch}}return decodeURIComponent(ret)}; D2L.Util.Clipboard=D2L.Class.extend({Construct:function(){this.m_item=null},Clear:function(){this.m_item=null},IsEmpty:function(){return this.m_item===null},Get:function(){return this.m_item},Set:function(clipboardItem){this.m_item=clipboardItem}});D2L.Util.Clipboard.Actions={Cut:1,Copy:2}; D2L.Util.Clipboard.Item=D2L.Class.extend({Construct:function(dataObj,clipboardAction){this.m_dataObj=dataObj;this.m_action=clipboardAction},GetAction:function(){return this.m_action},GetDataObject:function(){return this.m_dataObj},SetAction:function(action){this.m_action=action},SetDataObject:function(dataObj){this.m_dataObj=dataObj}}); D2L.Util.DataSource=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_count=0;this.m_index=-1;this.m_rawData=[];this.m_fields=[]},Deserialize:function(deserializer){this.m_fields=deserializer.GetMember("Fields");this.m_rawData=deserializer.GetMember("Data");this.m_count=this.m_rawData.length},GetFields:function(){return this.m_fields},GetFieldIndex:function(field){for(var i=0;i<this.m_fields.length;i++)if(this.m_fields[i]==field)return i;return-1},GetNumRows:function(){return this.m_count}, GetRow:function(){return this.m_index},GetValue:function(field,type){if(this.IsEOF())throw"DataSource has reached end of data.";else{var fieldIndex=this.GetFieldIndex(field);if(fieldIndex<0)throw"DataSource does not contain field '"+field+"'.";if(this.m_index==-1)this.MoveAhead();var rawValue=this.m_rawData[this.m_index][fieldIndex];return D2L.Serialization.JsonDeserializer.Deserialize(rawValue,type)}},IsEOF:function(){return this.m_index>=this.m_count},MoveAhead:function(num){if(num===undefined)num= 1;this.m_index+=num},Read:function(){this.m_index++;return!this.IsEOF()}});D2L.Data={};D2L.Data.DataSource=D2L.Util.DataSource; D2L.Util.DateTime=D2L.Class.extend({Construct:function(year,month,day,hour,minute,second){arguments.callee.$.Construct.call(this);if(hour===undefined)hour=0;if(minute===undefined)minute=0;if(second===undefined)second=0;this.m_date=new Date(year,month-1,day,hour,minute,second)},CompareTo:function(date){if(this.GetTimestamp()<date.GetTimestamp())return-1;else if(this.GetTimestamp()>date.GetTimestamp())return 1;else return 0},GetDay:function(){return this.m_date.getDate()},GetDayOfWeek:function(){return this.m_date.getDay()}, GetHour:function(){return this.m_date.getHours()},GetMinute:function(){return this.m_date.getMinutes()},GetMonth:function(){return this.m_date.getMonth()+1},GetSecond:function(){return this.m_date.getSeconds()},GetTimestamp:function(){return this.m_date.getTime()},GetYear:function(){return this.m_date.getFullYear()},Deserialize:function(deserializer){var year=deserializer.GetMember("Year");var month=deserializer.GetMember("Month");var day=deserializer.GetMember("Day");var hour=deserializer.GetMember("Hour"); var minute=deserializer.GetMember("Minute");var second=deserializer.GetMember("Second");this.m_date=new Date(year,month-1,day,hour,minute,second)},Serialize:function(serializer){serializer.AddMember("Year",this.GetYear());serializer.AddMember("Month",this.GetMonth());serializer.AddMember("Day",this.GetDay());serializer.AddMember("Hour",this.GetHour());serializer.AddMember("Minute",this.GetMinute());serializer.AddMember("Second",this.GetSecond())}}); D2L.Util.DateTime.ConvertToD2LDateTime=function(dateTime){var result=new D2L.DateTime;result.SetMonth(0);result.SetDay(1);result.SetYear(dateTime.GetYear());result.SetMonth(dateTime.GetMonth()-1);result.SetDay(dateTime.GetDay());result.SetHour(dateTime.GetHour());result.SetMinute(dateTime.GetMinute());return result}; D2L.Util.DateTime.ConvertFromD2LDateTime=function(d2lDateTime){var result=new D2L.Util.DateTime(d2lDateTime.GetYear(),d2lDateTime.GetMonth()+1,d2lDateTime.GetDay(),d2lDateTime.GetHour(),d2lDateTime.GetMinute(),0);return result}; D2L.Util.DateTime.Now=function(){var diffMilliseconds=(new Date).getTime()-D2L.Util.DateTime.LoadTimestamp;var newDate=new Date(D2L.Util.DateTime.LoadDateTime.GetTimestamp()+diffMilliseconds);return new D2L.Util.DateTime(newDate.getFullYear(),newDate.getMonth()+1,newDate.getDate(),newDate.getHours(),newDate.getMinutes(),newDate.getSeconds())};D2L.Util.DateTime.Today=function(){var now=D2L.Util.DateTime.Now();return new D2L.Util.DateTime(now.GetYear(),now.GetMonth(),now.GetDay(),0,0,0)}; D2L.Util.DateTime.DayOfWeek={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6};D2L.Util.DateTime.LoadDateTime=null;D2L.Util.DateTime.LoadTimestamp=(new Date).getTime();D2L.Util.DateTime.ConvertToLocalDateTime=function(dateTime){var result=new D2L.LocalDateTime(dateTime.GetYear(),dateTime.GetMonth(),dateTime.GetDay(),dateTime.GetHour(),dateTime.GetMinute(),0);return result}; D2L.Util.Decimal={MaxValue:999999999999999,MinValue:-999999999999999,Parse:function(value){return Culture.GetNumberParser().ParseDecimal(value)},Format:function(value,numOfDecimalPoints,trailingZeroes){return Culture.GetNumberFormatter().FormatDecimal(value,numOfDecimalPoints,trailingZeroes)}}; D2L.Util.DelayedReturn=D2L.Class.extend({Construct:function(ret){arguments.callee.$.Construct.call(this,true);this.m_hasReturned=false;this.m_isDelayedReturn=true;this.m_registrees=[];this.m_returnValue=null;if(ret!==undefined)this.Trigger(ret)},Dispose:function(){this.m_registrees=null},GetReturnValue:function(){return this.m_returnValue},HasReturned:function(){return this.m_hasReturned},Register:function(method){if(this.HasReturned())method.call(method,this.GetReturnValue());else this.m_registrees.push(method)}, RegisterWithReturn:function(method){var dr=new D2L.Util.DelayedReturn;this.Register(function(val){var ret=method(val);dr.Trigger(ret)});return dr},Trigger:function(ret){if(!this.HasReturned())if(D2L.Util.IsDelayedReturn(ret)){var me=this;ret.Register(function(ret2){me.Trigger(ret2)})}else{this.m_returnValue=ret;this.m_hasReturned=true;if(this.m_registrees)for(var i=0;i<this.m_registrees.length;i++)this.m_registrees[i].call(this.m_registrees[i],ret)}},Unregister:function(method){var newRegistrees= [];for(var i=0;i<this.m_registrees.length;i++)if(this.m_registrees[i]!=method)newRegistrees.push(this.m_registrees[i]);this.m_registrees=newRegistrees}});D2L.Util.DelayedReturn.Create=function(beginMethod,endMethod){return new D2L.MethodProxy(beginMethod,endMethod)}; D2L.Util.DelayedReturn.RegisterAll=function(){var args=[];for(var i=0;i<arguments.length-1;i++)args.push(arguments[i]);var callback=arguments[arguments.length-1];D2L.Util.DelayedReturn.RegisterMultiple(args,function(retVals){callback.apply(callback,retVals)})}; D2L.Util.DelayedReturn.RegisterMultiple=function(drs,callback){if(drs.length===0)callback.apply(callback,[]);var retVals=[];var numComplete=0;for(var i=0;i<drs.length;i++){var f=function(){var index=i;drs[i].Register(function(val){retVals[index]=val;numComplete++;if(numComplete==drs.length)callback.call(callback,retVals)})};f()}};D2L.Util.IsDelayedReturn=function(obj){if(obj!==undefined&&obj!==null)return obj.m_isDelayedReturn!==undefined;return false}; D2L.Util.Dictionary=D2L.Class.extend({Construct:function(){this.m_keys=[];this.m_dict={};this.m_values=[];arguments.callee.$.Construct.call(this)},Add:function(key,value){var found=false;for(var i=0;i<this.m_keys.length;i++)if(this.m_keys[i]==key){this.m_values[i]=value;found=true;break}if(!found){this.m_keys.push(key);this.m_values.push(value)}this.m_dict[key]=value},ContainsKey:function(key){for(var i=0;i<this.m_keys.length;i++)if(this.m_keys[i]==key)return true;return false},GetCount:function(){return this.m_keys.length}, Get:function(key){if(this.m_dict[key]!==undefined)return this.m_dict[key];return undefined},Keys:function(){return this.m_keys},Remove:function(key){for(var i=0;i<this.m_keys.length;i++)if(this.m_keys[i]==key){this.m_keys.splice(i,1);this.m_values.splice(i,1);this.m_dict[key]=undefined;return true}return false},Values:function(){return this.m_values},Serialize:function(serializer){for(var i=0;i<this.m_keys.length;i++)serializer.AddMember(this.m_keys[i],this.Get(this.m_keys[i]))},Deserialize:function(deserializer){var keys= deserializer.Keys();for(var i=0;i<keys.length;i++)this.Add(keys[i],deserializer.GetMember(keys[i]))}});D2L.Util.Dom={};D2L.Util.Dom.GetHeightHelper=function(node){return D2L.Util.Dom.GetSizeHelper(node).height};D2L.Util.Dom.GetWidthHelper=function(node){return D2L.Util.Dom.GetSizeHelper(node).width}; D2L.Util.Dom.GetSizeHelper=function(node){var dr=new D2L.Util.DelayedReturn;var me=this;var n=node.cloneNode(true);n.id="";n.style.display="none";if(node.parentNode)node.parentNode.insertBefore(n,node);n.style.borderStyle="none";n.style.margin="0px";n.style.padding="0px";n.style.overflow="hidden";n.style.left="-2000px";n.style.position="absolute";n.style.display="block";var height=n.offsetHeight;var width=n.offsetWidth;if(n.parentNode)n.parentNode.removeChild(n);return{height:height,width:width}}; D2L.Util.Dom.CancelBubble=function(event){if(event===undefined)event=window.event;if(event.stopPropagation!==undefined)event.stopPropagation();else if(event.cancelBubble!==undefined)event.cancelBubble=true};D2L.Util.Dom.FindPosX=function(domNode){var x=0;var xy=YAHOO.util.Dom.getXY(domNode);if(xy)x=xy[0];return x};D2L.Util.Dom.FindPosY=function(domNode){var y=0;var xy=YAHOO.util.Dom.getXY(domNode);if(xy)y=xy[1];return y}; D2L.Util.Dom.FindPosXY=function(domNode){var xy=YAHOO.util.Dom.getXY(domNode);if(!xy){xy=[];xy[0]=0;xy[1]=0}return xy}; D2L.Util.Dom.ScrollTo=function(node,doMiddle,doScrollToBottom){if(!node||!node.offsetLeft||!node.offsetWidth)return;if(doMiddle===undefined)doMiddle=false;if(doScrollToBottom===undefined)doScrollToBottom=false;var posX=D2L.Util.Dom.FindPosX(node);var posY=D2L.Util.Dom.FindPosY(node);var width=node.offsetWidth;var scrollLeft=UI.GetScrollLeft();var scrollTop=UI.GetScrollTop();var clientWidth=UI.GetWindowWidth();var clientHeight=UI.GetWindowHeight();var isBottom=false;if(doScrollToBottom&&node.offsetHeight&& node.offsetHeight+posY>=scrollTop+clientHeight&&posY>scrollTop){posY=posY+node.offsetHeight;isBottom=true}var scrollAmtX=0;var scrollAmtY=0;var diff=0;if(!isBottom)diff=clientHeight;if(doMiddle)diff=clientHeight/2;if(posY<scrollTop)scrollAmtY=posY-scrollTop-diff;else if(posY>scrollTop+clientHeight)scrollAmtY=posY-(scrollTop+clientHeight)+diff;if(posX<scrollLeft)scrollAmtX=posX-scrollLeft;else if(posX+width>scrollLeft+clientWidth)scrollAmtX=posX+width-(scrollLeft+clientWidth);if(scrollAmtX!=0||scrollAmtY!= 0)window.scrollBy(scrollAmtX,scrollAmtY)};var ScrollToDomNode=D2L.Util.Dom.ScrollTo;D2L.Util.Dom.Purge=function(d){var a=d.attributes,i,l,n;if(a){l=a.length;for(i=0;i<l;i+=1)if(a[i]){n=a[i].name;if(typeof d[n]==="function")d[n]=null}}a=d.childNodes;if(a){l=a.length;for(i=0;i<l;i+=1)D2L.Util.Dom.Purge(d.childNodes[i])}}; D2L.Util.Dom.SetPngSrc=function(img,src,width,height){img.width=width;img.height=height;if(img.runtimeStyle){img.src="/d2l/tools/img/pixel.gif";img.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"',sizingMethod='scale')"}else img.src=src};D2L.Util.Dom.IsKeyEnter=function(e){var evt=e||window.event;if(evt===undefined||evt===null)return false;if(evt.keyCode==13||evt.charCode==13||evt.which==13)return true;else return false}; D2L.Util.Dom.IsAncestor=function(ancestorNode,node){return YAHOO.util.Dom.isAncestor(ancestorNode,node)}; D2L.Util.Dom.GetElementsByClassName=function(elem,className){if(elem.getElementsByClassName!==undefined)return elem.getElementsByClassName(className);var allElems=elem.all?elem.all:elem.getElementsByTagName("*");var elems=[];className=className.replace(/\-/g,"\\-");var oRegExp=new RegExp("(^|\\s)"+className+"(\\s|$)");for(var i=0;i<allElems.length;i++)if(oRegExp.test(allElems[i].className))elems.push(allElems[i]);return elems}; D2L.Util.Dom.HasClassName=function(className,domNode){if(!className||!domNode||domNode.className===undefined)return false;var classes=domNode.className.split(" ");for(var i=0;i<classes.length;i++)if(classes[i]==className)return true;return false};D2L.Util.Email={};D2L.Util.Email.GetValidityRegex=function(){return new RegExp(/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/)}; D2L.Util.Email.IsAddressValid=function(emailAddress){return D2L.Util.Email.GetValidityRegex().test(emailAddress)};function IsEmailValid(emailAddress){D2L.LP.Web.UI.Html.JavaScript.Console.Warn("IsEmailValid() is deprecated, use D2L.Util.Email.IsAddressValid( address ) instead.");return D2L.Util.Email.IsAddressValid(emailAddress)} function d2l_Encoder(valSep,valReplace,rowSep,rowReplace){this.ResetData();this.valSep=valSep;this.rowSep=rowSep;this.valReplace=this.escapeChar+valReplace;this.rowReplace=this.escapeChar+rowReplace}d2l_Encoder.prototype.escapeChar="\\";d2l_Encoder.prototype.escapeReplace="\\&";d2l_Encoder.prototype.ResetData=function(){this.rows=new Array}; d2l_Encoder.prototype.AddRow=function(){var data=new Array;if(arguments[0]!==undefined)if(arguments[0].join)data=arguments[0];else for(var i=0;i<arguments.length;i++)data[i]=arguments[i];this.rows[this.rows.length]=data};d2l_Encoder.prototype.Encode=function(val){var ret=val;if(val.split){ret=val.split(this.escapeChar).join(this.escapeReplace);ret=ret.split(this.valSep).join(this.valReplace);ret=ret.split(this.rowSep).join(this.rowReplace)}return ret}; d2l_Encoder.prototype.Decode=function(val){var ret=val.split(this.rowReplace).join(this.rowSep);ret=ret.split(this.valReplace).join(this.valSep);ret=ret.split(this.escapeReplace).join(this.escapeChar);return ret}; d2l_Encoder.prototype.Serialize=function(){var ret="";var currRow;var valReplace=this.escapeChar+this.valReplace;var rowReplace=this.escapeChar+this.rowReplace;var currVal,valSep;var currRowVals,rowSep;rowSep="";for(var i=0;i<this.rows.length;i++){currRow=this.rows[i];currRowVals="";valSep="";for(var x=0;x<currRow.length;x++){currVal=this.Encode(currRow[x]);currRowVals+=valSep+currVal;valSep=this.valSep}ret+=rowSep+currRowVals;rowSep=this.rowSep}return ret}; d2l_Encoder.prototype.Deserialize=function(data){this.ResetData();var rows=data.split(this.rowSep);var currData;var rowReplace=this.escapeChar+this.rowReplace;var valReplace=this.escapeChar+this.valReplace;for(var i=0;i<rows.length;i++){currData=rows[i].split(this.valSep);for(var x=0;x<currData.length;x++)currData[x]=this.Decode(currData[x]);this.rows[this.rows.length]=currData}return this.rows};D2L.Util.Html={}; D2L.Util.Html.Encode=function(str){if(str!=undefined&&str.encodeHtml!==undefined)return str.encodeHtml();return str};D2L.Util.Html.Decode=function(str){if(str!=undefined&&str.encodeHtml!==undefined)return str.decodeHtml();return str};D2L.Util.Html.HasClassName=function(domNode,className){if(domNode&&domNode.className!==undefined){var classNames=domNode.className.split(" ");for(var i=0;i<classNames.length;i++)if(classNames[i]==className)return true}return false}; D2L.Util.Html.JsString=function(str){var str=new String(str);str=str.replace("\\","\\\\");str=str.replace("'","\\'");str=str.replace('"','\\"');str=str.replace("/","\\/");str=str.replace("\n","\\n");return str}; D2L.Util.Html.FindFrame=function(frameName,baseWindow){if(baseWindow===undefined)baseWindow=window;var FindFrameFromWindow=function(win){var TravelDown=function(win2){if(win2.frames&&win2.frames[frameName])return win2.frames[frameName];else if(win2.frames)for(var i=0;i<win2.frames.length;i++){var result=TravelDown(win2.frames[i]);if(result!==null)return result}return null};var start=win;while(true)if(start.parent&&start.parent!=start)start=start.parent;else break;var down=TravelDown(start);if(down!== null)return down;if(win.opener)return FindFrameFromWindow(win.opener);return null};return FindFrameFromWindow(baseWindow)};D2L.Util.Html.IsDomNode=function(obj){if(obj!==undefined&&obj!==null)return obj.tagName!==undefined;return false};D2L.Util.Integer={MaxValue32:2147483647,MinValue32:-2147483648,MaxValue64:999999999999999,MinValue64:-999999999999999,Parse:function(value){return Culture.GetNumberParser().ParseInteger(value)},Format:function(value){return Culture.GetNumberFormatter().FormatInteger(value)}}; D2L.Util.IsD2LControl=function(obj){if(obj!==undefined)return obj.isD2LControl!==undefined;return false};D2L.Util.JavaScript={};D2L.Util.JavaScript.DeepCopy=function(obj){if(obj===undefined||obj===null)return obj;if(typeof obj=="object"&&obj.__isArray){var copy=[];for(var i=0;i<obj.length;i++)copy.push(D2L.Util.JavaScript.DeepCopy(obj[i]));return copy}else if(typeof obj=="object"){var copy={};for(var property in obj)copy[property]=D2L.Util.JavaScript.DeepCopy(obj[property]);return copy}return obj}; D2L.Util.JavaScript.IsArray=function(obj){if(obj&&obj.pop&&obj.push)return true;return false};function isArray(obj){return D2L.Util.JavaScript.IsArray(obj)}D2L.Util.Number={};D2L.Util.Number.Mod=function(num,base){var mod=num%base;return mod<0?base+mod:mod};D2L.Util.SpellChecker={}; D2L.Util.SpellChecker.OpenSpellChecker=function(text,isTextHtml,previewText,isPreviewTextHtml){var dr=new D2L.Util.DelayedReturn;var dialog=new D2L.Dialog.SpellChecker;dialog.SetText(text);dialog.SetIsTextHtml(isTextHtml);if(previewText!==undefined&&isPreviewTextHtml!==undefined){dialog.SetPreviewText(previewText);dialog.SetIsPreviewTextHtml(isPreviewTextHtml)}var callback=function(dialogResponse){if(dialogResponse.GetType()==D2L.Dialog.ResponseType.Positive)dr.Trigger(dialogResponse.GetData("text")); dialog.Close()};dialog.SetCallback(callback);dialog.Open();return dr};if(String.prototype.trim===undefined)String.prototype.trim=function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")};String.prototype.isString=true;String.prototype.ltrim=function(){return this.replace(/^\s+/,"")};String.prototype.rtrim=function(){return this.replace(/\s+$/,"")};String.prototype.stripHtml=function(){var str=this.replace(" "," ");return str.replace(/(<([^>]+)>)/ig,"")}; String.prototype.encodeHtml=function(){var str=this.toString();return D2L.LP.Web.UI.Html.JavaScript.HtmlEncode(str)};String.prototype.d_oldReplace=String.prototype.replace;String.prototype.replace=function(strOrRegex,replaceVal){if(!strOrRegex.isString)return this.d_oldReplace(strOrRegex,replaceVal);if(strOrRegex.search(/d2l\-|vui\-|iron\-/)>-1)return this.d_oldReplace(strOrRegex,replaceVal);return this.split(strOrRegex).join(replaceVal)}; String.prototype.format=function(params){var str=this.toString();for(var i=0;i<arguments.length;i++)str=str.replace("{"+i+"}",arguments[i]);return str};String.prototype.langReplace=function(params){var str=this.toString();for(var i=0;i<arguments.length;i++)str=str.replace("["+i+"]",arguments[i]);return str};String.prototype.decodeHtml=function(){return this.replace(/\&[a-zA-Z0-9#]*;/g,DecodeHtmlEntity)};String.prototype.jsString=function(){return D2L.Util.Html.JsString(this.toString())}; String.prototype.endsWith=function(end){var str=this.toString();return str.length>=end.length&&str.substr(str.length-end.length)==end};function DecodeHtmlEntity(entity){var newEntity=entity;var entities=window.getHtmlEntities();if(entities[entity])newEntity="&#"+entities[entity]+";";var charCodeMatches=newEntity.match(/\&\#[0-9]+;/);if(charCodeMatches)return String.fromCharCode(newEntity.substring(2,newEntity.length-1));return entity} window.getHtmlEntities=function(){if(this.entities!==undefined)return this.entities;this.entities={""":34,"&":38,"<":60,">":62,"Œ":338,"œ":339,"Š":352,"š":353,"Ÿ":376,"ˆ":710,"˜":732," ":8194," ":8195," ":8201,"‌":8204,"‍":8205,"‎":8206,"‏":8207,"–":8211,"—":8212,"‘":8216,"’":8217,"‚":8218,"“":8220,"”":8221,"„":8222,"†":8224,"‡":8225,"‰":8240, "‹":8249,"›":8250,"€":8364,"'":39," ":160,"¡":161,"¢":162,"£":163,"¤":164,"¥":165,"¦":166,"§":167,"¨":168,"©":169,"ª":170,"«":171,"¬":172,"­":173,"®":174,"¯":175,"°":176,"±":177,"²":178,"³":179,"´":180,"µ":181,"¶":182,"·":183,"¸":184,"¹":185,"º":186,"»":187,"¼":188,"½":189,"¾":190,"¿":191,"À":192, "Á":193,"Â":194,"Ã":195,"Ä":196,"Å":197,"Æ":198,"Ç":199,"È":200,"É":201,"Ê":202,"Ë":203,"Ì":204,"Í":205,"Î":206,"Ï":207,"Ð":208,"Ñ":209,"Ò":210,"Ó":211,"Ô":212,"Õ":213,"Ö":214,"×":215,"Ø":216,"Ù":217,"Ú":218,"Û":219,"&Uml;":220,"Ý":221,"Þ":222,"ß":223,"à":224,"á":225,"â":226,"ã":227,"ä":228, "å":229,"æ":230,"ç":231,"è":232,"&eactute;":233,"ê":234,"ë":235,"ì":236,"í":237,"î":238,"ï":239,"ð":240,"ñ":241,"ò":242,"ó":243,"ô":244,"õ":245,"ö":246,"÷":247,"ø":248,"ù":249,"ú":250,"û":251,"ü":252,"ý":253,"þ":254,"ÿ":255};return this.entities}; D2L.Util.StringBuilder=D2L.Class.extend({Construct:function(initialValue){this.m_buffer=new Array("");if(initialValue!==undefined)this.Append(initialValue)},Append:function(value){this.m_buffer.push(value)},ToString:function(){return this.m_buffer.join("")}});D2L.Util.Style={};D2L.Util.Style.ApplyFloat=function(domNode,val){var f="none";val=UI.GetCulture().GetFloat(val);if(val==D2L.Style.Float.Left)f="left";else if(val==D2L.Style.Float.Right)f="right";domNode.style.cssFloat=f};D2L.Util.Url={}; D2L.Util.Url.Encode=function(str){var ret=encodeURIComponent(str);ret=ret.replace("'","%27");ret=ret.replace("%2F","/");ret=ret.replace("%2C",",");return ret};D2L.Util.Url.Decode=function(str){return decodeURIComponent(str)};D2L.Util.Url.IsExternal=function(url){url=url.trim();var regexp=new RegExp("^[a-zA-Z]+://","i");var hasProtocol=regexp.test(url);if(hasProtocol){var protocol=url.substr(0,url.indexOf(":"));if(protocol.toLowerCase()=="javascript")hasProtocol=false}return hasProtocol}; D2L.Util.GetViewFileUrl=function(file,stream){if(stream===undefined)stream=false;var fileId=D2L.Util.Base64.Encode(file.FileId).replace("=","").replace("/","_");var fileName=D2L.Util.Url.Encode(file.FileName.replace(/[#?\/\\%&+<>:*]/g,"_")).replace(/\.\.+/g,".").replace("+","%20");var url="/d2l/common/viewFile.d2lfile/";if(fileId.length>100)url+=file.FileSystemType+"/"+(new Date).getTime()+"/"+fileName+"?ou="+Global.OrgUnitId+"&fid="+fileId;else url+=file.FileSystemType+"/"+fileId+"/"+fileName+"?ou="+ Global.OrgUnitId;if(stream)url+="&display=1";return url}; D2L.Util.GetViewImageFileUrl=function(file,size,fillColour){if(size===undefined)size=0;if(fillColour===undefined)fillColour="#ffffff";fillColour=D2L.Util.Url.Encode(fillColour);var fileId=D2L.Util.Base64.Encode(file.FileId).replace("=","").replace("/","+");var fileName=D2L.Util.Url.Encode(file.FileName.replace(/[#?\/\\%&+<>:*]/g,"_")).replace(/\.\.+/g,".").replace("+","%20");if(fileId.length>100)return"/d2l/common/viewImage.d2lfile/"+file.FileSystemType+"/"+(new Date).getTime()+"/"+fileName+"?ou="+ Global.OrgUnitId+"&fid="+fileId+"&s="+size+"&c="+fillColour;else return"/d2l/common/viewImage.d2lfile/"+file.FileSystemType+"/"+fileId+"/"+fileName+"?ou="+Global.OrgUnitId+"&s="+size+"&c="+fillColour};window.oldAlert=window.alert;window.alert=function(obj){if(obj&&obj.isString){obj=obj.replace(/<br[\s]*[\/]?[\s]*>/gi,"\n");obj=obj.stripHtml();obj=obj.decodeHtml()}this.oldAlert(obj)};window.oldConfirm=window.confirm; window.confirm=function(obj){if(obj&&obj.isString){obj=obj.replace(/<br[\s]*[\/]?[\s]*>/gi,"\n");obj=obj.stripHtml();obj=obj.decodeHtml()}return this.oldConfirm(obj)};D2L.Validation={};D2L.Validation.NumberFailureType={None:0,NaN:1,NaNOutOfRange:2,GTE:3,GT:4,LTE:5,LT:6}; D2L.Validation.CreateErrorBalloon=function(failureText){var div1=document.createElement("div");div1.className="d_vb vui-validation-bubble vui-validation-bubble-show";var div2=document.createElement("div");div2.className="d_vb1";div1.appendChild(div2);var div3=document.createElement("div");div3.className="d_vb2 vui-validation-bubble-content";div1.appendChild(div3);failureText.GetHtml().Register(function(html){div3.innerHTML=html});return div1}; D2L.Validation.IValidator=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_passed=true},CanValidateNoDelay:function(obj){return obj.GetValueNoDelay!==undefined},GetFailureText:function(){return new D2L.LP.Text.LangTerm("Framework.Validation.GenericInvalid")},Passed:function(){return this.m_passed},Validate:function(){return true},ValidateObject:function(obj){return new D2L.Util.DelayedReturn(this.Validate())},ValidateObjectNoDelay:function(obj){return this.Validate()}}); D2L.Validation.StringValidator=D2L.Validation.IValidator.extend({Construct:function(value){arguments.callee.$.Construct.call(this);this.m_value=value;this.m_maxCharacters=0;this.m_isRequired=false;this.m_regex=null;this.m_regexFailureText=new D2L.LP.Text.PlainText;this.m_failureText=new D2L.LP.Text.PlainText},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);if(deserializer.HasMember()){this.m_maxCharacters=deserializer.GetMember();this.m_isRequired= deserializer.GetBoolean();if(deserializer.HasMember()){var regex=deserializer.GetMember();if(regex.length>0){this.m_regex=new RegExp(regex);this.m_regexFailureText=deserializer.GetObject(D2L.LP.Text.IText)}}}},GetFailureText:function(){return this.m_failureText},GetRegexFailureText:function(){return this.m_regexFailureText},GetIsRequired:function(){return this.m_isRequired},GetMaxCharacters:function(){return this.m_maxCharacters},GetRegex:function(){return this.m_regex},GetValue:function(){return this.m_value}, SetRegexFailureText:function(failureText){this.m_regexFailureText=failureText},SetIsRequired:function(isRequired){this.m_isRequired=isRequired},SetMaxCharacters:function(maxCharacters){this.m_maxCharacters=maxCharacters},SetRegex:function(regex){this.m_regex=regex},SetValue:function(value){this.m_value=value},Validate:function(value){if(value===undefined)value=this.GetValue();if(this.GetIsRequired()){var validator=new D2L.Validation.RequiredValidator(value);if(!validator.Validate()){this.m_failureText= validator.GetFailureText();return false}}else if(value.length===0)return true;if(this.GetMaxCharacters()>0&&value.length>this.GetMaxCharacters()){this.m_failureText=new D2L.LP.Text.LangTerm("Framework.Validation.StringMaxCharacters",this.GetMaxCharacters());return false}if(this.GetRegex()!==null&&!this.GetRegex().test(value)){this.m_failureText=this.GetRegexFailureText();return false}return true},ValidateObject:function(obj){var dr=new D2L.Util.DelayedReturn;var me=this;obj.GetValue().Register(function(value){dr.Trigger(me.Validate(value))}); return dr},ValidateObjectNoDelay:function(obj){return this.Validate(obj.GetValueNoDelay())}});D2L.Control.ValidatorString=D2L.Validation.StringValidator; D2L.Validation.AndValidator=D2L.Validation.IValidator.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_children=[];this.m_failureText=new D2L.LP.Text.PlainText},CanValidateNoDelay:function(obj){var ret=true;for(var i=0;i<this.m_children.length;i++){var validator=UI.GetControl(this.m_children[i].ID(),this.m_children[i].SID());ret=ret&&validator.CanValidateNoDelay(obj)}return ret},IntegrateControlMin:function(deserializer){this.m_children=deserializer.GetObjectArrayMin(D2L.Control.Id)}, GetFailureText:function(){return this.m_failureText},Validate:function(){var ret=true;for(var i=0;i<this.m_children.length;i++){var validator=UI.GetControl(this.m_children[i].ID(),this.m_children[i].SID());var pass=validator.Validate();validator.m_passed=pass;if(!pass)this.m_failureText=validator.GetFailureText();ret=ret&&pass}return pass},ValidateObject:function(obj){var dr=new D2L.Util.DelayedReturn;var me=this;var ret=true;var HandleResult=function(validator,result){validator.m_passed=result;if(!result)me.m_failureText= validator.GetFailureText();ret=ret&&result};var Validate=function(index){if(index==me.m_children.length||!ret)dr.Trigger(ret);else{var validator=UI.GetControl(me.m_children[index].ID(),me.m_children[index].SID());var drChild=validator.ValidateObject(obj);if(D2L.Util.IsDelayedReturn(drChild))drChild.Register(function(pass){HandleResult(validator,pass);Validate(++index)});else{HandleResult(validator,drChild);Validate(++index)}}};Validate(0);return dr},ValidateObjectNoDelay:function(obj){var me=this; var Validate=function(index){if(index==me.m_children.length)return true;else{var validator=UI.GetControl(me.m_children[index].ID(),me.m_children[index].SID());var success=validator.ValidateObjectNoDelay(obj);validator.m_passed=success;if(!success)me.m_failureText=validator.GetFailureText();return Validate(++index)&&success}};return Validate(0)}});D2L.Control.ValidatorAnd=D2L.Validation.AndValidator; D2L.Validation.CustomValidator=D2L.Validation.IValidator.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_jsFunction=null;this.m_jsParams=[this];this.m_failureText=null;this.m_failureControl=null;this.m_failureControlId=null;this.m_validationTarget=null},CanValidateNoDelay:function(){return false},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);this.m_jsFunction=deserializer.GetMemberAsFunction();this.m_jsParams= this.m_jsParams.concat(deserializer.GetMember());var failureControlID=deserializer.GetMember();var failureControlSID=deserializer.GetMember();if(failureControlID.length>0)this.m_failureControlId=new D2L.Control.Id(failureControlID,failureControlSID);var failureText=deserializer.GetMember().replace("{tempsubject}","{subject}");if(failureText.length>0)this.m_failureText=new D2L.LP.Text.SmlText(failureText)},Focus:function(){if(this.m_failureControlId!==null)this.m_failureControl=UI.GetControl(this.m_failureControlId.ID(), this.m_failureControlId.SID());if(this.m_failureControl!==null)if(this.m_failureControl.Focus!==undefined)this.m_failureControl.Focus();else if(this.m_failureControl.focus!==undefined)try{this.m_failureControl.focus()}catch(e){}},GetDomNode:function(){if(this.m_failureControlId!==null)this.m_failureControl=UI.GetControl(this.m_failureControlId.ID(),this.m_failureControlId.SID());if(this.m_failureControl!==null)if(D2L.Util.IsD2LControl(this.m_failureControl)){if(this.m_failureControl.GetValidationDomNode!== undefined)return this.m_failureControl.GetValidationDomNode();return this.m_failureControl.GetDomNode()}else return this.m_failureControl;return null},GetFailureText:function(){return this.m_failureText},GetValidationTarget:function(){return this.m_validationTarget},HasFocusControl:function(){var control=this.m_failureControl;if(this.m_failureControlId!==null)control=UI.GetControl(this.m_failureControlId.ID(),this.m_failureControlId.SID());if(control!==null)return control.Focus!==undefined||control.focus!== undefined;return false},SetFailureControl:function(control){this.m_failureControl=control;if(this.m_failureControl!==null){var domNode=control;if(D2L.Util.IsD2LControl(control))domNode=control.GetDomNode();var me=this;if(domNode!==null){this.AttachObject(domNode,"ID2LOnRemove",new D2L.EventHandler);domNode.ID2LOnRemove.RegisterMethod(function(evt){me.IsEnabled=function(){return false}})}}},SetDomNode:function(domNode){this.SetFailureControl(domNode)},SetFailureText:function(failureText){this.m_failureText= D2L.LP.Text.IText.Normalize(failureText,"D2L.Validation.CustomValidator","SetFailureText","failureText")},SetIsInvalid:function(isInvalid){if(!this.m_failureControl||!this.m_failureControl.SetIsInvalid)return;this.m_failureControl.SetIsInvalid(isInvalid)},ValidateObject:function(obj){this.m_validationTarget=obj;return new D2L.Util.DelayedReturn(this.Validate())},Validate:function(){var ret=true;if(this.m_jsFunction!==undefined&&this.m_jsFunction!==null){ret=this.m_jsFunction.apply(this.m_jsFunction, this.m_jsParams);if(ret===undefined)ret=true}return ret}});D2L.Control.Validator=D2L.Validation.CustomValidator; D2L.Validation.DateRangeValidator=D2L.Validation.IValidator.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_startYear=null;this.m_startMonth=null;this.m_startDay=null;this.m_startHour=null;this.m_startMinute=null;this.m_endYear=null;this.m_endMonth=null;this.m_endDay=null;this.m_endHour=null;this.m_endMinute=null;this.m_hasStartDate=true;this.m_hasEndDate=true;this.m_failureText=null;this.m_validationFailureSource=0},GetFailureText:function(){return this.m_failureText}, Validate:function(){var validator;if(this.m_hasStartDate){validator=new D2L.Validation.DateTimeValidator(this.m_startYear,this.m_startMonth,this.m_startDay,this.m_startHour,this.m_startMinute,this.m_startSecond);if(!validator.Validate()){this.m_validationFailureSource=1;this.m_failureText=new D2L.LP.Text.LangTerm("Framework.Validation.DateRangeStartInvalid");return false}}if(this.m_hasEndDate){validator=new D2L.Validation.DateTimeValidator(this.m_endYear,this.m_endMonth,this.m_endDay,this.m_endHour, this.m_endMinute,this.m_endSecond);if(!validator.Validate()){this.m_validationFailureSource=2;this.m_failureText=new D2L.LP.Text.LangTerm("Framework.Validation.DateRangeEndInvalid");return false}}this.m_validationFailureSource=0;this.m_failureText=new D2L.LP.Text.LangTerm("Framework.Validation.DateRangeInvalid");if(this.m_hasStartDate&&this.m_hasEndDate){if(this.m_startYear<this.m_endYear)return true;else if(this.m_startYear>this.m_endYear)return false;if(this.m_startMonth<this.m_endMonth)return true; else if(this.m_startMonth>this.m_endMonth)return false;if(this.m_startDay<this.m_endDay)return true;else if(this.m_startDay>this.m_endDay)return false;if(this.m_hasTime){if(this.m_startHour<this.m_endHour)return true;else if(this.m_startHour>this.m_endHour)return false;if(this.m_startMinute<this.m_endMinute)return true;else if(this.m_startMinute>=this.m_endMinute)return false}}return true},ValidateObject:function(obj){return new D2L.Util.DelayedReturn(this.ValidateObjectNoDelay(obj))},ValidateObjectNoDelay:function(obj){this.m_hasStartDate= obj.HasStartDate();this.m_hasEndDate=obj.HasEndDate();this.m_hasTime=obj.HasTime();if(this.m_hasStartDate){this.m_startYear=obj.GetStartYear();this.m_startMonth=obj.GetStartMonth();this.m_startDay=obj.GetStartDay();if(this.m_hasTime){this.m_startHour=obj.GetStartHour();this.m_startMinute=obj.GetStartMinute()}}if(this.m_hasEndDate){this.m_endYear=obj.GetEndYear();this.m_endMonth=obj.GetEndMonth();this.m_endDay=obj.GetEndDay();if(this.m_hasTime){this.m_endHour=obj.GetEndHour();this.m_endMinute=obj.GetEndMinute()}}var pass= this.Validate();if(!pass&&obj.m_validationFailureSource!==undefined)obj.m_validationFailureSource=this.m_validationFailureSource;return pass}});D2L.Control.ValidatorDateRange=D2L.Validation.DateRangeValidator; D2L.Validation.DateTimeValidator=D2L.Validation.IValidator.extend({Construct:function(year,month,day,hour,minute){arguments.callee.$.Construct.call(this);var today=new D2L.Util.DateTime.Now;if(year===undefined)year=today.GetYear();if(month===undefined)month=today.GetMonth();if(day===undefined)day=today.GetDay();if(hour===undefined)hour=today.GetHour();if(minute===undefined)minute=today.GetMinute();this.m_year=year;this.m_month=month;this.m_day=day;this.m_hour=hour;this.m_minute=minute},GetFailureText:function(){return new D2L.LP.Text.LangTerm("Framework.Validation.DateInvalid")}, GetDay:function(){return this.m_day},GetMonth:function(){return this.m_month},GetHour:function(){return this.m_hour},GetMinute:function(){return this.m_minute},GetYear:function(){return this.m_year},SetDay:function(day){this.m_day=day},SetMonth:function(month){this.m_month=month},SetYear:function(year){this.m_year=year},SetHour:function(hour){this.m_hour=hour},SetMinute:function(minute){this.m_minute=minute},Validate:function(year,month,day,hour,minute){if(year===undefined||year===null)year=this.GetYear(); if(month===undefined||month===null)month=this.GetMonth();if(day===undefined||day===null)day=this.GetDay();if(hour===undefined||hour===null)hour=this.GetHour();if(minute===undefined||minute===null)minute=this.GetMinute();if(isNaN(year)||year<1753||year>9999)return false;if(isNaN(month)||month<1||month>12)return false;if(isNaN(day)||day<1||day>31)return false;if(isNaN(hour)||hour<0||hour>23)return false;if(isNaN(minute)||minute<0||minute>59)return false;var allowedDays=31;if(month==2)if(year%4===0&& (!(year%100===0)||year%400===0))allowedDays=29;else allowedDays=28;else if(month==4||month==6||month==9||month==11)allowedDays=30;if(day>allowedDays)return false;return true},ValidateObject:function(obj){return new D2L.Util.DelayedReturn(this.Validate(obj.GetYear(),obj.GetMonth(),obj.GetDay(),obj.GetHour(),obj.GetMinute()))},ValidateObjectNoDelay:function(obj){return this.Validate(obj.GetYear(),obj.GetMonth(),obj.GetDay(),obj.GetHour(),obj.GetMinute())}});D2L.Control.ValidatorDateTime=D2L.Validation.DateTimeValidator; D2L.Validation.DecimalValidator=D2L.Validation.IValidator.extend({Construct:function(value){arguments.callee.$.Construct.call(this);if(value===undefined)value=0;this.m_value=value;this.m_min=null;this.m_max=null;this.m_minIsInclusive=true;this.m_maxIsInclusive=true;this.m_minIsSet=false;this.m_maxIsSet=false;this.m_lastFailureType=D2L.Validation.NumberFailureType.None},IntegrateControlMin:function(deserializer){this.m_value=deserializer.GetMember();this.m_min=deserializer.GetMember();this.m_max=deserializer.GetMember(); this.m_minIsSet=deserializer.GetBoolean();this.m_maxIsSet=deserializer.GetBoolean();this.m_minIsInclusive=deserializer.GetBoolean();this.m_maxIsInclusive=deserializer.GetBoolean()},GetFailureText:function(){if(this.m_lastFailureType==D2L.Validation.NumberFailureType.NaN)return new D2L.LP.Text.LangTerm("Framework.Validation.DecimalInvalid");else if(this.m_lastFailureType==D2L.Validation.NumberFailureType.NaNOutOfRange)return new D2L.LP.Text.LangTerm("Framework.Validation.DecimalInvalidRange",D2L.Util.Decimal.Format(D2L.Util.Decimal.MinValue), D2L.Util.Decimal.Format(D2L.Util.Decimal.MaxValue));var param1=undefined;var param2=undefined;var term;if(this.m_minIsSet&&this.m_maxIsSet){param1=this.m_min;if(param1!=undefined)param1=D2L.Util.Decimal.Format(param1);param2=this.m_max;if(param2!=undefined)param2=D2L.Util.Decimal.Format(param2);if(this.m_minIsInclusive&&this.m_maxIsInclusive)term=new D2L.LP.Text.LangTerm("Framework.Validation.NumberBetweenBothInclusive",param1,param2);else if(this.m_minIsInclusive)term=new D2L.LP.Text.LangTerm("Framework.Validation.NumberBetweenMinInclusive", param1,param2);else if(this.m_maxIsInclusive)term=new D2L.LP.Text.LangTerm("Framework.Validation.NumberBetweenMaxInclusive",param1,param2);else term=new D2L.LP.Text.LangTerm("Framework.Validation.NumberBetweenNoneInclusive",param1,param2)}else if(this.m_minIsSet){param1=this.m_min;if(param1!=undefined)param1=D2L.Util.Decimal.Format(param1);if(this.m_minIsInclusive)term=new D2L.LP.Text.LangTerm("Framework.Validation.NumberHigherInclusive",param1);else term=new D2L.LP.Text.LangTerm("Framework.Validation.NumberHigher", param1)}else if(this.m_maxIsSet){param1=this.m_max;if(param1!=undefined)param1=D2L.Util.Decimal.Format(param1);if(this.m_maxIsInclusive)term=new D2L.LP.Text.LangTerm("Framework.Validation.NumberLowerInclusive",param1);else term=new D2L.LP.Text.LangTerm("Framework.Validation.NumberLower",param1)}else;return term},GetMax:function(){return this.m_max},GetMin:function(){return this.m_min},GetMaxIsInclusive:function(){return this.m_maxIsInclusive},GetMinIsInclusive:function(){return this.m_minIsInclusive}, GetValue:function(){return this.m_value},SetMax:function(max){this.m_max=max;this.m_maxIsSet=true},SetMin:function(min){this.m_min=min;this.m_minIsSet=true},SetMaxIsInclusive:function(maxIsInclusive){this.m_maxIsInclusive=maxIsInclusive},SetMinIsInclusive:function(minIsInclusive){this.m_minIsInclusive=minIsInclusive},SetValue:function(value){this.m_value=value},Validate:function(value){if(value===undefined)value=this.m_value;this.m_lastFailureType=D2L.Validation.NumberFailureType.None;if(value.isString){if(value.length=== 0)return true;try{value=D2L.Util.Decimal.Parse(value)}catch(e){this.m_lastFailureType=D2L.Validation.NumberFailureType.NaN;return false}}if(isNaN(value)){this.m_lastFailureType=D2L.Validation.NumberFailureType.NaN;return false}if(this.m_minIsSet)if(this.GetMinIsInclusive()){if(value<this.GetMin()){this.m_lastFailureType=D2L.Validation.NumberFailureType.LTE;return false}}else if(value<=this.GetMin()){this.m_lastFailureType=D2L.Validation.NumberFailureType.LT;return false}if(value<D2L.Util.Decimal.MinValue){this.m_lastFailureType= D2L.Validation.NumberFailureType.NaNOutOfRange;return false}if(this.m_maxIsSet)if(this.GetMaxIsInclusive()){if(value>this.GetMax()){this.m_lastFailureType=D2L.Validation.NumberFailureType.GTE;return false}}else if(value>=this.GetMax()){this.m_lastFailureType=D2L.Validation.NumberFailureType.GT;return false}if(value>D2L.Util.Decimal.MaxValue){this.m_lastFailureType=D2L.Validation.NumberFailureType.NaNOutOfRange;return false}return true},ValidateObject:function(obj){var dr=new D2L.Util.DelayedReturn; var me=this;obj.GetValue().Register(function(value){dr.Trigger(me.Validate(D2L.Util.Decimal.Parse(value)))});return dr},ValidateObjectNoDelay:function(obj){return this.Validate(obj.GetValueNoDelay())}});D2L.Control.ValidatorDecimal=D2L.Validation.DecimalValidator;D2L.Validation.EmailValidator=D2L.Validation.StringValidator.extend({Construct:function(value){arguments.callee.$.Construct.call(this,value);this.SetRegex(D2L.Util.Email.GetValidityRegex());this.SetRegexFailureText(new D2L.LP.Text.LangTerm("Framework.Validation.EmailInvalid"))}}); D2L.Control.ValidatorEmail=D2L.Validation.EmailValidator; D2L.Validation.FileNameValidator=D2L.Validation.StringValidator.extend({Construct:function(value){arguments.callee.$.Construct.call(this,value);this.SetRestrictLength(true);this.SetRegex(new RegExp(D2L.Files.ValidFileNameNoMaxCharactersRegex));this.SetRegexFailureText(new D2L.LP.Text.LangTerm("Framework.Validation.FileNameInvalid",D2L.Files.InvalidFileNameCharacters));this.m_validExtensions=null;this.m_reservedFilenames=["con","prn","aux","nul","com1","com2","com3","com4","com5","com6","com7","com8", "com9","lpt1","lpt2","lpt3","lpt4","lpt5","lpt6","lpt7","lpt8","lpt9","clock$"]},SetValidExtensions:function(extensions){this.m_validExtensions=extensions},SetRestrictLength:function(restrictLength){if(restrictLength)this.SetMaxCharacters(D2L.Files.MaxFileNameCharacters);else this.SetMaxCharacters(0)},Validate:function(value){value=value.trim();var pass=arguments.callee.$.Validate.call(this,value);if(!pass)return false;var valueToCompare=value.toLowerCase();var pos=value.indexOf(".");if(pos>0)valueToCompare= value.substring(0,pos).toLowerCase();for(var i=0;i<this.m_reservedFilenames.length;i++)if(this.m_reservedFilenames[i]==valueToCompare){this.m_failureText=new D2L.LP.Text.LangTerm("Framework.Validation.FileNameReserved");return false}var extension="";var dotIndex=value.lastIndexOf(".");if(dotIndex>-1&&dotIndex!=value.length-1)extension=value.substr(dotIndex+1).toLowerCase();var extensions=D2L.Files.RestrictedExtensions;for(var i=0;i<extensions.length;i++)if(extension==extensions[i]){this.m_failureText= new D2L.LP.Text.LangTerm("Framework.Validation.FileSetRestrictedExtension");return false}if(this.m_validExtensions!==null&&this.m_validExtensions.length>0){var valid=false;for(var i=0;i<this.m_validExtensions.length;i++)if(extension==this.m_validExtensions[i]){valid=true;break}if(!valid){this.m_failureText=new D2L.LP.Text.LangTerm("Framework.Validation.FileSetInvalidExtension",this.m_validExtensions.join(", "));return false}}return true}});D2L.Control.ValidatorFileName=D2L.Validation.FileNameValidator; D2L.Validation.FileSetValidator=D2L.Validation.IValidator.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_maxTotalFileSize=0;this.m_totalFileSize=0;this.m_fileNames=[];this.m_failureText=null;this.m_truncateFileNames=false;this.m_filenameValidator=new D2L.Validation.FileNameValidator;this.m_filenameValidator.SetRestrictLength(false)},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);this.m_maxTotalFileSize=deserializer.GetMember(); if(deserializer.HasMember())this.m_filenameValidator.SetValidExtensions(deserializer.GetMember())},GetFailureText:function(){return this.m_failureText},GetMaxTotalFileSize:function(){return this.m_maxTotalFileSize},GetTotalFileSize:function(){return this.m_totalFileSize},SetMaxTotalFileSize:function(maxTotalFileSize){this.m_maxTotalFileSize=maxTotalFileSize},SetTotalFileSize:function(totalFileSize){this.m_totalFileSize=totalFileSize},ValidateObject:function(obj){if(obj.SetValidationFailureIndex)obj.SetValidationFailureIndex(-1); if(obj.GetMaxTotalFileSize)this.SetMaxTotalFileSize(obj.GetMaxTotalFileSize());if(obj.GetTotalFileSize)this.SetTotalFileSize(obj.GetTotalFileSize());if(obj.GetFileNames)this.m_fileNames=obj.GetFileNames();if(this.m_maxTotalFileSize>0&&this.m_totalFileSize>this.m_maxTotalFileSize){this.m_failureText=new D2L.LP.Text.LangTerm("Framework.Validation.FileSetMaxTotalFileSizeExceeded",Culture.FormatFileSize(this.m_maxTotalFileSize));return new D2L.Util.DelayedReturn(false)}var me=this;var index=0;var ValidateFileName= function(){if(me.m_fileNames.length===index)return new D2L.Util.DelayedReturn(true);var fileName=me.m_fileNames[index];if(fileName.length===0)return ValidateFileName(++index);var isValid=me.m_filenameValidator.Validate(fileName);if(!isValid){me.m_failureText=me.m_filenameValidator.GetFailureText();return new D2L.Util.DelayedReturn(false)}if(fileName.length>D2L.Files.MaxFileNameCharacters&&!me.m_truncateFileNames){var dr=new D2L.Util.DelayedReturn;var Cb=function(dialogResponse){if(dialogResponse.GetType()== D2L.Dialog.ResponseType.Positive){me.m_truncateFileNames=true;dr.Trigger(ValidateFileName(++index))}else{me.m_failureText=new D2L.LP.Text.LangTerm("Framework.Validation.FileSetFileNameTooLong",D2L.Files.MaxFileNameCharacters);dr.Trigger(false)}};UI.Confirm(Cb,new D2L.LP.Text.LangTerm("Framework.Validation.FileSetFileNameTooLong1",D2L.Files.MaxFileNameCharacters),new D2L.LP.Text.LangTerm("Framework.Validation.FileSetFileNameTooLong2"));return dr}else return ValidateFileName(++index)};var result=ValidateFileName(index); result.Register(function(success){if(!success)obj.SetValidationFailureIndex(index)});return result}});D2L.Control.ValidatorFileSet=D2L.Validation.FileSetValidator; D2L.Validation.FolderNameValidator=D2L.Validation.StringValidator.extend({Construct:function(value){arguments.callee.$.Construct.call(this,value);this.SetMaxCharacters(D2L.Files.MaxDirectoryNameCharacters);this.SetRegex(new RegExp(D2L.Files.ValidDirectoryNameRegex));this.SetRegexFailureText(new D2L.LP.Text.LangTerm("Framework.Validation.FolderNameInvalid",D2L.Files.InvalidDirectoryNameCharacters));this.m_reservedFoldernames=["con","prn","aux","nul","com1","com2","com3","com4","com5","com6","com7", "com8","com9","lpt1","lpt2","lpt3","lpt4","lpt5","lpt6","lpt7","lpt8","lpt9","clock$"]},Validate:function(value){value=value.trim();var pass=arguments.callee.$.Validate.call(this,value);if(!pass)return false;var valueToCompare=value.toLowerCase();for(var i=0;i<this.m_reservedFoldernames.length;i++)if(this.m_reservedFoldernames[i]==valueToCompare){this.m_failureText=new D2L.LP.Text.LangTerm("Framework.Validation.FolderNameReserved");return false}return true}});D2L.Control.ValidatorFolderName=D2L.Validation.FolderNameValidator; D2L.Validation.Group=D2L.Class.extend({Construct:function(name){if(name===undefined)name="";arguments.callee.$.Construct.call(this);this.m_controls=[];this.m_isEnabled=true;this.m_name=name},DeserializeMin:function(deserializer){this.m_name=deserializer.GetMember().toLowerCase();this.m_controls=deserializer.GetObjectArrayMin(D2L.Validation.ValidationControlInfo)},GetName:function(){return this.m_name},IsEnabled:function(){return this.m_isEnabled},SetIsEnabled:function(isEnabled){this.m_isEnabled= isEnabled},Validate:function(skipFailureMessage){return UI.GetValidationManager().Validate(this.GetName(),skipFailureMessage)}}); D2L.Validation.Int64Validator=D2L.Validation.IValidator.extend({Construct:function(value){arguments.callee.$.Construct.call(this);if(value===undefined)value=0;this.m_value=value;this.m_is64Bit=true;this.m_min=null;this.m_max=null;this.m_minIsInclusive=true;this.m_maxIsInclusive=true;this.m_minIsSet=false;this.m_maxIsSet=false;this.m_lastFailureType=D2L.Validation.NumberFailureType.None},IntegrateControlMin:function(deserializer){this.m_min=deserializer.GetMember();this.m_max=deserializer.GetMember(); this.m_minIsSet=deserializer.GetBoolean();this.m_maxIsSet=deserializer.GetBoolean();this.m_minIsInclusive=deserializer.GetBoolean();this.m_maxIsInclusive=deserializer.GetBoolean()},GetFailureText:function(){if(this.m_lastFailureType==D2L.Validation.NumberFailureType.NaN)return new D2L.LP.Text.LangTerm("Framework.Validation.IntegerInvalid");else if(this.m_lastFailureType==D2L.Validation.NumberFailureType.NaNOutOfRange)if(!this.m_is64Bit)return new D2L.LP.Text.LangTerm("Framework.Validation.IntegerInvalid32", D2L.Util.Integer.Format(D2L.Util.Integer.MinValue32),D2L.Util.Integer.Format(D2L.Util.Integer.MaxValue32));else return new D2L.LP.Text.LangTerm("Framework.Validation.IntegerInvalid64",D2L.Util.Integer.Format(D2L.Util.Integer.MinValue64),D2L.Util.Integer.Format(D2L.Util.Integer.MaxValue64));var param1=undefined;var param2=undefined;var term;if(this.m_minIsSet&&this.m_maxIsSet){param1=this.m_min;if(param1!=undefined)param1=D2L.Util.Integer.Format(param1);param2=this.m_max;if(param2!=undefined)param2= D2L.Util.Integer.Format(param2);if(this.m_minIsInclusive&&this.m_maxIsInclusive)term=new D2L.LP.Text.LangTerm("Framework.Validation.NumberBetweenBothInclusive",param1,param2);else if(this.m_minIsInclusive)term=new D2L.LP.Text.LangTerm("Framework.Validation.NumberBetweenMinInclusive",param1,param2);else if(this.m_maxIsInclusive)term=new D2L.LP.Text.LangTerm("Framework.Validation.NumberBetweenMaxInclusive",param1,param2);else term=new D2L.LP.Text.LangTerm("Framework.Validation.NumberBetweenNoneInclusive", param1,param2)}else if(this.m_minIsSet){param1=this.m_min;if(param1!=undefined)param1=D2L.Util.Integer.Format(param1);if(this.m_minIsInclusive)term=new D2L.LP.Text.LangTerm("Framework.Validation.NumberHigherInclusive",param1);else term=new D2L.LP.Text.LangTerm("Framework.Validation.NumberHigher",param1)}else if(this.m_maxIsSet){param1=this.m_max;if(param1!=undefined)param1=D2L.Util.Integer.Format(param1);if(this.m_maxIsInclusive)term=new D2L.LP.Text.LangTerm("Framework.Validation.NumberLowerInclusive", param1);else term=new D2L.LP.Text.LangTerm("Framework.Validation.NumberLower",param1)}else;return term},GetMax:function(){return this.m_max},GetMin:function(){return this.m_min},GetMaxIsInclusive:function(){return this.m_maxIsInclusive},GetMinIsInclusive:function(){return this.m_minIsInclusive},GetValue:function(){return this.m_value},SetMax:function(max){this.m_max=max;this.m_maxIsSet=true},SetMin:function(min){this.m_min=min;this.m_minIsSet=true},SetMaxIsInclusive:function(maxIsInclusive){this.m_maxIsInclusive= maxIsInclusive},SetMinIsInclusive:function(minIsInclusive){this.m_minIsInclusive=minIsInclusive},SetValue:function(value){this.m_value=value},Validate:function(value){if(value===undefined)value=this.m_value;this.m_lastFailureType=D2L.Validation.NumberFailureType.None;if(value.isString){if(value.length===0)return true;try{value=D2L.Util.Integer.Parse(value)}catch(e){this.m_lastFailureType=D2L.Validation.NumberFailureType.NaN;return false}}if(isNaN(value)){this.m_lastFailureType=D2L.Validation.NumberFailureType.NaN; return false}if(this.m_minIsSet)if(this.GetMinIsInclusive()){if(value<this.GetMin()){this.m_lastFailureType=D2L.Validation.NumberFailureType.LTE;return false}}else if(value<=this.GetMin()){this.m_lastFailureType=D2L.Validation.NumberFailureType.LT;return false}if(!this.m_is64Bit&&value<D2L.Util.Integer.MinValue32||this.m_is64Bit&&value<D2L.Util.Integer.MinValue64){this.m_lastFailureType=D2L.Validation.NumberFailureType.NaNOutOfRange;return false}if(this.m_maxIsSet)if(this.GetMaxIsInclusive()){if(value> this.GetMax()){this.m_lastFailureType=D2L.Validation.NumberFailureType.GTE;return false}}else if(value>=this.GetMax()){this.m_lastFailureType=D2L.Validation.NumberFailureType.GT;return false}if(!this.m_is64Bit&&value>D2L.Util.Integer.MaxValue32||this.m_is64Bit&&value>D2L.Util.Integer.MaxValue64){this.m_lastFailureType=D2L.Validation.NumberFailureType.NaNOutOfRange;return false}return true},ValidateObject:function(obj){var dr=new D2L.Util.DelayedReturn;var me=this;obj.GetValue().Register(function(value){dr.Trigger(me.Validate(D2L.Util.Integer.Parse(value)))}); return dr},ValidateObjectNoDelay:function(obj){return this.Validate(obj.GetValueNoDelay())}});D2L.Control.ValidatorInt64=D2L.Validation.Int64Validator;D2L.Validation.Int32Validator=D2L.Validation.Int64Validator.extend({Construct:function(value){arguments.callee.$.Construct.call(this,value);this.m_is64Bit=false}});D2L.Control.ValidatorInt32=D2L.Validation.Int32Validator; D2L.Validation.Manager=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_groups=[];this.m_groupLessControls=[];this.m_isValidating=false},DeserializeMin:function(deserializer){this.m_groups=deserializer.GetObjectArrayMin(D2L.Validation.Group)},GetControlInfo:function(cId,addToAction){var vci=null;for(var i=0;i<this.m_groups.length;i++)for(var j=0;j<this.m_groups[i].m_controls.length;j++)if(this.m_groups[i].m_controls[j].ControlId.ID()==cId.ID()&&this.m_groups[i].m_controls[j].ControlId.SID()== cId.SID()){vci=this.m_groups[i].m_controls[j];break}if(vci===null){vci=new D2L.Validation.ValidationControlInfo;vci.ControlId=cId;this.m_groupLessControls.push(vci);if(addToAction)this.SetControlValidationGroup(cId,"action")}return vci},SetControlValidator:function(cId,vcId){var vci=this.GetControlInfo(cId,true);vci.ValidatorControlId=vcId},SetControlSubject:function(cId,subject){if(subject===undefined||subject===null)subject="";this.GetControlInfo(cId).Subject=subject},SetControlValidationGroup:function(cId, groupName){groupName=groupName.toLowerCase();var vci=null;for(var i=0;i<this.m_groups.length;i++)for(var j=0;j<this.m_groups[i].m_controls.length;j++)if(this.m_groups[i].m_controls[j].ControlId.ID()==cId.ID()&&this.m_groups[i].m_controls[j].ControlId.SID()==cId.SID()){vci=this.m_groups[i].m_controls[j];this.m_groups[i].m_controls.splice(j,1);break}for(var i=0;i<this.m_groupLessControls.length;i++)if(this.m_groupLessControls[i].ControlId.ID()==cId.ID()&&this.m_groupLessControls[i].ControlId.SID()== cId.SID()){vci=this.m_groupLessControls[i];this.m_groupLessControls.splice(i,1);break}if(vci===null){vci=new D2L.Validation.ValidationControlInfo;vci.ControlId=cId}var group=this.GetGroup(groupName,true);group.m_controls.push(vci)},GetGroup:function(groupName,addIfNotThere){if(addIfNotThere===undefined)addIfNotThere=false;groupName=groupName.toLowerCase();for(var i=0;i<this.m_groups.length;i++)if(this.m_groups[i].GetName()==groupName)return this.m_groups[i];if(addIfNotThere){var group=new D2L.Validation.Group(groupName); this.m_groups.push(group);return group}return null},Validate:function(groupNames,skipFailureMessage){if(!D2L.Util.JavaScript.IsArray(groupNames))groupNames=[groupNames];var controlHash={};var controls=[];for(var i=0;i<groupNames.length;i++){var group=this.GetGroup(groupNames[i]);if(group!==null&&group.IsEnabled())for(var j=0;j<group.m_controls.length;j++){var key=group.m_controls[j].ControlId.ID()+"_"+group.m_controls[j].ControlId.SID();if(controlHash[key]===undefined){controlHash[key]=true;controls.push(group.m_controls[j])}}}return this.ValidateControls(controls, skipFailureMessage)},ValidateControls:function(controls,skipFailureMessage){if(controls.length===0)return new D2L.Util.DelayedReturn(true);if(this.m_isValidating)return new D2L.Util.DelayedReturn(false);this.m_isValidating=true;if(skipFailureMessage===undefined)skipFailureMessage=false;var ret=new D2L.Util.DelayedReturn;var success=true;var me=this;var Finish=function(pass){me.m_isValidating=false;ret.Trigger(pass)};var HandleReturn=function(vci,validator,control,pass){validator.m_passed=pass;if(!pass){success= false;if(!skipFailureMessage){WindowEventManager.BubbleExpandEvent(control.GetDomNode(),null);var failureText=validator.GetFailureText();if(failureText!==null){failureText.SetSubject(vci.Subject);UI.GetMessageArea().AddError(failureText,control)}}}};var Validate=function(index){if(index==controls.length)if(!success&&!skipFailureMessage)setTimeout(function(){UI.GetMessageArea().ShowErrors(true).Register(function(){Finish(false)})});else Finish(success);else{var vci=controls[index];var validator=UI.GetControl(vci.ValidatorControlId.ID(), vci.ValidatorControlId.SID());var control=UI.GetControl(vci.ControlId.ID(),vci.ControlId.SID());if((control.Validate!==undefined||control.IsInDom())&&(control.IsEnabled===undefined||control.IsEnabled())){var dRet=null;if(validator.CanValidateNoDelay(control))dRet=validator.ValidateObjectNoDelay(control);else dRet=validator.ValidateObject(control);if(D2L.Util.IsDelayedReturn(dRet))dRet.Register(function(pass){HandleReturn(vci,validator,control,pass);Validate(++index)});else{HandleReturn(vci,validator, control,dRet);Validate(++index)}}else Validate(++index)}};UI.GetMessageArea().Reset().Register(function(){Validate(0)});return ret},ValidateGroup:function(groupName,skipFailureMessage){UI.GetMessageArea().AddWarningMessage(new D2L.LP.Text.SmlText("ValidationManager.ValidateGroup('[0]') "+"is deprecated, use Validate() instead.",groupName),false);if(skipFailureMessage===undefined)skipFailureMessage=false;var controls=[];var group=this.GetGroup(groupName);if(group===null||!group.IsEnabled())return true; var controls=group.m_controls;var success=true;if(controls.length===0)return true;if(this.m_isValidating)return false;this.m_isValidating=true;var mrDr=UI.GetMessageArea().Reset();var me=this;var HandleReturn=function(vci,validator,control,pass){validator.m_passed=pass;if(!pass){success=false;if(!skipFailureMessage){WindowEventManager.BubbleExpandEvent(control.GetDomNode(),null);var failureText=validator.GetFailureText();if(failureText!==null)failureText.SetSubject(vci.Subject);mrDr.Register(function(){UI.GetMessageArea().AddError(failureText, control)})}}};var Validate=function(index){if(index==controls.length)if(!success){if(!skipFailureMessage)mrDr.Register(function(){UI.GetMessageArea().ShowErrors(true).Register(function(){me.m_isValidating=false})});return false}else{me.m_isValidating=false;return true}else{var vci=controls[index];var validator=UI.GetControl(vci.ValidatorControlId.ID(),vci.ValidatorControlId.SID());var control=UI.GetControl(vci.ControlId.ID(),vci.ControlId.SID());if(control.IsEnabled===undefined||control.IsEnabled()){var pass= validator.ValidateObjectNoDelay(control);HandleReturn(vci,validator,control,pass);return Validate(++index)&&pass}else return Validate(++index)}};return Validate(0)}}); D2L.Validation.RegexValidator=D2L.Validation.StringValidator.extend({Construct:function(value){arguments.callee.$.Construct.call(this,value)},IntegrateControlMin:function(deserializer){if(deserializer.HasMember()){this.SetRegex(new RegExp(deserializer.GetMember()));this.SetRegexFailureText(deserializer.GetObject(D2L.LP.Text.IText))}arguments.callee.$.IntegrateControlMin.call(this,deserializer)}});D2L.Control.ValidatorRegex=D2L.Validation.RegexValidator; D2L.Validation.RequiredValidator=D2L.Validation.IValidator.extend({Construct:function(value){arguments.callee.$.Construct.call(this);this.m_value=value;this.m_failureTerm=null},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer);if(deserializer.HasMember())this.m_failureTerm=new D2L.LP.Text.LangTerm(deserializer.GetMember())},GetFailureText:function(){if(this.m_failureTerm===null)return new D2L.LP.Text.LangTerm("Framework.Validation.Required"); else return this.m_failureTerm},GetValue:function(){return this.m_value},SetValue:function(value){this.m_value=value},Validate:function(value){if(value===undefined)value=this.GetValue();if(value===undefined||value===null)return false;if(value.isString)return value.trim().length>0;return true},ValidateObject:function(obj){var dr=new D2L.Util.DelayedReturn;obj.HasValue().Register(function(value){dr.Trigger(value)});return dr},ValidateObjectNoDelay:function(obj){return obj.HasValueNoDelay()}}); D2L.Control.ValidatorRequired=D2L.Validation.RequiredValidator;D2L.Validation.ValidationControlInfo=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.ControlId=null;this.ValidatorControlId=null;this.Subject="";this.IsEnablerTargetItem=false},DeserializeMin:function(deserializer){this.ControlId=deserializer.GetObjectMin(D2L.Control.Id);this.ValidatorControlId=deserializer.GetObjectMin(D2L.Control.Id);this.Subject=deserializer.GetMember();this.IsEnablerTargetItem=deserializer.GetBoolean()}}); /* Copyright (c) 2009, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt version: 2.7.0 */ if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=(""+A[C]).split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules,B,H,G,F,C;if(!I[A]){I[A]={versions:[],builds:[]};}B=I[A];H=D.version;G=D.build;F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0];}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}A=B.match(/Caja\/([^\s]*)/);if(A&&A[1]){C.caja=parseFloat(A[1]);}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var B=YAHOO.lang,F="[object Array]",C="[object Function]",A=Object.prototype,E=["toString","valueOf"],D={isArray:function(G){return A.toString.apply(G)===F;},isBoolean:function(G){return typeof G==="boolean";},isFunction:function(G){return A.toString.apply(G)===C;},isNull:function(G){return G===null;},isNumber:function(G){return typeof G==="number"&&isFinite(G);},isObject:function(G){return(G&&(typeof G==="object"||B.isFunction(G)))||false;},isString:function(G){return typeof G==="string";},isUndefined:function(G){return typeof G==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(I,H){var G,K,J;for(G=0;G<E.length;G=G+1){K=E[G];J=H[K];if(B.isFunction(J)&&J!=A[K]){I[K]=J;}}}:function(){},extend:function(J,K,I){if(!K||!J){throw new Error("extend failed, please check that "+"all dependencies are included.");}var H=function(){},G;H.prototype=K.prototype;J.prototype=new H();J.prototype.constructor=J;J.superclass=K.prototype;if(K.prototype.constructor==A.constructor){K.prototype.constructor=K;}if(I){for(G in I){if(B.hasOwnProperty(I,G)){J.prototype[G]=I[G];}}B._IEEnumFix(J.prototype,I);}},augmentObject:function(K,J){if(!J||!K){throw new Error("Absorb failed, verify dependencies.");}var G=arguments,I,L,H=G[2];if(H&&H!==true){for(I=2;I<G.length;I=I+1){K[G[I]]=J[G[I]];}}else{for(L in J){if(H||!(L in K)){K[L]=J[L];}}B._IEEnumFix(K,J);}},augmentProto:function(J,I){if(!I||!J){throw new Error("Augment failed, verify dependencies.");}var G=[J.prototype,I.prototype],H;for(H=2;H<arguments.length;H=H+1){G.push(arguments[H]);}B.augmentObject.apply(this,G);},dump:function(G,L){var I,K,N=[],O="{...}",H="f(){...}",M=", ",J=" => ";if(!B.isObject(G)){return G+"";}else{if(G instanceof Date||("nodeType" in G&&"tagName" in G)){return G;}else{if(B.isFunction(G)){return H;}}}L=(B.isNumber(L))?L:3;if(B.isArray(G)){N.push("[");for(I=0,K=G.length;I<K;I=I+1){if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}if(N.length>1){N.pop();}N.push("]");}else{N.push("{");for(I in G){if(B.hasOwnProperty(G,I)){N.push(I+J);if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}}if(N.length>1){N.pop();}N.push("}");}return N.join("");},substitute:function(V,H,O){var L,K,J,R,S,U,Q=[],I,M="dump",P=" ",G="{",T="}",N;for(;;){L=V.lastIndexOf(G);if(L<0){break;}K=V.indexOf(T,L);if(L+1>=K){break;}I=V.substring(L+1,K);R=I;U=null;J=R.indexOf(P);if(J>-1){U=R.substring(J+1);R=R.substring(0,J);}S=H[R];if(O){S=O(R,S,U);}if(B.isObject(S)){if(B.isArray(S)){S=B.dump(S,parseInt(U,10));}else{U=U||"";N=U.indexOf(M);if(N>-1){U=U.substring(4);}if(S.toString===A.toString||N>-1){S=B.dump(S,parseInt(U,10));}else{S=S.toString();}}}else{if(!B.isString(S)&&!B.isNumber(S)){S="~-"+Q.length+"-~";Q[Q.length]=I;}}V=V.substring(0,L)+S+V.substring(K+1);}for(L=Q.length-1;L>=0;L=L-1){V=V.replace(new RegExp("~-"+L+"-~"),"{"+Q[L]+"}","g");}return V;},trim:function(G){try{return G.replace(/^\s+|\s+$/g,"");}catch(H){return G;}},merge:function(){var J={},H=arguments,G=H.length,I;for(I=0;I<G;I=I+1){B.augmentObject(J,H[I],true);}return J;},later:function(N,H,O,J,K){N=N||0;H=H||{};var I=O,M=J,L,G;if(B.isString(O)){I=H[O];}if(!I){throw new TypeError("method undefined");}if(!B.isArray(M)){M=[J];}L=function(){I.apply(H,M);};G=(K)?setInterval(L,N):setTimeout(L,N);return{interval:K,cancel:function(){if(this.interval){clearInterval(G);}else{clearTimeout(G);}}};},isValue:function(G){return(B.isObject(G)||B.isString(G)||B.isNumber(G)||B.isBoolean(G));}};B.hasOwnProperty=(A.hasOwnProperty)?function(G,H){return G&&G.hasOwnProperty(H);}:function(G,H){return !B.isUndefined(G[H])&&G.constructor.prototype[H]!==G[H];};D.augmentObject(B,D,true);YAHOO.util.Lang=B;B.augment=B.augmentProto;YAHOO.augment=B.augmentProto;YAHOO.extend=B.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.7.0",build:"1799"});/* Copyright (c) 2009, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt version: 2.7.0 */ (function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var E=YAHOO.util,L=YAHOO.lang,m=YAHOO.env.ua,A=YAHOO.lang.trim,d={},h={},N=/^t(?:able|d|h)$/i,X=/color$/i,K=window.document,W=K.documentElement,e="ownerDocument",n="defaultView",v="documentElement",t="compatMode",b="offsetLeft",P="offsetTop",u="offsetParent",Z="parentNode",l="nodeType",C="tagName",O="scrollLeft",i="scrollTop",Q="getBoundingClientRect",w="getComputedStyle",a="currentStyle",M="CSS1Compat",c="BackCompat",g="class",F="className",J="",B=" ",s="(?:^|\\s)",k="(?= |$)",U="g",p="position",f="fixed",V="relative",j="left",o="top",r="medium",q="borderLeftWidth",R="borderTopWidth",D=m.opera,I=m.webkit,H=m.gecko,T=m.ie;E.Dom={CUSTOM_ATTRIBUTES:(!W.hasAttribute)?{"for":"htmlFor","class":F}:{"htmlFor":"for","className":g},get:function(y){var AA,Y,z,x,G;if(y){if(y[l]||y.item){return y;}if(typeof y==="string"){AA=y;y=K.getElementById(y);if(y&&y.id===AA){return y;}else{if(y&&K.all){y=null;Y=K.all[AA];for(x=0,G=Y.length;x<G;++x){if(Y[x].id===AA){return Y[x];}}}}return y;}if(y.DOM_EVENTS){y=y.get("element");}if("length" in y){z=[];for(x=0,G=y.length;x<G;++x){z[z.length]=E.Dom.get(y[x]);}return z;}return y;}return null;},getComputedStyle:function(G,Y){if(window[w]){return G[e][n][w](G,null)[Y];}else{if(G[a]){return E.Dom.IE_ComputedStyle.get(G,Y);}}},getStyle:function(G,Y){return E.Dom.batch(G,E.Dom._getStyle,Y);},_getStyle:function(){if(window[w]){return function(G,y){y=(y==="float")?y="cssFloat":E.Dom._toCamel(y);var x=G.style[y],Y;if(!x){Y=G[e][n][w](G,null);if(Y){x=Y[y];}}return x;};}else{if(W[a]){return function(G,y){var x;switch(y){case"opacity":x=100;try{x=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(z){try{x=G.filters("alpha").opacity;}catch(Y){}}return x/100;case"float":y="styleFloat";default:y=E.Dom._toCamel(y);x=G[a]?G[a][y]:null;return(G.style[y]||x);}};}}}(),setStyle:function(G,Y,x){E.Dom.batch(G,E.Dom._setStyle,{prop:Y,val:x});},_setStyle:function(){if(T){return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){switch(x){case"opacity":if(L.isString(Y.style.filter)){Y.style.filter="alpha(opacity="+y*100+")";if(!Y[a]||!Y[a].hasLayout){Y.style.zoom=1;}}break;case"float":x="styleFloat";default:Y.style[x]=y;}}else{}};}else{return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){if(x=="float"){x="cssFloat";}Y.style[x]=y;}else{}};}}(),getXY:function(G){return E.Dom.batch(G,E.Dom._getXY);},_canPosition:function(G){return(E.Dom._getStyle(G,"display")!=="none"&&E.Dom._inDoc(G));},_getXY:function(){if(K[v][Q]){return function(y){var z,Y,AA,AF,AE,AD,AC,G,x,AB=Math.floor,AG=false;if(E.Dom._canPosition(y)){AA=y[Q]();AF=y[e];z=E.Dom.getDocumentScrollLeft(AF);Y=E.Dom.getDocumentScrollTop(AF);AG=[AB(AA[j]),AB(AA[o])];if(T&&m.ie<8){AE=2;AD=2;AC=AF[t];G=S(AF[v],q);x=S(AF[v],R);if(m.ie===6){if(AC!==c){AE=0;AD=0;}}if((AC==c)){if(G!==r){AE=parseInt(G,10);}if(x!==r){AD=parseInt(x,10);}}AG[0]-=AE;AG[1]-=AD;}if((Y||z)){AG[0]+=z;AG[1]+=Y;}AG[0]=AB(AG[0]);AG[1]=AB(AG[1]);}else{}return AG;};}else{return function(y){var x,Y,AA,AB,AC,z=false,G=y;if(E.Dom._canPosition(y)){z=[y[b],y[P]];x=E.Dom.getDocumentScrollLeft(y[e]);Y=E.Dom.getDocumentScrollTop(y[e]);AC=((H||m.webkit>519)?true:false);while((G=G[u])){z[0]+=G[b];z[1]+=G[P];if(AC){z=E.Dom._calcBorders(G,z);}}if(E.Dom._getStyle(y,p)!==f){G=y;while((G=G[Z])&&G[C]){AA=G[i];AB=G[O];if(H&&(E.Dom._getStyle(G,"overflow")!=="visible")){z=E.Dom._calcBorders(G,z);}if(AA||AB){z[0]-=AB;z[1]-=AA;}}z[0]+=x;z[1]+=Y;}else{if(D){z[0]-=x;z[1]-=Y;}else{if(I||H){z[0]+=x;z[1]+=Y;}}}z[0]=Math.floor(z[0]);z[1]=Math.floor(z[1]);}else{}return z;};}}(),getX:function(G){var Y=function(x){return E.Dom.getXY(x)[0];};return E.Dom.batch(G,Y,E.Dom,true);},getY:function(G){var Y=function(x){return E.Dom.getXY(x)[1];};return E.Dom.batch(G,Y,E.Dom,true);},setXY:function(G,x,Y){E.Dom.batch(G,E.Dom._setXY,{pos:x,noRetry:Y});},_setXY:function(G,z){var AA=E.Dom._getStyle(G,p),y=E.Dom.setStyle,AD=z.pos,Y=z.noRetry,AB=[parseInt(E.Dom.getComputedStyle(G,j),10),parseInt(E.Dom.getComputedStyle(G,o),10)],AC,x;if(AA=="static"){AA=V;y(G,p,AA);}AC=E.Dom._getXY(G);if(!AD||AC===false){return false;}if(isNaN(AB[0])){AB[0]=(AA==V)?0:G[b];}if(isNaN(AB[1])){AB[1]=(AA==V)?0:G[P];}if(AD[0]!==null){y(G,j,AD[0]-AC[0]+AB[0]+"px");}if(AD[1]!==null){y(G,o,AD[1]-AC[1]+AB[1]+"px");}if(!Y){x=E.Dom._getXY(G);if((AD[0]!==null&&x[0]!=AD[0])||(AD[1]!==null&&x[1]!=AD[1])){E.Dom._setXY(G,{pos:AD,noRetry:true});}}},setX:function(Y,G){E.Dom.setXY(Y,[G,null]);},setY:function(G,Y){E.Dom.setXY(G,[null,Y]);},getRegion:function(G){var Y=function(x){var y=false;if(E.Dom._canPosition(x)){y=E.Region.getRegion(x);}else{}return y;};return E.Dom.batch(G,Y,E.Dom,true);},getClientWidth:function(){return E.Dom.getViewportWidth();},getClientHeight:function(){return E.Dom.getViewportHeight();},getElementsByClassName:function(AB,AF,AC,AE,x,AD){AB=L.trim(AB);AF=AF||"*";AC=(AC)?E.Dom.get(AC):null||K;if(!AC){return[];}var Y=[],G=AC.getElementsByTagName(AF),z=E.Dom.hasClass;for(var y=0,AA=G.length;y<AA;++y){if(z(G[y],AB)){Y[Y.length]=G[y];}}if(AE){E.Dom.batch(Y,AE,x,AD);}return Y;},hasClass:function(Y,G){return E.Dom.batch(Y,E.Dom._hasClass,G);},_hasClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(Y.exec){G=Y.test(y);}else{G=Y&&(B+y+B).indexOf(B+Y+B)>-1;}}else{}return G;},addClass:function(Y,G){return E.Dom.batch(Y,E.Dom._addClass,G);},_addClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(!E.Dom._hasClass(x,Y)){E.Dom.setAttribute(x,F,A(y+B+Y));G=true;}}else{}return G;},removeClass:function(Y,G){return E.Dom.batch(Y,E.Dom._removeClass,G);},_removeClass:function(y,x){var Y=false,AA,z,G;if(y&&x){AA=E.Dom.getAttribute(y,F)||J;E.Dom.setAttribute(y,F,AA.replace(E.Dom._getClassRegex(x),J));z=E.Dom.getAttribute(y,F);if(AA!==z){E.Dom.setAttribute(y,F,A(z));Y=true;if(E.Dom.getAttribute(y,F)===""){G=(y.hasAttribute&&y.hasAttribute(g))?g:F;y.removeAttribute(G);}}}else{}return Y;},replaceClass:function(x,Y,G){return E.Dom.batch(x,E.Dom._replaceClass,{from:Y,to:G}); },_replaceClass:function(y,x){var Y,AB,AA,G=false,z;if(y&&x){AB=x.from;AA=x.to;if(!AA){G=false;}else{if(!AB){G=E.Dom._addClass(y,x.to);}else{if(AB!==AA){z=E.Dom.getAttribute(y,F)||J;Y=(B+z.replace(E.Dom._getClassRegex(AB),B+AA)).split(E.Dom._getClassRegex(AA));Y.splice(1,0,B+AA);E.Dom.setAttribute(y,F,A(Y.join(J)));G=true;}}}}else{}return G;},generateId:function(G,x){x=x||"yui-gen";var Y=function(y){if(y&&y.id){return y.id;}var z=x+YAHOO.env._id_counter++;if(y){if(y[e].getElementById(z)){return E.Dom.generateId(y,z+x);}y.id=z;}return z;};return E.Dom.batch(G,Y,E.Dom,true)||Y.apply(E.Dom,arguments);},isAncestor:function(Y,x){Y=E.Dom.get(Y);x=E.Dom.get(x);var G=false;if((Y&&x)&&(Y[l]&&x[l])){if(Y.contains&&Y!==x){G=Y.contains(x);}else{if(Y.compareDocumentPosition){G=!!(Y.compareDocumentPosition(x)&16);}}}else{}return G;},inDocument:function(G,Y){return E.Dom._inDoc(E.Dom.get(G),Y);},_inDoc:function(Y,x){var G=false;if(Y&&Y[C]){x=x||Y[e];G=E.Dom.isAncestor(x[v],Y);}else{}return G;},getElementsBy:function(Y,AF,AB,AD,y,AC,AE){AF=AF||"*";AB=(AB)?E.Dom.get(AB):null||K;if(!AB){return[];}var x=[],G=AB.getElementsByTagName(AF);for(var z=0,AA=G.length;z<AA;++z){if(Y(G[z])){if(AE){x=G[z];break;}else{x[x.length]=G[z];}}}if(AD){E.Dom.batch(x,AD,y,AC);}return x;},getElementBy:function(x,G,Y){return E.Dom.getElementsBy(x,G,Y,null,null,null,true);},batch:function(x,AB,AA,z){var y=[],Y=(z)?AA:window;x=(x&&(x[C]||x.item))?x:E.Dom.get(x);if(x&&AB){if(x[C]||x.length===undefined){return AB.call(Y,x,AA);}for(var G=0;G<x.length;++G){y[y.length]=AB.call(Y,x[G],AA);}}else{return false;}return y;},getDocumentHeight:function(){var Y=(K[t]!=M||I)?K.body.scrollHeight:W.scrollHeight,G=Math.max(Y,E.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var Y=(K[t]!=M||I)?K.body.scrollWidth:W.scrollWidth,G=Math.max(Y,E.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,Y=K[t];if((Y||T)&&!D){G=(Y==M)?W.clientHeight:K.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,Y=K[t];if(Y||T){G=(Y==M)?W.clientWidth:K.body.clientWidth;}return G;},getAncestorBy:function(G,Y){while((G=G[Z])){if(E.Dom._testElement(G,Y)){return G;}}return null;},getAncestorByClassName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null;}var x=function(y){return E.Dom.hasClass(y,G);};return E.Dom.getAncestorBy(Y,x);},getAncestorByTagName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null;}var x=function(y){return y[C]&&y[C].toUpperCase()==G.toUpperCase();};return E.Dom.getAncestorBy(Y,x);},getPreviousSiblingBy:function(G,Y){while(G){G=G.previousSibling;if(E.Dom._testElement(G,Y)){return G;}}return null;},getPreviousSibling:function(G){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,Y){while(G){G=G.nextSibling;if(E.Dom._testElement(G,Y)){return G;}}return null;},getNextSibling:function(G){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,x){var Y=(E.Dom._testElement(G.firstChild,x))?G.firstChild:null;return Y||E.Dom.getNextSiblingBy(G.firstChild,x);},getFirstChild:function(G,Y){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getFirstChildBy(G);},getLastChildBy:function(G,x){if(!G){return null;}var Y=(E.Dom._testElement(G.lastChild,x))?G.lastChild:null;return Y||E.Dom.getPreviousSiblingBy(G.lastChild,x);},getLastChild:function(G){G=E.Dom.get(G);return E.Dom.getLastChildBy(G);},getChildrenBy:function(Y,y){var x=E.Dom.getFirstChildBy(Y,y),G=x?[x]:[];E.Dom.getNextSiblingBy(x,function(z){if(!y||y(z)){G[G.length]=z;}return false;});return G;},getChildren:function(G){G=E.Dom.get(G);if(!G){}return E.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||K;return Math.max(G[v].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||K;return Math.max(G[v].scrollTop,G.body.scrollTop);},insertBefore:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null;}return G[Z].insertBefore(Y,G);},insertAfter:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null;}if(G.nextSibling){return G[Z].insertBefore(Y,G.nextSibling);}else{return G[Z].appendChild(Y);}},getClientRegion:function(){var x=E.Dom.getDocumentScrollTop(),Y=E.Dom.getDocumentScrollLeft(),y=E.Dom.getViewportWidth()+Y,G=E.Dom.getViewportHeight()+x;return new E.Region(x,y,G,Y);},setAttribute:function(Y,G,x){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;Y.setAttribute(G,x);},getAttribute:function(Y,G){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;return Y.getAttribute(G);},_toCamel:function(Y){var x=d;function G(y,z){return z.toUpperCase();}return x[Y]||(x[Y]=Y.indexOf("-")===-1?Y:Y.replace(/-([a-z])/gi,G));},_getClassRegex:function(Y){var G;if(Y!==undefined){if(Y.exec){G=Y;}else{G=h[Y];if(!G){Y=Y.replace(E.Dom._patterns.CLASS_RE_TOKENS,"\\$1");G=h[Y]=new RegExp(s+Y+k,U);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}])/g},_testElement:function(G,Y){return G&&G[l]==1&&(!Y||Y(G));},_calcBorders:function(x,y){var Y=parseInt(E.Dom[w](x,R),10)||0,G=parseInt(E.Dom[w](x,q),10)||0;if(H){if(N.test(x[C])){Y=0;G=0;}}y[0]+=G;y[1]+=Y;return y;}};var S=E.Dom[w];if(m.opera){E.Dom[w]=function(Y,G){var x=S(Y,G);if(X.test(G)){x=E.Dom.Color.toRGB(x);}return x;};}if(m.webkit){E.Dom[w]=function(Y,G){var x=S(Y,G);if(x==="rgba(0, 0, 0, 0)"){x="transparent";}return x;};}})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this.y=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this.x=B;this[0]=B;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top),D=Math.min(this.right,E.right),A=Math.min(this.bottom,E.bottom),B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B); }else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top),D=Math.max(this.right,E.right),A=Math.max(this.bottom,E.bottom),B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D),C=F[1],E=F[0]+D.offsetWidth,A=F[1]+D.offsetHeight,B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}YAHOO.util.Point.superclass.constructor.call(this,B,A,B,A);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var B=YAHOO.util,A="clientTop",F="clientLeft",J="parentNode",K="right",W="hasLayout",I="px",U="opacity",L="auto",D="borderLeftWidth",G="borderTopWidth",P="borderRightWidth",V="borderBottomWidth",S="visible",Q="transparent",N="height",E="width",H="style",T="currentStyle",R=/^width|height$/,O=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,M={get:function(X,Z){var Y="",a=X[T][Z];if(Z===U){Y=B.Dom.getStyle(X,U);}else{if(!a||(a.indexOf&&a.indexOf(I)>-1)){Y=a;}else{if(B.Dom.IE_COMPUTED[Z]){Y=B.Dom.IE_COMPUTED[Z](X,Z);}else{if(O.test(a)){Y=B.Dom.IE.ComputedStyle.getPixel(X,Z);}else{Y=a;}}}}return Y;},getOffset:function(Z,e){var b=Z[T][e],X=e.charAt(0).toUpperCase()+e.substr(1),c="offset"+X,Y="pixel"+X,a="",d;if(b==L){d=Z[c];if(d===undefined){a=0;}a=d;if(R.test(e)){Z[H][e]=d;if(Z[c]>d){a=d-(Z[c]-d);}Z[H][e]=L;}}else{if(!Z[H][Y]&&!Z[H][e]){Z[H][e]=b;}a=Z[H][Y];}return a+I;},getBorderWidth:function(X,Z){var Y=null;if(!X[T][W]){X[H].zoom=1;}switch(Z){case G:Y=X[A];break;case V:Y=X.offsetHeight-X.clientHeight-X[A];break;case D:Y=X[F];break;case P:Y=X.offsetWidth-X.clientWidth-X[F];break;}return Y+I;},getPixel:function(Y,X){var a=null,b=Y[T][K],Z=Y[T][X];Y[H][K]=Z;a=Y[H].pixelRight;Y[H][K]=b;return a+I;},getMargin:function(Y,X){var Z;if(Y[T][X]==L){Z=0+I;}else{Z=B.Dom.IE.ComputedStyle.getPixel(Y,X);}return Z;},getVisibility:function(Y,X){var Z;while((Z=Y[T])&&Z[X]=="inherit"){Y=Y[J];}return(Z)?Z[X]:S;},getColor:function(Y,X){return B.Dom.Color.toRGB(Y[T][X])||Q;},getBorderColor:function(Y,X){var Z=Y[T],a=Z[X]||Z.color;return B.Dom.Color.toRGB(B.Dom.Color.toHex(a));}},C={};C.top=C.right=C.bottom=C.left=C[E]=C[N]=M.getOffset;C.color=M.getColor;C[G]=C[P]=C[V]=C[D]=M.getBorderWidth;C.marginTop=C.marginRight=C.marginBottom=C.marginLeft=M.getMargin;C.visibility=M.getVisibility;C.borderColor=C.borderTopColor=C.borderRightColor=C.borderBottomColor=C.borderLeftColor=M.getBorderColor;B.Dom.IE_COMPUTED=C;B.Dom.IE_ComputedStyle=M;})();(function(){var C="toString",A=parseInt,B=RegExp,D=YAHOO.util;D.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(E){if(!D.Dom.Color.re_RGB.test(E)){E=D.Dom.Color.toHex(E);}if(D.Dom.Color.re_hex.exec(E)){E="rgb("+[A(B.$1,16),A(B.$2,16),A(B.$3,16)].join(", ")+")";}return E;},toHex:function(H){H=D.Dom.Color.KEYWORDS[H]||H;if(D.Dom.Color.re_RGB.exec(H)){var G=(B.$1.length===1)?"0"+B.$1:Number(B.$1),F=(B.$2.length===1)?"0"+B.$2:Number(B.$2),E=(B.$3.length===1)?"0"+B.$3:Number(B.$3);H=[G[C](16),F[C](16),E[C](16)].join("");}if(H.length<6){H=H.replace(D.Dom.Color.re_hex3,"$1$1");}if(H!=="transparent"&&H.indexOf("#")<0){H="#"+H;}return H.toLowerCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.7.0",build:"1796"});/* Copyright (c) 2009, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt version: 2.7.0 */ if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=(""+A[C]).split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules,B,H,G,F,C;if(!I[A]){I[A]={versions:[],builds:[]};}B=I[A];H=D.version;G=D.build;F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0];}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}A=B.match(/Caja\/([^\s]*)/);if(A&&A[1]){C.caja=parseFloat(A[1]);}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var B=YAHOO.lang,F="[object Array]",C="[object Function]",A=Object.prototype,E=["toString","valueOf"],D={isArray:function(G){return A.toString.apply(G)===F;},isBoolean:function(G){return typeof G==="boolean";},isFunction:function(G){return A.toString.apply(G)===C;},isNull:function(G){return G===null;},isNumber:function(G){return typeof G==="number"&&isFinite(G);},isObject:function(G){return(G&&(typeof G==="object"||B.isFunction(G)))||false;},isString:function(G){return typeof G==="string";},isUndefined:function(G){return typeof G==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(I,H){var G,K,J;for(G=0;G<E.length;G=G+1){K=E[G];J=H[K];if(B.isFunction(J)&&J!=A[K]){I[K]=J;}}}:function(){},extend:function(J,K,I){if(!K||!J){throw new Error("extend failed, please check that "+"all dependencies are included.");}var H=function(){},G;H.prototype=K.prototype;J.prototype=new H();J.prototype.constructor=J;J.superclass=K.prototype;if(K.prototype.constructor==A.constructor){K.prototype.constructor=K;}if(I){for(G in I){if(B.hasOwnProperty(I,G)){J.prototype[G]=I[G];}}B._IEEnumFix(J.prototype,I);}},augmentObject:function(K,J){if(!J||!K){throw new Error("Absorb failed, verify dependencies.");}var G=arguments,I,L,H=G[2];if(H&&H!==true){for(I=2;I<G.length;I=I+1){K[G[I]]=J[G[I]];}}else{for(L in J){if(H||!(L in K)){K[L]=J[L];}}B._IEEnumFix(K,J);}},augmentProto:function(J,I){if(!I||!J){throw new Error("Augment failed, verify dependencies.");}var G=[J.prototype,I.prototype],H;for(H=2;H<arguments.length;H=H+1){G.push(arguments[H]);}B.augmentObject.apply(this,G);},dump:function(G,L){var I,K,N=[],O="{...}",H="f(){...}",M=", ",J=" => ";if(!B.isObject(G)){return G+"";}else{if(G instanceof Date||("nodeType" in G&&"tagName" in G)){return G;}else{if(B.isFunction(G)){return H;}}}L=(B.isNumber(L))?L:3;if(B.isArray(G)){N.push("[");for(I=0,K=G.length;I<K;I=I+1){if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}if(N.length>1){N.pop();}N.push("]");}else{N.push("{");for(I in G){if(B.hasOwnProperty(G,I)){N.push(I+J);if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}}if(N.length>1){N.pop();}N.push("}");}return N.join("");},substitute:function(V,H,O){var L,K,J,R,S,U,Q=[],I,M="dump",P=" ",G="{",T="}",N;for(;;){L=V.lastIndexOf(G);if(L<0){break;}K=V.indexOf(T,L);if(L+1>=K){break;}I=V.substring(L+1,K);R=I;U=null;J=R.indexOf(P);if(J>-1){U=R.substring(J+1);R=R.substring(0,J);}S=H[R];if(O){S=O(R,S,U);}if(B.isObject(S)){if(B.isArray(S)){S=B.dump(S,parseInt(U,10));}else{U=U||"";N=U.indexOf(M);if(N>-1){U=U.substring(4);}if(S.toString===A.toString||N>-1){S=B.dump(S,parseInt(U,10));}else{S=S.toString();}}}else{if(!B.isString(S)&&!B.isNumber(S)){S="~-"+Q.length+"-~";Q[Q.length]=I;}}V=V.substring(0,L)+S+V.substring(K+1);}for(L=Q.length-1;L>=0;L=L-1){V=V.replace(new RegExp("~-"+L+"-~"),"{"+Q[L]+"}","g");}return V;},trim:function(G){try{return G.replace(/^\s+|\s+$/g,"");}catch(H){return G;}},merge:function(){var J={},H=arguments,G=H.length,I;for(I=0;I<G;I=I+1){B.augmentObject(J,H[I],true);}return J;},later:function(N,H,O,J,K){N=N||0;H=H||{};var I=O,M=J,L,G;if(B.isString(O)){I=H[O];}if(!I){throw new TypeError("method undefined");}if(!B.isArray(M)){M=[J];}L=function(){I.apply(H,M);};G=(K)?setInterval(L,N):setTimeout(L,N);return{interval:K,cancel:function(){if(this.interval){clearInterval(G);}else{clearTimeout(G);}}};},isValue:function(G){return(B.isObject(G)||B.isString(G)||B.isNumber(G)||B.isBoolean(G));}};B.hasOwnProperty=(A.hasOwnProperty)?function(G,H){return G&&G.hasOwnProperty(H);}:function(G,H){return !B.isUndefined(G[H])&&G.constructor.prototype[H]!==G[H];};D.augmentObject(B,D,true);YAHOO.util.Lang=B;B.augment=B.augmentProto;YAHOO.augment=B.augmentProto;YAHOO.extend=B.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.7.0",build:"1799"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var E=YAHOO.util,L=YAHOO.lang,m=YAHOO.env.ua,A=YAHOO.lang.trim,d={},h={},N=/^t(?:able|d|h)$/i,X=/color$/i,K=window.document,W=K.documentElement,e="ownerDocument",n="defaultView",v="documentElement",t="compatMode",b="offsetLeft",P="offsetTop",u="offsetParent",Z="parentNode",l="nodeType",C="tagName",O="scrollLeft",i="scrollTop",Q="getBoundingClientRect",w="getComputedStyle",a="currentStyle",M="CSS1Compat",c="BackCompat",g="class",F="className",J="",B=" ",s="(?:^|\\s)",k="(?= |$)",U="g",p="position",f="fixed",V="relative",j="left",o="top",r="medium",q="borderLeftWidth",R="borderTopWidth",D=m.opera,I=m.webkit,H=m.gecko,T=m.ie;E.Dom={CUSTOM_ATTRIBUTES:(!W.hasAttribute)?{"for":"htmlFor","class":F}:{"htmlFor":"for","className":g},get:function(y){var AA,Y,z,x,G;if(y){if(y[l]||y.item){return y;}if(typeof y==="string"){AA=y;y=K.getElementById(y);if(y&&y.id===AA){return y;}else{if(y&&K.all){y=null;Y=K.all[AA];for(x=0,G=Y.length;x<G;++x){if(Y[x].id===AA){return Y[x];}}}}return y;}if(y.DOM_EVENTS){y=y.get("element");}if("length" in y){z=[];for(x=0,G=y.length;x<G;++x){z[z.length]=E.Dom.get(y[x]);}return z;}return y;}return null;},getComputedStyle:function(G,Y){if(window[w]){return G[e][n][w](G,null)[Y];}else{if(G[a]){return E.Dom.IE_ComputedStyle.get(G,Y);}}},getStyle:function(G,Y){return E.Dom.batch(G,E.Dom._getStyle,Y);},_getStyle:function(){if(window[w]){return function(G,y){y=(y==="float")?y="cssFloat":E.Dom._toCamel(y);var x=G.style[y],Y;if(!x){Y=G[e][n][w](G,null);if(Y){x=Y[y];}}return x;};}else{if(W[a]){return function(G,y){var x;switch(y){case"opacity":x=100;try{x=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(z){try{x=G.filters("alpha").opacity;}catch(Y){}}return x/100;case"float":y="styleFloat";default:y=E.Dom._toCamel(y);x=G[a]?G[a][y]:null;return(G.style[y]||x);}};}}}(),setStyle:function(G,Y,x){E.Dom.batch(G,E.Dom._setStyle,{prop:Y,val:x});},_setStyle:function(){if(T){return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){switch(x){case"opacity":if(L.isString(Y.style.filter)){Y.style.filter="alpha(opacity="+y*100+")";if(!Y[a]||!Y[a].hasLayout){Y.style.zoom=1;}}break;case"float":x="styleFloat";default:Y.style[x]=y;}}else{}};}else{return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){if(x=="float"){x="cssFloat";}Y.style[x]=y;}else{}};}}(),getXY:function(G){return E.Dom.batch(G,E.Dom._getXY);},_canPosition:function(G){return(E.Dom._getStyle(G,"display")!=="none"&&E.Dom._inDoc(G));},_getXY:function(){if(K[v][Q]){return function(y){var z,Y,AA,AF,AE,AD,AC,G,x,AB=Math.floor,AG=false;if(E.Dom._canPosition(y)){AA=y[Q]();AF=y[e];z=E.Dom.getDocumentScrollLeft(AF);Y=E.Dom.getDocumentScrollTop(AF);AG=[AB(AA[j]),AB(AA[o])];if(T&&m.ie<8){AE=2;AD=2;AC=AF[t];G=S(AF[v],q);x=S(AF[v],R);if(m.ie===6){if(AC!==c){AE=0;AD=0;}}if((AC==c)){if(G!==r){AE=parseInt(G,10);}if(x!==r){AD=parseInt(x,10);}}AG[0]-=AE;AG[1]-=AD;}if((Y||z)){AG[0]+=z;AG[1]+=Y;}AG[0]=AB(AG[0]);AG[1]=AB(AG[1]);}else{}return AG;};}else{return function(y){var x,Y,AA,AB,AC,z=false,G=y;if(E.Dom._canPosition(y)){z=[y[b],y[P]];x=E.Dom.getDocumentScrollLeft(y[e]);Y=E.Dom.getDocumentScrollTop(y[e]);AC=((H||m.webkit>519)?true:false);while((G=G[u])){z[0]+=G[b];z[1]+=G[P];if(AC){z=E.Dom._calcBorders(G,z);}}if(E.Dom._getStyle(y,p)!==f){G=y;while((G=G[Z])&&G[C]){AA=G[i];AB=G[O];if(H&&(E.Dom._getStyle(G,"overflow")!=="visible")){z=E.Dom._calcBorders(G,z);}if(AA||AB){z[0]-=AB;z[1]-=AA;}}z[0]+=x;z[1]+=Y;}else{if(D){z[0]-=x;z[1]-=Y;}else{if(I||H){z[0]+=x;z[1]+=Y;}}}z[0]=Math.floor(z[0]);z[1]=Math.floor(z[1]);}else{}return z;};}}(),getX:function(G){var Y=function(x){return E.Dom.getXY(x)[0];};return E.Dom.batch(G,Y,E.Dom,true);},getY:function(G){var Y=function(x){return E.Dom.getXY(x)[1];};return E.Dom.batch(G,Y,E.Dom,true);},setXY:function(G,x,Y){E.Dom.batch(G,E.Dom._setXY,{pos:x,noRetry:Y});},_setXY:function(G,z){var AA=E.Dom._getStyle(G,p),y=E.Dom.setStyle,AD=z.pos,Y=z.noRetry,AB=[parseInt(E.Dom.getComputedStyle(G,j),10),parseInt(E.Dom.getComputedStyle(G,o),10)],AC,x;if(AA=="static"){AA=V;y(G,p,AA);}AC=E.Dom._getXY(G);if(!AD||AC===false){return false;}if(isNaN(AB[0])){AB[0]=(AA==V)?0:G[b];}if(isNaN(AB[1])){AB[1]=(AA==V)?0:G[P];}if(AD[0]!==null){y(G,j,AD[0]-AC[0]+AB[0]+"px");}if(AD[1]!==null){y(G,o,AD[1]-AC[1]+AB[1]+"px");}if(!Y){x=E.Dom._getXY(G);if((AD[0]!==null&&x[0]!=AD[0])||(AD[1]!==null&&x[1]!=AD[1])){E.Dom._setXY(G,{pos:AD,noRetry:true});}}},setX:function(Y,G){E.Dom.setXY(Y,[G,null]);},setY:function(G,Y){E.Dom.setXY(G,[null,Y]);},getRegion:function(G){var Y=function(x){var y=false;if(E.Dom._canPosition(x)){y=E.Region.getRegion(x);}else{}return y;};return E.Dom.batch(G,Y,E.Dom,true);},getClientWidth:function(){return E.Dom.getViewportWidth();},getClientHeight:function(){return E.Dom.getViewportHeight();},getElementsByClassName:function(AB,AF,AC,AE,x,AD){AB=L.trim(AB);AF=AF||"*";AC=(AC)?E.Dom.get(AC):null||K;if(!AC){return[];}var Y=[],G=AC.getElementsByTagName(AF),z=E.Dom.hasClass;for(var y=0,AA=G.length;y<AA;++y){if(z(G[y],AB)){Y[Y.length]=G[y];}}if(AE){E.Dom.batch(Y,AE,x,AD);}return Y;},hasClass:function(Y,G){return E.Dom.batch(Y,E.Dom._hasClass,G);},_hasClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(Y.exec){G=Y.test(y);}else{G=Y&&(B+y+B).indexOf(B+Y+B)>-1;}}else{}return G;},addClass:function(Y,G){return E.Dom.batch(Y,E.Dom._addClass,G);},_addClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(!E.Dom._hasClass(x,Y)){E.Dom.setAttribute(x,F,A(y+B+Y));G=true;}}else{}return G;},removeClass:function(Y,G){return E.Dom.batch(Y,E.Dom._removeClass,G);},_removeClass:function(y,x){var Y=false,AA,z,G;if(y&&x){AA=E.Dom.getAttribute(y,F)||J;E.Dom.setAttribute(y,F,AA.replace(E.Dom._getClassRegex(x),J));z=E.Dom.getAttribute(y,F);if(AA!==z){E.Dom.setAttribute(y,F,A(z));Y=true;if(E.Dom.getAttribute(y,F)===""){G=(y.hasAttribute&&y.hasAttribute(g))?g:F;y.removeAttribute(G);}}}else{}return Y;},replaceClass:function(x,Y,G){return E.Dom.batch(x,E.Dom._replaceClass,{from:Y,to:G}); },_replaceClass:function(y,x){var Y,AB,AA,G=false,z;if(y&&x){AB=x.from;AA=x.to;if(!AA){G=false;}else{if(!AB){G=E.Dom._addClass(y,x.to);}else{if(AB!==AA){z=E.Dom.getAttribute(y,F)||J;Y=(B+z.replace(E.Dom._getClassRegex(AB),B+AA)).split(E.Dom._getClassRegex(AA));Y.splice(1,0,B+AA);E.Dom.setAttribute(y,F,A(Y.join(J)));G=true;}}}}else{}return G;},generateId:function(G,x){x=x||"yui-gen";var Y=function(y){if(y&&y.id){return y.id;}var z=x+YAHOO.env._id_counter++;if(y){if(y[e].getElementById(z)){return E.Dom.generateId(y,z+x);}y.id=z;}return z;};return E.Dom.batch(G,Y,E.Dom,true)||Y.apply(E.Dom,arguments);},isAncestor:function(Y,x){Y=E.Dom.get(Y);x=E.Dom.get(x);var G=false;if((Y&&x)&&(Y[l]&&x[l])){if(Y.contains&&Y!==x){G=Y.contains(x);}else{if(Y.compareDocumentPosition){G=!!(Y.compareDocumentPosition(x)&16);}}}else{}return G;},inDocument:function(G,Y){return E.Dom._inDoc(E.Dom.get(G),Y);},_inDoc:function(Y,x){var G=false;if(Y&&Y[C]){x=x||Y[e];G=E.Dom.isAncestor(x[v],Y);}else{}return G;},getElementsBy:function(Y,AF,AB,AD,y,AC,AE){AF=AF||"*";AB=(AB)?E.Dom.get(AB):null||K;if(!AB){return[];}var x=[],G=AB.getElementsByTagName(AF);for(var z=0,AA=G.length;z<AA;++z){if(Y(G[z])){if(AE){x=G[z];break;}else{x[x.length]=G[z];}}}if(AD){E.Dom.batch(x,AD,y,AC);}return x;},getElementBy:function(x,G,Y){return E.Dom.getElementsBy(x,G,Y,null,null,null,true);},batch:function(x,AB,AA,z){var y=[],Y=(z)?AA:window;x=(x&&(x[C]||x.item))?x:E.Dom.get(x);if(x&&AB){if(x[C]||x.length===undefined){return AB.call(Y,x,AA);}for(var G=0;G<x.length;++G){y[y.length]=AB.call(Y,x[G],AA);}}else{return false;}return y;},getDocumentHeight:function(){var Y=(K[t]!=M||I)?K.body.scrollHeight:W.scrollHeight,G=Math.max(Y,E.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var Y=(K[t]!=M||I)?K.body.scrollWidth:W.scrollWidth,G=Math.max(Y,E.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,Y=K[t];if((Y||T)&&!D){G=(Y==M)?W.clientHeight:K.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,Y=K[t];if(Y||T){G=(Y==M)?W.clientWidth:K.body.clientWidth;}return G;},getAncestorBy:function(G,Y){while((G=G[Z])){if(E.Dom._testElement(G,Y)){return G;}}return null;},getAncestorByClassName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null;}var x=function(y){return E.Dom.hasClass(y,G);};return E.Dom.getAncestorBy(Y,x);},getAncestorByTagName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null;}var x=function(y){return y[C]&&y[C].toUpperCase()==G.toUpperCase();};return E.Dom.getAncestorBy(Y,x);},getPreviousSiblingBy:function(G,Y){while(G){G=G.previousSibling;if(E.Dom._testElement(G,Y)){return G;}}return null;},getPreviousSibling:function(G){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,Y){while(G){G=G.nextSibling;if(E.Dom._testElement(G,Y)){return G;}}return null;},getNextSibling:function(G){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,x){var Y=(E.Dom._testElement(G.firstChild,x))?G.firstChild:null;return Y||E.Dom.getNextSiblingBy(G.firstChild,x);},getFirstChild:function(G,Y){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getFirstChildBy(G);},getLastChildBy:function(G,x){if(!G){return null;}var Y=(E.Dom._testElement(G.lastChild,x))?G.lastChild:null;return Y||E.Dom.getPreviousSiblingBy(G.lastChild,x);},getLastChild:function(G){G=E.Dom.get(G);return E.Dom.getLastChildBy(G);},getChildrenBy:function(Y,y){var x=E.Dom.getFirstChildBy(Y,y),G=x?[x]:[];E.Dom.getNextSiblingBy(x,function(z){if(!y||y(z)){G[G.length]=z;}return false;});return G;},getChildren:function(G){G=E.Dom.get(G);if(!G){}return E.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||K;return Math.max(G[v].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||K;return Math.max(G[v].scrollTop,G.body.scrollTop);},insertBefore:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null;}return G[Z].insertBefore(Y,G);},insertAfter:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null;}if(G.nextSibling){return G[Z].insertBefore(Y,G.nextSibling);}else{return G[Z].appendChild(Y);}},getClientRegion:function(){var x=E.Dom.getDocumentScrollTop(),Y=E.Dom.getDocumentScrollLeft(),y=E.Dom.getViewportWidth()+Y,G=E.Dom.getViewportHeight()+x;return new E.Region(x,y,G,Y);},setAttribute:function(Y,G,x){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;Y.setAttribute(G,x);},getAttribute:function(Y,G){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;return Y.getAttribute(G);},_toCamel:function(Y){var x=d;function G(y,z){return z.toUpperCase();}return x[Y]||(x[Y]=Y.indexOf("-")===-1?Y:Y.replace(/-([a-z])/gi,G));},_getClassRegex:function(Y){var G;if(Y!==undefined){if(Y.exec){G=Y;}else{G=h[Y];if(!G){Y=Y.replace(E.Dom._patterns.CLASS_RE_TOKENS,"\\$1");G=h[Y]=new RegExp(s+Y+k,U);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}])/g},_testElement:function(G,Y){return G&&G[l]==1&&(!Y||Y(G));},_calcBorders:function(x,y){var Y=parseInt(E.Dom[w](x,R),10)||0,G=parseInt(E.Dom[w](x,q),10)||0;if(H){if(N.test(x[C])){Y=0;G=0;}}y[0]+=G;y[1]+=Y;return y;}};var S=E.Dom[w];if(m.opera){E.Dom[w]=function(Y,G){var x=S(Y,G);if(X.test(G)){x=E.Dom.Color.toRGB(x);}return x;};}if(m.webkit){E.Dom[w]=function(Y,G){var x=S(Y,G);if(x==="rgba(0, 0, 0, 0)"){x="transparent";}return x;};}})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this.y=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this.x=B;this[0]=B;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top),D=Math.min(this.right,E.right),A=Math.min(this.bottom,E.bottom),B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B); }else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top),D=Math.max(this.right,E.right),A=Math.max(this.bottom,E.bottom),B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D),C=F[1],E=F[0]+D.offsetWidth,A=F[1]+D.offsetHeight,B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}YAHOO.util.Point.superclass.constructor.call(this,B,A,B,A);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var B=YAHOO.util,A="clientTop",F="clientLeft",J="parentNode",K="right",W="hasLayout",I="px",U="opacity",L="auto",D="borderLeftWidth",G="borderTopWidth",P="borderRightWidth",V="borderBottomWidth",S="visible",Q="transparent",N="height",E="width",H="style",T="currentStyle",R=/^width|height$/,O=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,M={get:function(X,Z){var Y="",a=X[T][Z];if(Z===U){Y=B.Dom.getStyle(X,U);}else{if(!a||(a.indexOf&&a.indexOf(I)>-1)){Y=a;}else{if(B.Dom.IE_COMPUTED[Z]){Y=B.Dom.IE_COMPUTED[Z](X,Z);}else{if(O.test(a)){Y=B.Dom.IE.ComputedStyle.getPixel(X,Z);}else{Y=a;}}}}return Y;},getOffset:function(Z,e){var b=Z[T][e],X=e.charAt(0).toUpperCase()+e.substr(1),c="offset"+X,Y="pixel"+X,a="",d;if(b==L){d=Z[c];if(d===undefined){a=0;}a=d;if(R.test(e)){Z[H][e]=d;if(Z[c]>d){a=d-(Z[c]-d);}Z[H][e]=L;}}else{if(!Z[H][Y]&&!Z[H][e]){Z[H][e]=b;}a=Z[H][Y];}return a+I;},getBorderWidth:function(X,Z){var Y=null;if(!X[T][W]){X[H].zoom=1;}switch(Z){case G:Y=X[A];break;case V:Y=X.offsetHeight-X.clientHeight-X[A];break;case D:Y=X[F];break;case P:Y=X.offsetWidth-X.clientWidth-X[F];break;}return Y+I;},getPixel:function(Y,X){var a=null,b=Y[T][K],Z=Y[T][X];Y[H][K]=Z;a=Y[H].pixelRight;Y[H][K]=b;return a+I;},getMargin:function(Y,X){var Z;if(Y[T][X]==L){Z=0+I;}else{Z=B.Dom.IE.ComputedStyle.getPixel(Y,X);}return Z;},getVisibility:function(Y,X){var Z;while((Z=Y[T])&&Z[X]=="inherit"){Y=Y[J];}return(Z)?Z[X]:S;},getColor:function(Y,X){return B.Dom.Color.toRGB(Y[T][X])||Q;},getBorderColor:function(Y,X){var Z=Y[T],a=Z[X]||Z.color;return B.Dom.Color.toRGB(B.Dom.Color.toHex(a));}},C={};C.top=C.right=C.bottom=C.left=C[E]=C[N]=M.getOffset;C.color=M.getColor;C[G]=C[P]=C[V]=C[D]=M.getBorderWidth;C.marginTop=C.marginRight=C.marginBottom=C.marginLeft=M.getMargin;C.visibility=M.getVisibility;C.borderColor=C.borderTopColor=C.borderRightColor=C.borderBottomColor=C.borderLeftColor=M.getBorderColor;B.Dom.IE_COMPUTED=C;B.Dom.IE_ComputedStyle=M;})();(function(){var C="toString",A=parseInt,B=RegExp,D=YAHOO.util;D.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(E){if(!D.Dom.Color.re_RGB.test(E)){E=D.Dom.Color.toHex(E);}if(D.Dom.Color.re_hex.exec(E)){E="rgb("+[A(B.$1,16),A(B.$2,16),A(B.$3,16)].join(", ")+")";}return E;},toHex:function(H){H=D.Dom.Color.KEYWORDS[H]||H;if(D.Dom.Color.re_RGB.exec(H)){var G=(B.$1.length===1)?"0"+B.$1:Number(B.$1),F=(B.$2.length===1)?"0"+B.$2:Number(B.$2),E=(B.$3.length===1)?"0"+B.$3:Number(B.$3);H=[G[C](16),F[C](16),E[C](16)].join("");}if(H.length<6){H=H.replace(D.Dom.Color.re_hex3,"$1$1");}if(H!=="transparent"&&H.indexOf("#")<0){H="#"+H;}return H.toLowerCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.7.0",build:"1799"});YAHOO.util.CustomEvent=function(D,C,B,A){this.type=D;this.scope=C||window;this.silent=B;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(A,B,C){if(!A){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(A,B,C);}this.subscribers.push(new YAHOO.util.Subscriber(A,B,C));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){this.lastError=null;var K=[],E=this.subscribers.length;if(!E&&this.silent){return true;}var I=[].slice.call(arguments,0),G=true,D,J=false;if(!this.silent){}var C=this.subscribers.slice(),A=YAHOO.util.Event.throwErrors;for(D=0;D<E;++D){var M=C[D];if(!M){J=true;}else{if(!this.silent){}var L=M.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var B=null;if(I.length>0){B=I[0];}try{G=M.fn.call(L,B,M.obj);}catch(F){this.lastError=F;if(A){throw F;}}}else{try{G=M.fn.call(L,this.type,I,M.obj);}catch(H){this.lastError=H;if(A){throw H;}}}if(false===G){if(!this.silent){}break;}}}return(G!==false);},unsubscribeAll:function(){var A=this.subscribers.length,B;for(B=A-1;B>-1;B--){this._delete(B);}this.subscribers=[];return A;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers.splice(A,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(A,B,C){this.fn=A;this.obj=YAHOO.lang.isUndefined(B)?null:B;this.overrideContext=C;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};var K=YAHOO.env.ua.ie?"focusin":"focus";var L=YAHOO.env.ua.ie?"focusout":"blur";return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var M=this;var N=function(){M._tryPreloadAttach();};this._interval=setInterval(N,this.POLL_INTERVAL);}},onAvailable:function(S,O,Q,R,P){var M=(YAHOO.lang.isString(S))?[S]:S;for(var N=0;N<M.length;N=N+1){F.push({id:M[N],fn:O,obj:Q,overrideContext:R,checkReady:P});}C=this.POLL_RETRYS;this.startInterval();},onContentReady:function(P,M,N,O){this.onAvailable(P,M,N,O,true);},onDOMReady:function(M,N,O){if(this.DOMReady){setTimeout(function(){var P=window;if(O){if(O===true){P=N;}else{P=O;}}M.call(P,"DOMReady",[],N);},0);}else{this.DOMReadyEvent.subscribe(M,N,O);}},_addListener:function(O,M,Y,S,W,b){if(!Y||!Y.call){return false;}if(this._isValidCollection(O)){var Z=true;for(var T=0,V=O.length;T<V;++T){Z=this.on(O[T],M,Y,S,W)&&Z;}return Z;}else{if(YAHOO.lang.isString(O)){var R=this.getEl(O);if(R){O=R;}else{this.onAvailable(O,function(){YAHOO.util.Event.on(O,M,Y,S,W);});return true;}}}if(!O){return false;}if("unload"==M&&S!==this){J[J.length]=[O,M,Y,S,W];return true;}var N=O;if(W){if(W===true){N=S;}else{N=W;}}var P=function(c){return Y.call(N,YAHOO.util.Event.getEvent(c,O),S);};var a=[O,M,Y,P,N,S,W];var U=I.length;I[U]=a;if(this.useLegacyEvent(O,M)){var Q=this.getLegacyIndex(O,M);if(Q==-1||O!=G[Q][0]){Q=G.length;B[O.id+M]=Q;G[Q]=[O,M,O["on"+M]];E[Q]=[];O["on"+M]=function(c){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(c),Q);};}E[Q].push(a);}else{try{this._simpleAdd(O,M,P,b);}catch(X){this.lastError=X;this.removeListener(O,M,Y);return false;}}return true;},addListener:function(N,Q,M,O,P){return this._addListener(N,Q,M,O,P,false);},addFocusListener:function(N,M,O,P){return this._addListener(N,K,M,O,P,true);},removeFocusListener:function(N,M){return this.removeListener(N,K,M);},addBlurListener:function(N,M,O,P){return this._addListener(N,L,M,O,P,true);},removeBlurListener:function(N,M){return this.removeListener(N,L,M);},fireLegacyEvent:function(R,P){var T=true,M,V,U,N,S;V=E[P].slice();for(var O=0,Q=V.length;O<Q;++O){U=V[O];if(U&&U[this.WFN]){N=U[this.ADJ_SCOPE];S=U[this.WFN].call(N,R);T=(T&&S);}}M=G[P];if(M&&M[2]){M[2](R);}return T;},getLegacyIndex:function(N,O){var M=this.generateId(N)+O;if(typeof B[M]=="undefined"){return -1;}else{return B[M];}},useLegacyEvent:function(M,N){return(this.webkit&&this.webkit<419&&("click"==N||"dblclick"==N));},removeListener:function(N,M,V){var Q,T,X;if(typeof N=="string"){N=this.getEl(N);}else{if(this._isValidCollection(N)){var W=true;for(Q=N.length-1;Q>-1;Q--){W=(this.removeListener(N[Q],M,V)&&W);}return W;}}if(!V||!V.call){return this.purgeElement(N,false,M);}if("unload"==M){for(Q=J.length-1;Q>-1;Q--){X=J[Q];if(X&&X[0]==N&&X[1]==M&&X[2]==V){J.splice(Q,1);return true;}}return false;}var R=null;var S=arguments[3];if("undefined"===typeof S){S=this._getCacheIndex(N,M,V);}if(S>=0){R=I[S];}if(!N||!R){return false;}if(this.useLegacyEvent(N,M)){var P=this.getLegacyIndex(N,M);var O=E[P];if(O){for(Q=0,T=O.length;Q<T;++Q){X=O[Q];if(X&&X[this.EL]==N&&X[this.TYPE]==M&&X[this.FN]==V){O.splice(Q,1);break;}}}}else{try{this._simpleRemove(N,M,R[this.WFN],false);}catch(U){this.lastError=U;return false;}}delete I[S][this.WFN];delete I[S][this.FN]; I.splice(S,1);return true;},getTarget:function(O,N){var M=O.target||O.srcElement;return this.resolveTextNode(M);},resolveTextNode:function(N){try{if(N&&3==N.nodeType){return N.parentNode;}}catch(M){}return N;},getPageX:function(N){var M=N.pageX;if(!M&&0!==M){M=N.clientX||0;if(this.isIE){M+=this._getScrollLeft();}}return M;},getPageY:function(M){var N=M.pageY;if(!N&&0!==N){N=M.clientY||0;if(this.isIE){N+=this._getScrollTop();}}return N;},getXY:function(M){return[this.getPageX(M),this.getPageY(M)];},getRelatedTarget:function(N){var M=N.relatedTarget;if(!M){if(N.type=="mouseout"){M=N.toElement;}else{if(N.type=="mouseover"){M=N.fromElement;}}}return this.resolveTextNode(M);},getTime:function(O){if(!O.time){var N=new Date().getTime();try{O.time=N;}catch(M){this.lastError=M;return N;}}return O.time;},stopEvent:function(M){this.stopPropagation(M);this.preventDefault(M);},stopPropagation:function(M){if(M.stopPropagation){M.stopPropagation();}else{M.cancelBubble=true;}},preventDefault:function(M){if(M.preventDefault){M.preventDefault();}else{M.returnValue=false;}},getEvent:function(O,M){var N=O||window.event;if(!N){var P=this.getEvent.caller;while(P){N=P.arguments[0];if(N&&Event==N.constructor){break;}P=P.caller;}}return N;},getCharCode:function(N){var M=N.keyCode||N.charCode||0;if(YAHOO.env.ua.webkit&&(M in D)){M=D[M];}return M;},_getCacheIndex:function(Q,R,P){for(var O=0,N=I.length;O<N;O=O+1){var M=I[O];if(M&&M[this.FN]==P&&M[this.EL]==Q&&M[this.TYPE]==R){return O;}}return -1;},generateId:function(M){var N=M.id;if(!N){N="yuievtautoid-"+A;++A;M.id=N;}return N;},_isValidCollection:function(N){try{return(N&&typeof N!=="string"&&N.length&&!N.tagName&&!N.alert&&typeof N[0]!=="undefined");}catch(M){return false;}},elCache:{},getEl:function(M){return(typeof M==="string")?document.getElementById(M):M;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(N){if(!H){H=true;var M=YAHOO.util.Event;M._ready();M._tryPreloadAttach();}},_ready:function(N){var M=YAHOO.util.Event;if(!M.DOMReady){M.DOMReady=true;M.DOMReadyEvent.fire();M._simpleRemove(document,"DOMContentLoaded",M._ready);}},_tryPreloadAttach:function(){if(F.length===0){C=0;if(this._interval){clearInterval(this._interval);this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var S=!H;if(!S){S=(C>0&&F.length>0);}var R=[];var T=function(V,W){var U=V;if(W.overrideContext){if(W.overrideContext===true){U=W.obj;}else{U=W.overrideContext;}}W.fn.call(U,W.obj);};var N,M,Q,P,O=[];for(N=0,M=F.length;N<M;N=N+1){Q=F[N];if(Q){P=this.getEl(Q.id);if(P){if(Q.checkReady){if(H||P.nextSibling||!S){O.push(Q);F[N]=null;}}else{T(P,Q);F[N]=null;}}else{R.push(Q);}}}for(N=0,M=O.length;N<M;N=N+1){Q=O[N];T(this.getEl(Q.id),Q);}C--;if(S){for(N=F.length-1;N>-1;N--){Q=F[N];if(!Q||!Q.id){F.splice(N,1);}}this.startInterval();}else{if(this._interval){clearInterval(this._interval);this._interval=null;}}this.locked=false;},purgeElement:function(Q,R,T){var O=(YAHOO.lang.isString(Q))?this.getEl(Q):Q;var S=this.getListeners(O,T),P,M;if(S){for(P=S.length-1;P>-1;P--){var N=S[P];this.removeListener(O,N.type,N.fn);}}if(R&&O&&O.childNodes){for(P=0,M=O.childNodes.length;P<M;++P){this.purgeElement(O.childNodes[P],R,T);}}},getListeners:function(O,M){var R=[],N;if(!M){N=[I,J];}else{if(M==="unload"){N=[J];}else{N=[I];}}var T=(YAHOO.lang.isString(O))?this.getEl(O):O;for(var Q=0;Q<N.length;Q=Q+1){var V=N[Q];if(V){for(var S=0,U=V.length;S<U;++S){var P=V[S];if(P&&P[this.EL]===T&&(!M||M===P[this.TYPE])){R.push({type:P[this.TYPE],fn:P[this.FN],obj:P[this.OBJ],adjust:P[this.OVERRIDE],scope:P[this.ADJ_SCOPE],index:S});}}}}return(R.length)?R:null;},_unload:function(T){var N=YAHOO.util.Event,Q,P,O,S,R,U=J.slice(),M;for(Q=0,S=J.length;Q<S;++Q){O=U[Q];if(O){M=window;if(O[N.ADJ_SCOPE]){if(O[N.ADJ_SCOPE]===true){M=O[N.UNLOAD_OBJ];}else{M=O[N.ADJ_SCOPE];}}O[N.FN].call(M,N.getEvent(T,O[N.EL]),O[N.UNLOAD_OBJ]);U[Q]=null;}}O=null;M=null;J=null;if(I){for(P=I.length-1;P>-1;P--){O=I[P];if(O){N.removeListener(O[N.EL],O[N.TYPE],O[N.FN],P);}}O=null;}G=null;N._simpleRemove(window,"unload",N._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var M=document.documentElement,N=document.body;if(M&&(M.scrollTop||M.scrollLeft)){return[M.scrollTop,M.scrollLeft];}else{if(N){return[N.scrollTop,N.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(O,P,N,M){O.addEventListener(P,N,(M));};}else{if(window.attachEvent){return function(O,P,N,M){O.attachEvent("on"+P,N);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(O,P,N,M){O.removeEventListener(P,N,(M));};}else{if(window.detachEvent){return function(N,O,M){N.detachEvent("on"+O,M);};}else{return function(){};}}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;EU.onFocus=EU.addFocusListener;EU.onBlur=EU.addBlurListener; /* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller */ if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){}},EU.POLL_INTERVAL);}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E); }else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,overrideContext:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].overrideContext);}}}return I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};(function(){var A=YAHOO.util.Event,C=YAHOO.lang;YAHOO.util.KeyListener=function(D,I,E,F){if(!D){}else{if(!I){}else{if(!E){}}}if(!F){F=YAHOO.util.KeyListener.KEYDOWN;}var G=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(C.isString(D)){D=document.getElementById(D);}if(C.isFunction(E)){G.subscribe(E);}else{G.subscribe(E.fn,E.scope,E.correctScope);}function H(O,N){if(!I.shift){I.shift=false;}if(!I.alt){I.alt=false;}if(!I.ctrl){I.ctrl=false;}if(O.shiftKey==I.shift&&O.altKey==I.alt&&O.ctrlKey==I.ctrl){var J,M=I.keys,L;if(YAHOO.lang.isArray(M)){for(var K=0;K<M.length;K++){J=M[K];L=A.getCharCode(O);if(J==L){G.fire(L,O);break;}}}else{L=A.getCharCode(O);if(M==L){G.fire(L,O);}}}}this.enable=function(){if(!this.enabled){A.on(D,F,H);this.enabledEvent.fire(I);}this.enabled=true;};this.disable=function(){if(this.enabled){A.removeListener(D,F,H);this.disabledEvent.fire(I);}this.enabled=false;};this.toString=function(){return"KeyListener ["+I.keys+"] "+D.tagName+(D.id?"["+D.id+"]":"");};};var B=YAHOO.util.KeyListener;B.KEYDOWN="keydown";B.KEYUP="keyup";B.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.7.0",build:"1799"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.7.0", build: "1799"}); /* Copyright (c) 2009, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt version: 2.7.0 */ YAHOO.util.CustomEvent=function(D,C,B,A){this.type=D;this.scope=C||window;this.silent=B;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(A,B,C){if(!A){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(A,B,C);}this.subscribers.push(new YAHOO.util.Subscriber(A,B,C));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){this.lastError=null;var K=[],E=this.subscribers.length;if(!E&&this.silent){return true;}var I=[].slice.call(arguments,0),G=true,D,J=false;if(!this.silent){}var C=this.subscribers.slice(),A=YAHOO.util.Event.throwErrors;for(D=0;D<E;++D){var M=C[D];if(!M){J=true;}else{if(!this.silent){}var L=M.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var B=null;if(I.length>0){B=I[0];}try{G=M.fn.call(L,B,M.obj);}catch(F){this.lastError=F;if(A){throw F;}}}else{try{G=M.fn.call(L,this.type,I,M.obj);}catch(H){this.lastError=H;if(A){throw H;}}}if(false===G){if(!this.silent){}break;}}}return(G!==false);},unsubscribeAll:function(){var A=this.subscribers.length,B;for(B=A-1;B>-1;B--){this._delete(B);}this.subscribers=[];return A;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers.splice(A,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(A,B,C){this.fn=A;this.obj=YAHOO.lang.isUndefined(B)?null:B;this.overrideContext=C;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};var K=YAHOO.env.ua.ie?"focusin":"focus";var L=YAHOO.env.ua.ie?"focusout":"blur";return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var M=this;var N=function(){M._tryPreloadAttach();};this._interval=setInterval(N,this.POLL_INTERVAL);}},onAvailable:function(S,O,Q,R,P){var M=(YAHOO.lang.isString(S))?[S]:S;for(var N=0;N<M.length;N=N+1){F.push({id:M[N],fn:O,obj:Q,overrideContext:R,checkReady:P});}C=this.POLL_RETRYS;this.startInterval();},onContentReady:function(P,M,N,O){this.onAvailable(P,M,N,O,true);},onDOMReady:function(M,N,O){if(this.DOMReady){setTimeout(function(){var P=window;if(O){if(O===true){P=N;}else{P=O;}}M.call(P,"DOMReady",[],N);},0);}else{this.DOMReadyEvent.subscribe(M,N,O);}},_addListener:function(O,M,Y,S,W,b){if(!Y||!Y.call){return false;}if(this._isValidCollection(O)){var Z=true;for(var T=0,V=O.length;T<V;++T){Z=this.on(O[T],M,Y,S,W)&&Z;}return Z;}else{if(YAHOO.lang.isString(O)){var R=this.getEl(O);if(R){O=R;}else{this.onAvailable(O,function(){YAHOO.util.Event.on(O,M,Y,S,W);});return true;}}}if(!O){return false;}if("unload"==M&&S!==this){J[J.length]=[O,M,Y,S,W];return true;}var N=O;if(W){if(W===true){N=S;}else{N=W;}}var P=function(c){return Y.call(N,YAHOO.util.Event.getEvent(c,O),S);};var a=[O,M,Y,P,N,S,W];var U=I.length;I[U]=a;if(this.useLegacyEvent(O,M)){var Q=this.getLegacyIndex(O,M);if(Q==-1||O!=G[Q][0]){Q=G.length;B[O.id+M]=Q;G[Q]=[O,M,O["on"+M]];E[Q]=[];O["on"+M]=function(c){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(c),Q);};}E[Q].push(a);}else{try{this._simpleAdd(O,M,P,b);}catch(X){this.lastError=X;this.removeListener(O,M,Y);return false;}}return true;},addListener:function(N,Q,M,O,P){return this._addListener(N,Q,M,O,P,false);},addFocusListener:function(N,M,O,P){return this._addListener(N,K,M,O,P,true);},removeFocusListener:function(N,M){return this.removeListener(N,K,M);},addBlurListener:function(N,M,O,P){return this._addListener(N,L,M,O,P,true);},removeBlurListener:function(N,M){return this.removeListener(N,L,M);},fireLegacyEvent:function(R,P){var T=true,M,V,U,N,S;V=E[P].slice();for(var O=0,Q=V.length;O<Q;++O){U=V[O];if(U&&U[this.WFN]){N=U[this.ADJ_SCOPE];S=U[this.WFN].call(N,R);T=(T&&S);}}M=G[P];if(M&&M[2]){M[2](R);}return T;},getLegacyIndex:function(N,O){var M=this.generateId(N)+O;if(typeof B[M]=="undefined"){return -1;}else{return B[M];}},useLegacyEvent:function(M,N){return(this.webkit&&this.webkit<419&&("click"==N||"dblclick"==N));},removeListener:function(N,M,V){var Q,T,X;if(typeof N=="string"){N=this.getEl(N);}else{if(this._isValidCollection(N)){var W=true;for(Q=N.length-1;Q>-1;Q--){W=(this.removeListener(N[Q],M,V)&&W);}return W;}}if(!V||!V.call){return this.purgeElement(N,false,M);}if("unload"==M){for(Q=J.length-1;Q>-1;Q--){X=J[Q];if(X&&X[0]==N&&X[1]==M&&X[2]==V){J.splice(Q,1);return true;}}return false;}var R=null;var S=arguments[3];if("undefined"===typeof S){S=this._getCacheIndex(N,M,V);}if(S>=0){R=I[S];}if(!N||!R){return false;}if(this.useLegacyEvent(N,M)){var P=this.getLegacyIndex(N,M);var O=E[P];if(O){for(Q=0,T=O.length;Q<T;++Q){X=O[Q];if(X&&X[this.EL]==N&&X[this.TYPE]==M&&X[this.FN]==V){O.splice(Q,1);break;}}}}else{try{this._simpleRemove(N,M,R[this.WFN],false);}catch(U){this.lastError=U;return false;}}delete I[S][this.WFN];delete I[S][this.FN]; I.splice(S,1);return true;},getTarget:function(O,N){var M=O.target||O.srcElement;return this.resolveTextNode(M);},resolveTextNode:function(N){try{if(N&&3==N.nodeType){return N.parentNode;}}catch(M){}return N;},getPageX:function(N){var M=N.pageX;if(!M&&0!==M){M=N.clientX||0;if(this.isIE){M+=this._getScrollLeft();}}return M;},getPageY:function(M){var N=M.pageY;if(!N&&0!==N){N=M.clientY||0;if(this.isIE){N+=this._getScrollTop();}}return N;},getXY:function(M){return[this.getPageX(M),this.getPageY(M)];},getRelatedTarget:function(N){var M=N.relatedTarget;if(!M){if(N.type=="mouseout"){M=N.toElement;}else{if(N.type=="mouseover"){M=N.fromElement;}}}return this.resolveTextNode(M);},getTime:function(O){if(!O.time){var N=new Date().getTime();try{O.time=N;}catch(M){this.lastError=M;return N;}}return O.time;},stopEvent:function(M){this.stopPropagation(M);this.preventDefault(M);},stopPropagation:function(M){if(M.stopPropagation){M.stopPropagation();}else{M.cancelBubble=true;}},preventDefault:function(M){if(M.preventDefault){M.preventDefault();}else{M.returnValue=false;}},getEvent:function(O,M){var N=O||window.event;if(!N){var P=this.getEvent.caller;while(P){N=P.arguments[0];if(N&&Event==N.constructor){break;}P=P.caller;}}return N;},getCharCode:function(N){var M=N.keyCode||N.charCode||0;if(YAHOO.env.ua.webkit&&(M in D)){M=D[M];}return M;},_getCacheIndex:function(Q,R,P){for(var O=0,N=I.length;O<N;O=O+1){var M=I[O];if(M&&M[this.FN]==P&&M[this.EL]==Q&&M[this.TYPE]==R){return O;}}return -1;},generateId:function(M){var N=M.id;if(!N){N="yuievtautoid-"+A;++A;M.id=N;}return N;},_isValidCollection:function(N){try{return(N&&typeof N!=="string"&&N.length&&!N.tagName&&!N.alert&&typeof N[0]!=="undefined");}catch(M){return false;}},elCache:{},getEl:function(M){return(typeof M==="string")?document.getElementById(M):M;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(N){if(!H){H=true;var M=YAHOO.util.Event;M._ready();M._tryPreloadAttach();}},_ready:function(N){var M=YAHOO.util.Event;if(!M.DOMReady){M.DOMReady=true;M.DOMReadyEvent.fire();M._simpleRemove(document,"DOMContentLoaded",M._ready);}},_tryPreloadAttach:function(){if(F.length===0){C=0;if(this._interval){clearInterval(this._interval);this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var S=!H;if(!S){S=(C>0&&F.length>0);}var R=[];var T=function(V,W){var U=V;if(W.overrideContext){if(W.overrideContext===true){U=W.obj;}else{U=W.overrideContext;}}W.fn.call(U,W.obj);};var N,M,Q,P,O=[];for(N=0,M=F.length;N<M;N=N+1){Q=F[N];if(Q){P=this.getEl(Q.id);if(P){if(Q.checkReady){if(H||P.nextSibling||!S){O.push(Q);F[N]=null;}}else{T(P,Q);F[N]=null;}}else{R.push(Q);}}}for(N=0,M=O.length;N<M;N=N+1){Q=O[N];T(this.getEl(Q.id),Q);}C--;if(S){for(N=F.length-1;N>-1;N--){Q=F[N];if(!Q||!Q.id){F.splice(N,1);}}this.startInterval();}else{if(this._interval){clearInterval(this._interval);this._interval=null;}}this.locked=false;},purgeElement:function(Q,R,T){var O=(YAHOO.lang.isString(Q))?this.getEl(Q):Q;var S=this.getListeners(O,T),P,M;if(S){for(P=S.length-1;P>-1;P--){var N=S[P];this.removeListener(O,N.type,N.fn);}}if(R&&O&&O.childNodes){for(P=0,M=O.childNodes.length;P<M;++P){this.purgeElement(O.childNodes[P],R,T);}}},getListeners:function(O,M){var R=[],N;if(!M){N=[I,J];}else{if(M==="unload"){N=[J];}else{N=[I];}}var T=(YAHOO.lang.isString(O))?this.getEl(O):O;for(var Q=0;Q<N.length;Q=Q+1){var V=N[Q];if(V){for(var S=0,U=V.length;S<U;++S){var P=V[S];if(P&&P[this.EL]===T&&(!M||M===P[this.TYPE])){R.push({type:P[this.TYPE],fn:P[this.FN],obj:P[this.OBJ],adjust:P[this.OVERRIDE],scope:P[this.ADJ_SCOPE],index:S});}}}}return(R.length)?R:null;},_unload:function(T){var N=YAHOO.util.Event,Q,P,O,S,R,U=J.slice(),M;for(Q=0,S=J.length;Q<S;++Q){O=U[Q];if(O){M=window;if(O[N.ADJ_SCOPE]){if(O[N.ADJ_SCOPE]===true){M=O[N.UNLOAD_OBJ];}else{M=O[N.ADJ_SCOPE];}}O[N.FN].call(M,N.getEvent(T,O[N.EL]),O[N.UNLOAD_OBJ]);U[Q]=null;}}O=null;M=null;J=null;if(I){for(P=I.length-1;P>-1;P--){O=I[P];if(O){N.removeListener(O[N.EL],O[N.TYPE],O[N.FN],P);}}O=null;}G=null;N._simpleRemove(window,"unload",N._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var M=document.documentElement,N=document.body;if(M&&(M.scrollTop||M.scrollLeft)){return[M.scrollTop,M.scrollLeft];}else{if(N){return[N.scrollTop,N.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(O,P,N,M){O.addEventListener(P,N,(M));};}else{if(window.attachEvent){return function(O,P,N,M){O.attachEvent("on"+P,N);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(O,P,N,M){O.removeEventListener(P,N,(M));};}else{if(window.detachEvent){return function(N,O,M){N.detachEvent("on"+O,M);};}else{return function(){};}}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;EU.onFocus=EU.addFocusListener;EU.onBlur=EU.addBlurListener; /* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller */ if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){}},EU.POLL_INTERVAL);}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E); }else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,overrideContext:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].overrideContext);}}}return I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};(function(){var A=YAHOO.util.Event,C=YAHOO.lang;YAHOO.util.KeyListener=function(D,I,E,F){if(!D){}else{if(!I){}else{if(!E){}}}if(!F){F=YAHOO.util.KeyListener.KEYDOWN;}var G=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(C.isString(D)){D=document.getElementById(D);}if(C.isFunction(E)){G.subscribe(E);}else{G.subscribe(E.fn,E.scope,E.correctScope);}function H(O,N){if(!I.shift){I.shift=false;}if(!I.alt){I.alt=false;}if(!I.ctrl){I.ctrl=false;}if(O.shiftKey==I.shift&&O.altKey==I.alt&&O.ctrlKey==I.ctrl){var J,M=I.keys,L;if(YAHOO.lang.isArray(M)){for(var K=0;K<M.length;K++){J=M[K];L=A.getCharCode(O);if(J==L){G.fire(L,O);break;}}}else{L=A.getCharCode(O);if(M==L){G.fire(L,O);}}}}this.enable=function(){if(!this.enabled){A.on(D,F,H);this.enabledEvent.fire(I);}this.enabled=true;};this.disable=function(){if(this.enabled){A.removeListener(D,F,H);this.disabledEvent.fire(I);}this.enabled=false;};this.toString=function(){return"KeyListener ["+I.keys+"] "+D.tagName+(D.id?"["+D.id+"]":"");};};var B=YAHOO.util.KeyListener;B.KEYDOWN="keydown";B.KEYUP="keyup";B.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.7.0",build:"1796"}); /* Copyright (c) 2009, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt version: 2.7.0 */ (function(){var B=YAHOO.util;var A=function(D,C,E,F){if(!D){}this.init(D,C,E,F);};A.NAME="Anim";A.prototype={toString:function(){var C=this.getEl()||{};var D=C.id||C.tagName;return(this.constructor.NAME+": "+D);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(C,E,D){return this.method(this.currentFrame,E,D-E,this.totalFrames);},setAttribute:function(C,F,E){var D=this.getEl();if(this.patterns.noNegatives.test(C)){F=(F>0)?F:0;}if("style" in D){B.Dom.setStyle(D,C,F+E);}else{if(C in D){D[C]=F;}}},getAttribute:function(C){var E=this.getEl();var G=B.Dom.getStyle(E,C);if(G!=="auto"&&!this.patterns.offsetUnit.test(G)){return parseFloat(G);}var D=this.patterns.offsetAttribute.exec(C)||[];var H=!!(D[3]);var F=!!(D[2]);if("style" in E){if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)];}else{G=0;}}else{if(C in E){G=E[C];}}return G;},getDefaultUnit:function(C){if(this.patterns.defaultUnit.test(C)){return"px";}return"";},setRuntimeAttribute:function(D){var I;var E;var F=this.attributes;this.runtimeAttributes[D]={};var H=function(J){return(typeof J!=="undefined");};if(!H(F[D]["to"])&&!H(F[D]["by"])){return false;}I=(H(F[D]["from"]))?F[D]["from"]:this.getAttribute(D);if(H(F[D]["to"])){E=F[D]["to"];}else{if(H(F[D]["by"])){if(I.constructor==Array){E=[];for(var G=0,C=I.length;G<C;++G){E[G]=I[G]+F[D]["by"][G]*1;}}else{E=I+F[D]["by"]*1;}}}this.runtimeAttributes[D].start=I;this.runtimeAttributes[D].end=E;this.runtimeAttributes[D].unit=(H(F[D].unit))?F[D]["unit"]:this.getDefaultUnit(D);return true;},init:function(E,J,I,C){var D=false;var F=null;var H=0;E=B.Dom.get(E);this.attributes=J||{};this.duration=!YAHOO.lang.isUndefined(I)?I:1;this.method=C||B.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=B.AnimMgr.fps;this.setEl=function(M){E=B.Dom.get(M);};this.getEl=function(){return E;};this.isAnimated=function(){return D;};this.getStartTime=function(){return F;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false;}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(B.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1;}B.AnimMgr.registerElement(this);return true;};this.stop=function(M){if(!this.isAnimated()){return false;}if(M){this.currentFrame=this.totalFrames;this._onTween.fire();}B.AnimMgr.stop(this);};var L=function(){this.onStart.fire();this.runtimeAttributes={};for(var M in this.attributes){this.setRuntimeAttribute(M);}D=true;H=0;F=new Date();};var K=function(){var O={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};O.toString=function(){return("duration: "+O.duration+", currentFrame: "+O.currentFrame);};this.onTween.fire(O);var N=this.runtimeAttributes;for(var M in N){this.setAttribute(M,this.doMethod(M,N[M].start,N[M].end),N[M].unit);}H+=1;};var G=function(){var M=(new Date()-F)/1000;var N={duration:M,frames:H,fps:H/M};N.toString=function(){return("duration: "+N.duration+", frames: "+N.frames+", fps: "+N.fps);};D=false;H=0;this.onComplete.fire(N);};this._onStart=new B.CustomEvent("_start",this,true);this.onStart=new B.CustomEvent("start",this);this.onTween=new B.CustomEvent("tween",this);this._onTween=new B.CustomEvent("_tween",this,true);this.onComplete=new B.CustomEvent("complete",this);this._onComplete=new B.CustomEvent("_complete",this,true);this._onStart.subscribe(L);this._onTween.subscribe(K);this._onComplete.subscribe(G);}};B.Anim=A;})();YAHOO.util.AnimMgr=new function(){var C=null;var B=[];var A=0;this.fps=1000;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+=1;F._onStart.fire();this.start();};this.unRegister=function(G,F){F=F||E(G);if(!G.isAnimated()||F==-1){return false;}G._onComplete.fire();B.splice(F,1);A-=1;if(A<=0){this.stop();}return true;};this.start=function(){if(C===null){C=setInterval(this.run,this.delay);}};this.stop=function(H){if(!H){clearInterval(C);for(var G=0,F=B.length;G<F;++G){this.unRegister(B[0],0);}B=[];C=null;A=0;}else{this.unRegister(H);}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G||!G.isAnimated()){continue;}if(G.currentFrame<G.totalFrames||G.totalFrames===null){G.currentFrame+=1;if(G.useSeconds){D(G);}G._onTween.fire();}else{YAHOO.util.AnimMgr.stop(G,H);}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]==H){return G;}}return -1;};var D=function(G){var J=G.totalFrames;var I=G.currentFrame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new Date()-G.getStartTime());var K=0;if(F<G.duration*1000){K=Math.round((F/H-1)*G.currentFrame);}else{K=J-(I+1);}if(K>0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1);}G.currentFrame+=K;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B<F;++B){C[B]=[E[B][0],E[B][1]];}for(var A=1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0];C[B][1]=(1-D)*C[B][1]+D*C[parseInt(B+1,10)][1];}}return[C[0][0],C[0][1]];};};(function(){var A=function(F,E,G,H){A.superclass.constructor.call(this,F,E,G,H);};A.NAME="ColorAnim";A.DEFAULT_BGCOLOR="#fff";var C=YAHOO.util;YAHOO.extend(A,C.Anim);var D=A.superclass;var B=A.prototype;B.patterns.color=/color$/i;B.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;B.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;B.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;B.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;B.parseColor=function(E){if(E.length==3){return E;}var F=this.patterns.hex.exec(E);if(F&&F.length==4){return[parseInt(F[1],16),parseInt(F[2],16),parseInt(F[3],16)];}F=this.patterns.rgb.exec(E);if(F&&F.length==4){return[parseInt(F[1],10),parseInt(F[2],10),parseInt(F[3],10)];}F=this.patterns.hex3.exec(E);if(F&&F.length==4){return[parseInt(F[1]+F[1],16),parseInt(F[2]+F[2],16),parseInt(F[3]+F[3],16)]; }return null;};B.getAttribute=function(E){var G=this.getEl();if(this.patterns.color.test(E)){var I=YAHOO.util.Dom.getStyle(G,E);var H=this;if(this.patterns.transparent.test(I)){var F=YAHOO.util.Dom.getAncestorBy(G,function(J){return !H.patterns.transparent.test(I);});if(F){I=C.Dom.getStyle(F,E);}else{I=A.DEFAULT_BGCOLOR;}}}else{I=D.getAttribute.call(this,E);}return I;};B.doMethod=function(F,J,G){var I;if(this.patterns.color.test(F)){I=[];for(var H=0,E=J.length;H<E;++H){I[H]=D.doMethod.call(this,F,J[H],G[H]);}I="rgb("+Math.floor(I[0])+","+Math.floor(I[1])+","+Math.floor(I[2])+")";}else{I=D.doMethod.call(this,F,J,G);}return I;};B.setRuntimeAttribute=function(F){D.setRuntimeAttribute.call(this,F);if(this.patterns.color.test(F)){var H=this.attributes;var J=this.parseColor(this.runtimeAttributes[F].start);var G=this.parseColor(this.runtimeAttributes[F].end);if(typeof H[F]["to"]==="undefined"&&typeof H[F]["by"]!=="undefined"){G=this.parseColor(H[F].by);for(var I=0,E=J.length;I<E;++I){G[I]=J[I]+G[I];}}this.runtimeAttributes[F].start=J;this.runtimeAttributes[F].end=G;}};C.ColorAnim=A;})(); /* TERMS OF USE - EASING EQUATIONS Open source under the BSD License. Copyright 2001 Robert Penner All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ YAHOO.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A;},easeIn:function(B,A,D,C){return D*(B/=C)*B+A;},easeOut:function(B,A,D,C){return -D*(B/=C)*(B-2)+A;},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A;}return -D/2*((--B)*(B-2)-1)+A;},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A;},easeOutStrong:function(B,A,D,C){return -D*((B=B/C-1)*B*B*B-1)+A;},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A;}return -D/2*((B-=2)*B*B*B-2)+A;},elasticIn:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return -(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;},elasticOut:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A;},elasticBoth:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F/2)==2){return A+G;}if(!E){E=F*(0.3*1.5);}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}if(C<1){return -0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;}return B*Math.pow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A;},backIn:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*(B/=D)*B*((C+1)*B-C)+A;},backOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*((B=B/D-1)*B*((C+1)*B+C)+1)+A;},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A;}return E/2*((B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A;},bounceIn:function(B,A,D,C){return D-YAHOO.util.Easing.bounceOut(C-B,0,D,C)+A;},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.5625*B*B)+A;}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A;}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A;}}}return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A;},bounceBoth:function(B,A,D,C){if(B<C/2){return YAHOO.util.Easing.bounceIn(B*2,0,D,C)*0.5+A;}return YAHOO.util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A;}};(function(){var A=function(H,G,I,J){if(H){A.superclass.constructor.call(this,H,G,I,J);}};A.NAME="Motion";var E=YAHOO.util;YAHOO.extend(A,E.ColorAnim);var F=A.superclass;var C=A.prototype;C.patterns.points=/^points$/i;C.setAttribute=function(G,I,H){if(this.patterns.points.test(G)){H=H||"px";F.setAttribute.call(this,"left",I[0],H);F.setAttribute.call(this,"top",I[1],H);}else{F.setAttribute.call(this,G,I,H);}};C.getAttribute=function(G){if(this.patterns.points.test(G)){var H=[F.getAttribute.call(this,"left"),F.getAttribute.call(this,"top")];}else{H=F.getAttribute.call(this,G);}return H;};C.doMethod=function(G,K,H){var J=null;if(this.patterns.points.test(G)){var I=this.method(this.currentFrame,0,100,this.totalFrames)/100;J=E.Bezier.getPosition(this.runtimeAttributes[G],I);}else{J=F.doMethod.call(this,G,K,H);}return J;};C.setRuntimeAttribute=function(P){if(this.patterns.points.test(P)){var H=this.getEl();var J=this.attributes;var G;var L=J["points"]["control"]||[];var I;var M,O;if(L.length>0&&!(L[0] instanceof Array)){L=[L];}else{var K=[];for(M=0,O=L.length;M<O;++M){K[M]=L[M];}L=K;}if(E.Dom.getStyle(H,"position")=="static"){E.Dom.setStyle(H,"position","relative");}if(D(J["points"]["from"])){E.Dom.setXY(H,J["points"]["from"]); }else{E.Dom.setXY(H,E.Dom.getXY(H));}G=this.getAttribute("points");if(D(J["points"]["to"])){I=B.call(this,J["points"]["to"],G);var N=E.Dom.getXY(this.getEl());for(M=0,O=L.length;M<O;++M){L[M]=B.call(this,L[M],G);}}else{if(D(J["points"]["by"])){I=[G[0]+J["points"]["by"][0],G[1]+J["points"]["by"][1]];for(M=0,O=L.length;M<O;++M){L[M]=[G[0]+L[M][0],G[1]+L[M][1]];}}}this.runtimeAttributes[P]=[G];if(L.length>0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L);}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I;}else{F.setRuntimeAttribute.call(this,P);}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G;};var D=function(G){return(typeof G!=="undefined");};E.Motion=A;})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H);}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)];}else{G=C.doMethod.call(this,E,H,F);}return G;};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop];}else{G=C.getAttribute.call(this,E);}return G;};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1];}else{C.setAttribute.call(this,E,H,G);}};B.Scroll=D;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.7.0",build:"1796"});D2L.LP.Web.UI.Common={CompositeViews:{},Controls:{},MasterPages:{}}; D2L.LP.Web.UI.Common.Controls.Button={Build:function(doc){doc=doc||document;var tagName=D2L.LP.Web.UI.Daylight.IsEnabled()?"button":"a";var node=doc.createElement(tagName);if(!D2L.LP.Web.UI.Daylight.IsEnabled())D2L.LP.Web.UI.Html.Dom.AddClassName("vui-button",node);D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-button",node);D2L.LP.Web.UI.Html.Dom.SetAttribute(node,"data-onclick","var a=1;");return node},ClickNode:function(node){D2L.LP.Web.UI.Html.Dom.DispatchEvent("click",node)},GetTextNode:function(node){var text= $(node).text().trim();return text},GetTitleNode:function(node){var dom=D2L.LP.Web.UI.Html.Dom;var hasTitle=dom.HasAttribute(node,"title");if(!hasTitle)return"";var title=dom.GetAttribute(node,"title");return title},Init:function(node){var me=D2L.LP.Web.UI.Common.Controls.Button;var dom=D2L.LP.Web.UI.Html.Dom;var $node=$(node);me.InitAria(node);me.InitPageButtons(node);var locationOnClick=null;if(dom.HasAttribute(node,"data-location")){var href=dom.GetAttribute(node,"data-location");if(node.classList.contains("d2l-newwindow"))locationOnClick= function(){window.open(href,"_blank")};else locationOnClick=function(){D2L.LP.Web.UI.Html.Dom.Navigate(D2L.LP.Web.Http.UrlLocation.Create(href))}}var hasOnClick=dom.HasAttribute(node,"data-onclick");if(!hasOnClick&&locationOnClick===null)return;var onClick=dom.GetAttribute(node,"data-onclick");dom.RemoveAttribute(node,"data-onclick");var processingText=dom.GetAttribute(node,"data-processing-text");var hasProcessingText=processingText!==undefined&&processingText!==null&&processingText.length>0;var clickTime= null;var isProcessing=false;var beginProcessing=function(){isProcessing=true;setTimeout(function(){if(isProcessing&&hasProcessingText){me.SetIsEnabledNode(node,false);$node.data("originalText",me.GetTextNode(node));me.SetTextNode(node,processingText);D2L.LP.Web.UI.Events.OnProcessingBegin.Trigger()}},200)};var finishProcessing=function(){if(hasProcessingText){var text=$node.data("originalText")||me.GetTextNode(node);me.SetTextNode(node,text);me.SetIsEnabledNode(node,true);D2L.LP.Web.UI.Events.OnProcessingEnd.Trigger()}isProcessing= false};var execOnClick=function(){if(node.d2l_onClick!==undefined)return node.d2l_onClick();if(hasOnClick)return eval(onClick)};var clickFunction=function(){var bypassDoubleClickPrevention=dom.HasClassName("d2l-button-bypass",node);var currentTime=(new Date).getTime();if(!bypassDoubleClickPrevention&&clickTime!==null&¤tTime-clickTime<=500){clickTime=currentTime;return}if(!me.IsEnabledNode(node)||!bypassDoubleClickPrevention&&isProcessing)return;clickTime=currentTime;var ret=execOnClick();if(locationOnClick!== null&&ret!==false)locationOnClick();if(typeof ret==="undefined"||ret===null||ret.AddListener===undefined)return;beginProcessing();ret.AddListener(finishProcessing);ret.AddReleaseListener(finishProcessing)};$node.click(clickFunction);if(D2L.LP.Web.UI.Daylight.IsEnabled())node.addEventListener("d2l-button-ghost-click",clickFunction)},InitAria:function(node){if(D2L.LP.Web.UI.Daylight.IsEnabled())return;var $node=$(node);var isInitiallyDisabled=!D2L.LP.Web.UI.Common.Controls.Button.IsEnabledNode(node); $node.attr("role","button").prop("tabIndex",isInitiallyDisabled?-1:0).attr("aria-disabled",isInitiallyDisabled?"true":"false").bind("keypress",function(e){if(e.keyCode===13)D2L.LP.Web.UI.Common.Controls.Button.ClickNode(node)})},IsPageButton:function(node){var dom=D2L.LP.Web.UI.Html.Dom;var isPageButton=dom.GetParentElementByClassName("d2l-page-buttons",node)!==null;if(isPageButton)return true;var isDialogButton=dom.GetParentElementByClassName("d2l-dialog-buttons",node)!==null;if(isDialogButton){var isDialogFooterButton= dom.GetParentElementByClassName("d2l-dialog-footer",node)!==null;if(!isDialogFooterButton)return true}return false},InitPageButtons:function(node){var me=D2L.LP.Web.UI.Common.Controls.Button;var isPageButton=me.IsPageButton(node);if(!isPageButton)return;var enableOnEnd=true;D2L.LP.Web.UI.Events.OnProcessingBegin.AddListener(function(){enableOnEnd=me.IsEnabledNode(node);if(enableOnEnd)me.SetIsEnabledNode(node,false)});D2L.LP.Web.UI.Events.OnProcessingEnd.AddListener(function(){if(enableOnEnd)me.SetIsEnabledNode(node, true);enableOnEnd=true})},IsEnabledNode:function(node){if(D2L.LP.Web.UI.Daylight.IsEnabled())return!node.disabled;var isEnabled=!$(node).hasClass("vui-disabled");return isEnabled},IsPrimaryNode:function(node){if(D2L.LP.Web.UI.Daylight.IsEnabled())return node.hasAttribute("primary");var isPrimary=D2L.LP.Web.UI.Html.Dom.HasClassName("vui-button-primary",node);return isPrimary},IsVisibleNode:function(node){var isVisible=!D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-hidden",node);return isVisible},SetIsEnabled:function(id, isEnabled){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());D2L.LP.Web.UI.Common.Controls.Button.SetIsEnabledNode(node,isEnabled)},SetIsEnabledNode:function(node,isEnabled){var isEnabledCurrent=D2L.LP.Web.UI.Common.Controls.Button.IsEnabledNode(node);if(isEnabled==isEnabledCurrent)return;if(D2L.LP.Web.UI.Daylight.IsEnabled()){node.disabled=!isEnabled;return}$(node).toggleClass("vui-disabled",!isEnabled).attr("aria-disabled",isEnabled?"false":"true").prop("tabIndex",isEnabled?0:-1);var hasHref= D2L.LP.Web.UI.Html.Dom.HasAttribute(node,isEnabled?"data-href":"href");if(!hasHref)return;var href=D2L.LP.Web.UI.Html.Dom.GetAttribute(node,isEnabled?"data-href":"href");D2L.LP.Web.UI.Html.Dom.SetAttribute(node,isEnabled?"href":"data-href",href);D2L.LP.Web.UI.Html.Dom.RemoveAttribute(node,isEnabled?"data-href":"href")},SetIsPrimaryNode:function(node,isPrimary){if(D2L.LP.Web.UI.Daylight.IsEnabled()){if(isPrimary)node.setAttribute("primary","");else node.removeAttribute("primary");return}$(node).toggleClass("vui-button-primary", isPrimary)},SetIsVisibleNode:function(node,isVisible){D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(node,isVisible)},SetOnClickNode:function(node,onClick){node.d2l_onClick=onClick},SetText:function(id,text){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(node===null)return;D2L.LP.Web.UI.Common.Controls.Button.SetTextNode(node,text)},SetTextNode:function(node,text){var $node=$(node);var offscreen=$node.children(".vui-offscreen");if(offscreen.length===1){$(offscreen[0]).text(text);return}$node.contents().filter(function(){return this.nodeType=== 3}).remove();$node.append(document.createTextNode(text))},SetTitleNode:function(node,title){if(title===undefined||title===null||title.length===0)D2L.LP.Web.UI.Html.Dom.RemoveAttribute(node,"title");else D2L.LP.Web.UI.Html.Dom.SetAttribute(node,"title",title)},UnbindEvents:function(node){$(node).unbind("keypress");$(node).unbind("click")}}; D2L.LP.Web.UI.Common.Controls.Edit={ClearValue:function(id){D2L.LP.Web.UI.Common.Controls.Edit.SetValue(id,"");var inputNode=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());inputNode.focus()},ClearValueNode:function(node){D2L.LP.Web.UI.Common.Controls.Edit.SetValueNode(node,"")},GetValue:function(id){var input=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());return D2L.LP.Web.UI.Common.Controls.Edit.GetValueNode(input)},GetValueNode:function(node){if(node!==null)return node.value;return""}, SetValue:function(id,value){var input=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(input!==null)D2L.LP.Web.UI.Common.Controls.Edit.SetValueNode(input,value)},SetValueNode:function(node,value){node.value=value},IsEnabledNode:function(node){if(node.disabled!==undefined)return!node.disabled;return true},IsVisibleNode:function(node){return D2L.LP.Web.UI.Html.Dom.IsVisible(node)},IsVisible:function(id){var input=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());return D2L.LP.Web.UI.Common.Controls.Edit.IsVisibleNode(input)}, ValidateEnabledVisibleNode:function(node){if(!node)return true;var isEnabled=D2L.LP.Web.UI.Common.Controls.Edit.IsEnabledNode(node);var isVisible=D2L.LP.Web.UI.Common.Controls.Edit.IsVisibleNode(node);if(!isEnabled||!isVisible)return false;return true},ValidateMinLength:function(id,minLength){var input=D2L.LP.Web.UI.Html.Dom.GetElementById(id);var isEnabledVisible=D2L.LP.Web.UI.Common.Controls.Edit.ValidateEnabledVisibleNode(input);if(!isEnabledVisible)return true;var length=input.value.trim().length; if(length===0||length>=minLength)return true;return false},ValidateRequired:function(id){var input=D2L.LP.Web.UI.Html.Dom.GetElementById(id);var isEnabledVisible=D2L.LP.Web.UI.Common.Controls.Edit.ValidateEnabledVisibleNode(input);if(!isEnabledVisible)return true;var isEmpty=input.value.trim().length===0;return!isEmpty}}; D2L.LP.Web.UI.Common.Controls.EditDecimal={TryGetDecimal:function(id,isClientSideValidationEnabled){if(isClientSideValidationEnabled===undefined)isClientSideValidationEnabled=false;var editValue=D2L.LP.Web.UI.Common.Controls.Edit.GetValue(id).trim();if(editValue=="")return null;else try{return D2L.LP.Web.UI.Common.Controls.EditDecimal.ParseNumber(editValue)}catch(e){var previousValue=D2L.LP.Web.UI.Common.Controls.EditDecimal.GetHiddenValue(id);if(isClientSideValidationEnabled){var numberStr=D2L.LP.Web.UI.Common.Controls.EditDecimal.FormatNumber(previousValue); D2L.LP.Web.UI.Common.Controls.Edit.SetValue(id,numberStr)}return previousValue}},GetHiddenValue:function(id){var hiddenId=D2L.LP.Web.UI.ObjectRepository.Get(id.GetValue(),"HiddenId");var hiddenNode=D2L.LP.Web.UI.Html.Dom.GetElementById(hiddenId.GetValue());if(hiddenNode.value=="")return null;else return hiddenNode.value},ParseNumber:function(numberStr){var number=D2L.LP.Globalization.Locale.GetNumberParser().ParseDecimal(numberStr);return number},FormatNumber:function(number){var numberStr=D2L.LP.Globalization.Locale.GetNumberFormatter().FormatDecimal(number); return numberStr},SetDecimal:function(id,number,triggerOnChange){var numberStr=D2L.LP.Web.UI.Common.Controls.EditDecimal.FormatNumber(number);D2L.LP.Web.UI.Common.Controls.Edit.SetValue(id,numberStr);if(triggerOnChange===undefined||triggerOnChange){var editNode=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());D2L.LP.Web.UI.Html.Dom.DispatchEvent("change",editNode)}else D2L.LP.Web.UI.Common.Controls.EditDecimal.UpdateHidden(id)},UpdateHidden:function(id,isClientSideValidationEnabled){var hiddenId= D2L.LP.Web.UI.ObjectRepository.Get(id.GetValue(),"HiddenId");var hiddenNode=D2L.LP.Web.UI.Html.Dom.GetElementById(hiddenId.GetValue());var value=D2L.LP.Web.UI.Common.Controls.EditDecimal.TryGetDecimal(id,isClientSideValidationEnabled);if(value==null){D2L.LP.Web.UI.Html.Dom.SetIsEnabledNode(hiddenNode,false);hiddenNode.value=""}else{D2L.LP.Web.UI.Html.Dom.SetIsEnabledNode(hiddenNode,true);hiddenNode.value=value}},ValidateDecimal:function(resolvedId){var id=new D2L.LP.Web.UI.Html.AbsoluteHtmlId(resolvedId); var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var isEnabledVisible=D2L.LP.Web.UI.Common.Controls.Edit.ValidateEnabledVisibleNode(node);if(!isEnabledVisible)return true;var editValue=D2L.LP.Web.UI.Common.Controls.Edit.GetValue(id).trim();if(editValue=="")return true;try{D2L.LP.Web.UI.Common.Controls.EditDecimal.ParseNumber(editValue);return true}catch(e){return false}},ValidateDecimalRange:function(resolvedId,min,max){var id=new D2L.LP.Web.UI.Html.AbsoluteHtmlId(resolvedId);var node= D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var isEnabledVisible=D2L.LP.Web.UI.Common.Controls.Edit.ValidateEnabledVisibleNode(node);if(!isEnabledVisible)return true;var value=D2L.LP.Web.UI.Common.Controls.EditDecimal.TryGetDecimal(id);if(value==null)return true;if(min!==null&&max!==null)return min<=value&&value<=max;else if(min!==null)return min<=value;else if(max!==null)return value<=max;else return true}}; D2L.LP.Web.UI.Common.Controls.EditUrl={Validate:function(id,allowInternal){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var isEnabledVisible=D2L.LP.Web.UI.Common.Controls.Edit.ValidateEnabledVisibleNode(node);if(!isEnabledVisible)return true;var value=D2L.LP.Web.UI.Common.Controls.Edit.GetValueNode(node);if(value===undefined||value===null||value.trim().length===0)return true;var regexpStr;if(allowInternal)regexpStr=D2L.LP.Web.UI.ObjectRepository.Get("UrlRegEx","AllowInternal");else regexpStr= D2L.LP.Web.UI.ObjectRepository.Get("UrlRegEx","NoInternal");var regexp=new RegExp(regexpStr,"i");return regexp.test(value)},Required:function(id,allowInternal){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var isEnabledVisible=D2L.LP.Web.UI.Common.Controls.Edit.ValidateEnabledVisibleNode(node);if(!isEnabledVisible)return true;var hasProtocol=D2L.LP.Web.UI.Common.Controls.EditUrl.Validate(id,allowInternal);if(!hasProtocol)return true;var value=D2L.LP.Web.UI.Common.Controls.Edit.GetValueNode(node); if(value===undefined||value===null||value.trim().length===0)return true;var regexp=new RegExp("(:|/)[a-zA-Z0-9]","i");var hasContent=regexp.test(value);if(allowInternal&&hasContent)return true;return hasContent}}; D2L.LP.Web.UI.Common.Controls.Form={BuildParams:function(id,params){var form=D2L.LP.Web.UI.Common.Controls.Form.GetForm(id);return D2L.LP.Web.UI.Common.Controls.Form.BuildParamsNode(form,params)},BuildParamsNode:function(form,params){var elements=D2L.LP.Web.UI.Common.Controls.Form.GetFormElements(form);var scopeToIgnore=D2L.LP.Web.UI.Html.Dom.GetAttribute(form,"data-scope");return D2L.LP.Web.UI.Common.Controls.Form.BuildParamsHelper(elements,params,scopeToIgnore)},GetFormElements:function(form){var elements; var isNested=D2L.LP.Web.UI.Common.Controls.Form.IsNestedForm(form);if(isNested){var pageForm=D2L.LP.Web.UI.Html.Dom.GetParentElementByClassName("d2l-form-primary",form);var pageFormElements=pageForm.elements;elements=[];for(var i=0;i<pageFormElements.length;i++){var pageFormElement=pageFormElements[i];if(D2L.LP.Web.UI.Html.Dom.IsAncestor(form,pageFormElement))elements.push(pageFormElement)}}else elements=form.elements;return elements},BuildParamsHelper:function(elements,params,scopeToIgnore){if(params=== undefined||params===null)params={};for(var key in params)if(params[key]===null)delete params[key];for(var i=0;i<elements.length;i++){var element=elements[i];if(element.name!==undefined&&element.name!=""&&element.disabled==false&&!(element.tagName.toLowerCase()=="input"&&(element.type=="radio"||element.type=="checkbox")&&element.checked==false)){var elemName=element.name;if(scopeToIgnore&&scopeToIgnore!="")elemName=elemName.replace(scopeToIgnore,"");if(params[elemName]!==undefined)if(D2L.LP.Web.UI.Html.JavaScript.IsArray(params[elemName]))params[elemName].push(element.value); else params[elemName]=[params[elemName],element.value];else params[elemName]=element.value}}return params},ClearChanges:function(id){var form=D2L.LP.Web.UI.Common.Controls.Form.GetForm(id);D2L.LP.Web.UI.Html.ChangeTracking.Tracker.TriggerReset(form)},FinishSubmit:function(form){var params=D2L.LP.Web.UI.Common.Controls.Form.BuildParamsNode(form,null);var location=D2L.LP.Web.UI.Html.Dom.GetAttribute(form,"data-location");var method=D2L.LP.Web.UI.Html.Dom.GetAttribute(form,"data-method");var target= D2L.LP.Web.UI.Html.Dom.GetAttribute(form,"data-target");var newForm=document.createElement("form");newForm.className="d2l-hidden";D2L.LP.Web.UI.Html.Dom.SetAttribute(newForm,"action",location);D2L.LP.Web.UI.Html.Dom.SetAttribute(newForm,"method",method);if(target)D2L.LP.Web.UI.Html.Dom.SetAttribute(newForm,"target",target);D2L.LP.Web.UI.Html.Dom.SetAttribute(newForm,"enctype","application/x-www-form-urlencoded");newForm.onsubmit="return false;";var CreateAndAddHidden=function(name,val){var hidden= document.createElement("input");hidden.type="hidden";hidden.name=name;hidden.value=val;newForm.appendChild(hidden)};CreateAndAddHidden(D2L.LP.Web.Authentication.Xsrf.GetXsrfTokenParameterName(),D2L.LP.Web.Authentication.Xsrf.GetXsrfToken());for(var key in params){var value=params[key];if(D2L.LP.Web.UI.Html.JavaScript.IsArray(value))for(var i=0;i<value.length;i++)CreateAndAddHidden(key,value[i]);else CreateAndAddHidden(key,value)}document.body.appendChild(newForm);newForm.submit();newForm.parentNode.removeChild(newForm)}, ClearValidation:function(id){var form=D2L.LP.Web.UI.Common.Controls.Form.GetForm(id);D2L.LP.Web.UI.Common.Controls.MessageArea.Reset(form)},DoSubmit:function(form,submitFunc){form.m_stopChangeTrackingPrompt=true;var parentForms=D2L.LP.Web.UI.Html.Dom.GetParentElementsByClassName("d2l-form",form);for(var i=0;i<parentForms.length;i++)parentForms[i].m_stopChangeTrackingPrompt=true;D2L.LP.Web.UI.Common.Controls.Form.OnBeforeSubmit.Trigger(form);D2L.LP.Web.UI.Common.Controls.MessageArea.Reset(form);var evt= new D2L.LP.Web.UI.Events.Event;evt.AddListener(function(){form.m_stopChangeTrackingPrompt=false;form.m_skipValidation=false;for(var i=0;i<parentForms.length;i++)parentForms[i].m_stopChangeTrackingPrompt=false});if(submitFunc===undefined)submitFunc=function(evt2){var hasAction=D2L.LP.Web.UI.Html.Dom.HasAttribute(form,"data-location");var submit=D2L.LP.Web.UI.ObjectRepository.TryGet(form.id,"submit");var handleRet=function(retVal){if(retVal===true||retVal===false)evt2.Trigger(retVal);else if(retVal!== undefined&&retVal.AddListener!==undefined)retVal.AddListener(handleRet);else evt2.Trigger(true)};if(submit!==null){var ret=submit.call(submit);if(ret===undefined)ret=true;handleRet(ret)}else if(hasAction){form.m_skipValidation=false;D2L.LP.Web.UI.Common.Controls.Form.FinishSubmit(form);setTimeout(function(){evt2.Trigger(true)})}};var validators=D2L.LP.Web.UI.Common.Controls.Form.GetValidators(form);if(validators.length>0&&!form.m_skipValidation)D2L.LP.Web.UI.Common.Controls.Form.Validate(form,validators).AddListener(function(passed){if(passed){form.m_skipValidation= true;submitFunc(evt)}else evt.Trigger(false)});else{form.m_skipValidation=false;submitFunc(evt)}return evt},GetForm:function(id){var form=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(form===null)throw"Form not found: '"+id.GetValue()+"'.";return form},GetLocation:function(id){var form=D2L.LP.Web.UI.Common.Controls.Form.GetForm(id);var loc=D2L.LP.Web.UI.Html.Dom.GetAttribute(form,"data-location");if(loc)return new D2L.LP.Web.Http.UrlLocation(loc);else return null},GetRpcVerb:function(form){var verb= D2L.LP.Web.UI.Rpc.Verbs.POST;var method=D2L.LP.Web.UI.Html.Dom.GetAttribute(form,"data-method");if(method==="get")verb=D2L.LP.Web.UI.Rpc.Verbs.GET;return verb},GetValidators:function(form){var allForms=[];allForms.push(form);allForms=allForms.concat(D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-form",form));var validators=[];for(var i=0;i<allForms.length;i++){var formNode=allForms[i];if(formNode.d2l_validators!==undefined)for(var j=0;j<formNode.d2l_validators.length;j++)validators.push(formNode.d2l_validators[j]())}return validators}, HasChanged:function(id){var form=D2L.LP.Web.UI.Common.Controls.Form.GetForm(id);return D2L.LP.Web.UI.Common.Controls.Form.HasChangedNode(form)},HasChangedNode:function(node){return D2L.LP.Web.UI.Html.ChangeTracking.Tracker.ContainsChanges(node)},IsNestedForm:function(formNode){return D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-form-nested",formNode)},RpcObjectSubmit:function(id,loc,skipValidation,params){var form=D2L.LP.Web.UI.Common.Controls.Form.GetForm(id);form.m_skipValidation=skipValidation;var evt= new D2L.LP.Web.UI.Events.Event;var submitFunc=function(evt2){params=D2L.LP.Web.UI.Common.Controls.Form.BuildParams(id,params);var rpcEvt=D2L.LP.Web.UI.Rpc.ConnectObject(D2L.LP.Web.UI.Common.Controls.Form.GetRpcVerb(form),loc,params);rpcEvt.AddListener(function(val){evt.Trigger(val);evt2.Trigger()})};var doSubmitEvt=D2L.LP.Web.UI.Common.Controls.Form.DoSubmit(form,submitFunc);doSubmitEvt.AddListener(function(pass){if(!pass)setTimeout(function(){evt.Release()},50)});return evt},RpcSubmit:function(id, location,skipValidation,params,options){if(skipValidation===undefined||skipValidation===null)skipValidation=false;var submitFunc=function(evt){params=D2L.LP.Web.UI.Common.Controls.Form.BuildParams(id,params);var rpcEvt=D2L.LP.Web.UI.Rpc.Connect(D2L.LP.Web.UI.Common.Controls.Form.GetRpcVerb(form),location,params,options);rpcEvt.AddListener(function(pass){evt.Trigger(pass)})};var form=D2L.LP.Web.UI.Common.Controls.Form.GetForm(id);form.m_skipValidation=skipValidation;var submitRet=D2L.LP.Web.UI.Common.Controls.Form.DoSubmit(form, submitFunc);return submitRet},RpcSubmitPartial:function(placeholderId,id,location,skipValidation,params,options){if(skipValidation===undefined||skipValidation===null)skipValidation=false;if(options===undefined||options===null)options={};if(params===undefined||params===null)params={};var ret=new D2L.LP.Web.UI.Events.Event;params["_d2l_prc"]=D2L.LP.Web.UI.Html.PartialRendering.GetPartialRenderContext(placeholderId.GetValue());var functions={success:function(result){ret.Trigger(result);if(result&&options.success)options.success.call(options.success); if(!result&&options.failure!==undefined)options.failure.call(options.failure)},failure:function(){ret.Trigger(false);if(options.failure!==undefined)options.failure.call(options.failure)}};var evt;evt=D2L.LP.Web.UI.Common.Controls.Form.RpcSubmit(id,location,skipValidation,params,functions);evt.AddListener(function(success){if(!success)ret.Trigger(false)});return ret},SetLocation:function(id,location){var form=D2L.LP.Web.UI.Common.Controls.Form.GetForm(id);D2L.LP.Web.UI.Html.Dom.SetAttribute(form,"data-location", location.GetUrl())},StopChangeTracking:function(id){var form=D2L.LP.Web.UI.Common.Controls.Form.GetForm(id);form.m_stopChangeTrackingPrompt=true},Submit:function(id,skipValidation){if(skipValidation===undefined||skipValidation===null)skipValidation=false;var form=D2L.LP.Web.UI.Common.Controls.Form.GetForm(id);form.m_skipValidation=skipValidation;return D2L.LP.Web.UI.Common.Controls.Form.DoSubmit(form)},SubmitByButton:function(buttonId){var submitButton=D2L.LP.Web.UI.Html.Dom.GetElementById(buttonId.GetValue()); var form=D2L.LP.Web.UI.Html.Dom.GetParentElementByClassName("d2l-form",submitButton);if(form)return D2L.LP.Web.UI.Common.Controls.Form.DoSubmit(form)},SubmitToIFrame:function(id,iframeId,location){var form=D2L.LP.Web.UI.Common.Controls.Form.GetForm(id);var iframe=D2L.LP.Web.UI.Html.Dom.GetElementById(iframeId);return D2L.LP.Web.UI.Common.Controls.Form.SubmitToIFrameHelper(form,iframe,location)},SubmitToIFrameHelper:function(form,iframe,location){var oldAction=D2L.LP.Web.UI.Html.Dom.GetAttribute(form, "data-location");var oldTarget=D2L.LP.Web.UI.Html.Dom.GetAttribute(form,"data-target");D2L.LP.Web.UI.Html.Dom.SetAttribute(form,"data-location",location.GetUrl());D2L.LP.Web.UI.Html.Dom.SetAttribute(form,"data-target",iframe.name);var evt=D2L.LP.Web.UI.Common.Controls.Form.DoSubmit(form);evt.AddListener(function(){if(oldAction===null)D2L.LP.Web.UI.Html.Dom.RemoveAttribute(form,"data-location");else D2L.LP.Web.UI.Html.Dom.SetAttribute(form,"data-location",oldAction);if(oldTarget===null)D2L.LP.Web.UI.Html.Dom.RemoveAttribute(form, "data-target");else D2L.LP.Web.UI.Html.Dom.SetAttribute(form,"data-target",oldTarget)});return evt},SubmitToDialog:function(id,dialogOpenerId,dialogLocation,dialogSettings){var form=D2L.LP.Web.UI.Common.Controls.Form.GetForm(id);return D2L.LP.Web.UI.Desktop.MasterPages.Dialog.OpenSubmit(form,dialogOpenerId,dialogLocation,dialogSettings)},ValidateById:function(formId){var evt=new D2L.LP.Web.UI.Events.Event;var form=D2L.LP.Web.UI.Html.Dom.GetElementById(formId.GetValue());var validators=D2L.LP.Web.UI.Common.Controls.Form.GetValidators(form); D2L.LP.Web.UI.Common.Controls.Form.Validate(form,validators).AddListener(function(passed){if(passed)evt.Trigger(true);else evt.Trigger(false)});return evt}};D2L.LP.Web.UI.Common.Controls.Form.OnBeforeSubmit=new D2L.LP.Web.UI.Events.Event; D2L.LP.Web.UI.Common.Controls.Hidden={GetValue:function(id,defaultValue){var noThrow=defaultValue!==undefined;var node=D2L.LP.Web.UI.Common.Controls.Hidden.Get(id,noThrow);if(node===null)return defaultValue;var value=node.value;return value},Get:function(id,noThrow){var hidden=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(hidden===null){if(noThrow)return null;throw"Hidden not found: '"+id.GetValue()+"'.";}return hidden},SetValue:function(id,value){D2L.LP.Web.UI.Common.Controls.Hidden.SetValueNode(D2L.LP.Web.UI.Common.Controls.Hidden.Get(id), value)},SetValueNode:function(node,value){var oldValue=node.value;node.value=value;if(node.classList.contains("d2l-hidden-track")&&oldValue!=value)node.dispatchEvent(new CustomEvent("change",{composed:true,bubbles:true}))}};D2L.LP.Web.UI.Common.Controls.HtmlBlock={OnAfterRender:new D2L.LP.Web.UI.Events.Event,SetHtml:function(id,val){var idVal=id.GetValue();var node=D2L.LP.Web.UI.Html.Dom.GetElementById(idVal);if(node===null)throw"HtmlBlock not found '"+idVal+"'.";node.innerHTML=val}}; D2L.LP.Web.UI.Common.Controls.IFrame={SetLoaded:function(id){var iframe=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());iframe.m_loaded=true},AddOnLoadHandler:function(iframe,handler){if(iframe.m_loaded)handler();else D2L.LP.Web.UI.Html.Dom.AddEventListener("load",iframe,handler)},SetLocation:function(id,location){var $frame=id.$();var loadingIcon=$frame.prev(".d2l-iframe-loading-container");loadingIcon.show();$frame.hide().load(function(){loadingIcon.hide();$frame.show()}).attr("src",location.GetUrl())}, GetNextGeneratedId:function(){var id=10;return function(){return id++}}()}; D2L.LP.Web.UI.Common.Controls.ImageLink={SetTitle:function(id,title){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(node!==null){node.title=title;var titleNode=node.firstChild;while(titleNode.childNodes.length>0)titleNode.removeChild(titleNode.childNodes[0]);titleNode.appendChild(document.createTextNode(title))}},SetImage:function(id,src,width,height){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(node!==null){node.style.backgroundImage="url("+src+")";if(width!== 0)node.style.width=width+"px";if(height!==0)node.style.height=height+"px"}},AddOnClick:function(id,onclick){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(node===null)return;D2L.LP.Web.UI.Html.Aria.SetRole(node,"button");D2L.LP.Web.UI.Html.Dom.SetAttribute(node,"onclick","return false;");D2L.LP.Web.UI.Html.Dom.AddEventListener("click",node,function(){if(D2L.LP.Web.UI.Common.Controls.ImageLink.IsEnabledNode(node))onclick()})},AddOnFocus:function(id,onFocus){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue()); if(node===null)return;D2L.LP.Web.UI.Html.Dom.AddEventListener("focus",node,onFocus)},AddOnBlur:function(id,onBlur){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(node===null)return;D2L.LP.Web.UI.Html.Dom.AddEventListener("blur",node,onBlur)},IsEnabledNode:function(node){return!D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-imagelink-disabled",node)},IsEnabled:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());return D2L.LP.Web.UI.Common.Controls.ImageLink.IsEnabledNode(node)}, SetIsEnabled:function(id,isEnabled){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());D2L.LP.Web.UI.Common.Controls.ImageLink.SetIsEnabledNode(node,isEnabled)},SetIsEnabledNode:function(node,isEnabled){var isDisabled=!D2L.LP.Web.UI.Common.Controls.ImageLink.IsEnabledNode(node);if(!isEnabled==isDisabled)return;D2L.LP.Web.UI.Html.Aria.SetAttribute(node,"disabled",!isEnabled);var hoverClassName=D2L.LP.Web.UI.Html.Dom.GetAttribute(node,"data-hoverClassName");if(isEnabled){D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-imagelink-disabled", node);if(hoverClassName)D2L.LP.Web.UI.Html.Dom.AddClassName(hoverClassName,node);D2L.LP.Web.UI.Html.Aria.SetAttribute(node,"disabled","false")}else{D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-imagelink-disabled",node);if(hoverClassName)D2L.LP.Web.UI.Html.Dom.RemoveClassName(hoverClassName,node);D2L.LP.Web.UI.Html.Aria.SetAttribute(node,"disabled","true")}var hasHref=D2L.LP.Web.UI.Html.Dom.HasAttribute(node,isEnabled?"data-href":"href");if(!hasHref)return;var href=D2L.LP.Web.UI.Html.Dom.GetAttribute(node, isEnabled?"data-href":"href");D2L.LP.Web.UI.Html.Dom.SetAttribute(node,isEnabled?"href":"data-href",href);D2L.LP.Web.UI.Html.Dom.RemoveAttribute(node,isEnabled?"data-href":"href")}}; D2L.LP.Web.UI.Common.Controls.Link={InstallClickable:function(node){node.tabIndex=0;var handleEnter=function(){D2L.LP.Web.UI.Html.Dom.DispatchEvent("click",node)};D2L.LP.Web.UI.Html.Dom.AddKeyPressEventListener(node,function(key){if(key.GetKey()==D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.Enter)handleEnter()})},SetText:function(id,text){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(!node)return;while(node.firstChild)node.removeChild(node.firstChild);node.appendChild(document.createTextNode(text))}}; D2L.LP.Web.UI.Common.Controls.SelectList={GetInput:function(id,noThrow){var input=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(!noThrow&&input===null)throw"SelectList not found: '"+id.GetValue()+"'.";return input},GetSelectedValue:function(id,defaultValue){var noThrow=defaultValue!==undefined;var input=D2L.LP.Web.UI.Common.Controls.SelectList.GetInput(id,noThrow);if(input===null)return defaultValue;var option=input.options[input.selectedIndex];return option.value},GetValues:function(id){var input= D2L.LP.Web.UI.Common.Controls.SelectList.GetInput(id);var values=[];for(var i=0;i<input.options.length;i++)values.push(input.options[i].value);return values},SetIsVisibleFunction:function(id,isVisible){var node=D2L.LP.Web.UI.Common.Controls.SelectList.GetInput(id);var container=D2L.LP.Web.UI.Html.Dom.GetParentElementByClassName("d2l-select-container",node);D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(container,isVisible)},SetSelectedValue:function(id,value){var input=D2L.LP.Web.UI.Common.Controls.SelectList.GetInput(id); for(var i=0;i<input.options.length;i++)if(input.options[i].value===value){input.selectedIndex=i;break}},Focus:function(id){var input=D2L.LP.Web.UI.Common.Controls.SelectList.GetInput(id);input.focus()},ValidateRequired:function(id){var input=D2L.LP.Web.UI.Common.Controls.SelectList.GetInput(id);if(input.options.length===0)return false;var option=input.options[input.selectedIndex];if(D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-selectlist-nonselectable",option))return false;return true},GetSelectedText:function(id, defaultValue){var noThrow=defaultValue!==undefined;var input=D2L.LP.Web.UI.Common.Controls.SelectList.GetInput(id,noThrow);if(input===null)return defaultValue;var option=input.options[input.selectedIndex];if(option===null)return defaultValue;return option.text}}; D2L.LP.Web.UI.Desktop.MasterPages.Dialog={NumOfDialogs:0,Offset:20,AdaptPageToDialog:function(handle){var me=D2L.LP.Web.UI.Desktop.MasterPages.Dialog;var doc=handle.frame.contentWindow.document;var pageHeader=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-page-header",handle.container);if(pageHeader===null)return;var close=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-dialog-close",handle.container);if(close!==null)return;close=doc.createElement("a");close.className="d2l-dialog-close vui-outline"; me.InitClose(close,handle.frame.contentWindow);pageHeader.insertBefore(close,pageHeader.childNodes[1])},FreeRangeAppIFramePlugin:function(loadModulesFunction){return function(host){var getContextInfo=function(){var iframe=host.iframe;if(!iframe)return;var rect=iframe.getBoundingClientRect();var availableHeight=window.innerHeight;if(rect.top>0)availableHeight-=rect.top;if(availableHeight>rect.height)availableHeight=rect.height;return{availableHeight:availableHeight,top:rect.top}};var service={showBackdrop:function(){var iframe= host.iframe;if(!iframe)return;loadModulesFunction().AddListener(function(){if(!iframe.id)iframe.id=(new D2L.LP.Web.UI.Html.UniqueHtmlId).GetValue();var backdrop=iframe.parentNode.querySelector('d2l-backdrop[for-target="'+iframe.id+'"]');if(!backdrop){backdrop=document.createElement("d2l-backdrop");backdrop.setAttribute("for-target",iframe.id);iframe.parentNode.appendChild(backdrop)}backdrop.setAttribute("shown","shown");iframe.setAttribute("data-d2l-backdrop-position",iframe.style.position);iframe.setAttribute("data-d2l-backdrop-z-index", iframe.style.zIndex);iframe.style.position="relative";iframe.style.zIndex="1000"});return getContextInfo()},hideBackdrop:function(){var iframe=host.iframe;if(!iframe)return;var backdrop=iframe.parentNode.querySelector('d2l-backdrop[for-target="'+iframe.id+'"]');if(!backdrop)return;backdrop.removeAttribute("shown");iframe.style.position=iframe.getAttribute("d2l-backdrop-position");iframe.style.zIndex=iframe.getAttribute("d2l-backdrop-z-index");iframe.removeAttribute("data-d2l-backdrop-position");iframe.removeAttribute("data-d2l-backdrop-z-index")}}; host.registerService("dialogWC","0.1",service)}},InitClose:function(node,nodeWin){D2L.LP.Web.UI.Html.Aria.SetRole(node,"button");D2L.LP.Web.UI.Html.Dom.SetAttribute(node,"href","javascript:void(0);");if(!D2L.LP.Web.UI.Html.Dom.HasAttribute(node,"onclick")){D2L.LP.Web.UI.Html.Dom.SetAttribute(node,"onclick","return false;");D2L.LP.Web.UI.Html.Dom.AddEventListener("click",node,function(){D2L.LP.Web.UI.Desktop.MasterPages.Dialog.Abort(nodeWin)})}},InitResize:function(node,nodeWin){var me=D2L.LP.Web.UI.Desktop.MasterPages.Dialog; var handle=me.GetHandle(nodeWin);var settings={Handle:node,DisplayType:"none",GhostType:D2L.LP.Web.UI.Html.DragDrop.GhostType.OriginalShadow};var evt=D2L.LP.Web.UI.Html.DragDrop.MakeResizeableNode(handle.dialog,settings,nodeWin,handle.rootWin);evt.AddListener(function(size){handle.isResized=true;var handlePositionOffset=8;var dialogPadding=me.computeDialogPadding(handle.dialog);if(dialogPadding){handlePositionOffset+=dialogPadding.bottom;handlePositionOffset+=document.dir==="rtl"?dialogPadding.left: dialogPadding.right}me.SetSize(handle,size.width-handlePositionOffset,size.height-handlePositionOffset)});D2L.LP.Web.UI.Events.OnSizingFinished.AddListener(function(){if(!handle||!handle.container||!handle.body)return;var rectBody=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(handle.body);handle.bodyDiff=handle.height-rectBody.height;me.SetSize(handle,handle.width,handle.height)});D2L.LP.Web.UI.Events.OnViewRender.AddListener(function(partialNode){if(!handle||!handle.nodes.footer||!handle.container||!handle.body)return; if(partialNode.nodeType!==1)return;if(!D2L.LP.Web.UI.Html.Dom.IsAncestor(handle.nodes.footer,partialNode))return;var rect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(handle.container);var height=rect.height;if(handle.height>=height)return;var footerRect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(handle.nodes.footer);height+=footerRect.height;if(handle.height===height)return;handle.height=height;var rectBody=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(handle.body);handle.bodyDiff=handle.height-rectBody.height;me.SetSize(handle, handle.width,handle.height)})},InitTitle:function(node,nodeWin){var closeNode=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-dialog-close",node)[0];var handle=D2L.LP.Web.UI.Desktop.MasterPages.Dialog.GetHandle(nodeWin);D2L.LP.Web.UI.Desktop.MasterPages.Dialog.InitTitleHelper(handle,handle.dialog,node,closeNode,nodeWin,handle.rootWin)},InitTitleHelper:function(handle,dialogNode,titleNode,closeNode,nodeWin,win){var dragSettings=new D2L.LP.Web.UI.Html.DragDrop.DraggableSettings;dragSettings.SetHandle(titleNode); dragSettings.SetIsDelayed(false);dragSettings.SetDragDropEffect(D2L.LP.Web.UI.Html.DragDrop.DragDropEffect.Move);if(closeNode)dragSettings.AddHandleException(closeNode);dragSettings.SetGhostType(D2L.LP.Web.UI.Html.DragDrop.GhostType.OriginalShadow);dragSettings.GetDragStartEvent().AddListener(function(){handle.isDragged=true});dragSettings.SetIsAutoScroll(false);D2L.LP.Web.UI.Html.DragDrop.MakeDraggableNode(dialogNode,dragSettings,nodeWin,win)},IsIos:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&& !window.MSStream},SetWidth:function(width){var me=D2L.LP.Web.UI.Desktop.MasterPages.Dialog;var handle=me.GetHandle();width=Math.max(width,400);handle.width=width;handle.dialog.style.width=width+"px";handle.setWidthCalled=true;if(handle.container!==null)handle.container.style.width=width-2+"px";if(handle.frame!==null)handle.frame.style.width=width-2+"px";handle.onresize();handle.dialog.OnResize.Trigger()},SetHeight:function(height){var me=D2L.LP.Web.UI.Desktop.MasterPages.Dialog;var handle=me.GetHandle(); handle.height=height;handle.dialog.style.height=height+"px";if(handle.inner!==null)handle.inner.style.height=height-2+"px";if(handle.frame!==null)handle.frame.style.height=height-2+"px";if(handle.body!==null&&handle.nodes.footer!==null){var footerSize=handle.nodes.footer.offsetHeight;handle.body.style.height=height-3-handle.bodyDiff-footerSize+"px"}handle.onresize();handle.dialog.OnResize.Trigger()},SetHeading:function(title){var me=D2L.LP.Web.UI.Desktop.MasterPages.Dialog;var handle=me.GetHandle(); handle.nodes.heading.textContent=title},SetSize:function(handle,width,height,ignoreDefaultMinSize){var me=D2L.LP.Web.UI.Desktop.MasterPages.Dialog,dialogPaddingLeftRight=0,dialogPaddingTopBottom=0;var padding=me.computeDialogPadding(handle.dialog);if(padding){dialogPaddingLeftRight+=padding.left+padding.right;dialogPaddingTopBottom+=padding.top+padding.bottom}if(ignoreDefaultMinSize!==true){width=me.GetMinWidth(handle,width);height=me.GetMinHeight(handle,height)}handle.width=width;handle.height=height; handle.dialog.style.width=width+dialogPaddingLeftRight*2+"px";handle.dialog.style.height=height+dialogPaddingTopBottom*2+"px";if(handle.container!==null)handle.container.style.width=width-2+"px";if(handle.inner!==null)handle.inner.style.height=height-2+"px";if(handle.frame!==null){handle.frame.style.width=width-2+"px";handle.frame.style.height=height-2+"px"}if(handle.body!==null&&handle.nodes.footer!==null){var footerSize=handle.nodes.footer.offsetHeight;handle.body.style.height=height-3-handle.bodyDiff- footerSize+"px";handle.dialog.OnResize.Trigger()}if(handle.setWidthCalled)return;clearTimeout(handle.heightTimeout);handle.heightTimeout=setTimeout(function(){if(handle.body===null||handle.nodes.title===null||handle.nodes.footer===null)return;var headerPlusFooterHeight=handle.nodes.title.offsetHeight+handle.nodes.footer.offsetHeight;var newBodyHeight=parseInt(height-headerPlusFooterHeight);handle.body.style.height=newBodyHeight+"px";handle.dialog.OnResize.Trigger()},0)},GetMinWidth:function(handle, width){var minWidth=400;if(handle.container){var dataMinWidth=D2L.LP.Web.UI.Html.Dom.GetAttribute(handle.container,"data-min-width");if(dataMinWidth!==null)minWidth=parseInt(dataMinWidth)}return Math.max(width,minWidth)},GetMinHeight:function(handle,height){var minHeight=400;if(handle.container){var dataMinHeight=D2L.LP.Web.UI.Html.Dom.GetAttribute(handle.container,"data-min-height");if(dataMinHeight!==null)minHeight=parseInt(dataMinHeight)}return Math.max(height,minHeight)},ComputeDialogWidthHeightFromPreferred:function(settings, viewportDimensions){var minTotalHorizontalMargin=2*settings.PreferredSize.MinHorizontalMargin;var minTotalVerticalMargin=2*settings.PreferredSize.MinVerticalMargin;settings.Width=settings.PreferredSize.PreferredWidth;settings.Height=settings.PreferredSize.PreferredHeight;if(settings.PreferredSize.PreferredWidth+minTotalHorizontalMargin>viewportDimensions.width)settings.Width=viewportDimensions.width-minTotalHorizontalMargin;if(settings.PreferredSize.PreferredHeight+minTotalVerticalMargin>viewportDimensions.height)settings.Height= viewportDimensions.height-minTotalVerticalMargin},Build:function(handle,form,location,settings){var me=D2L.LP.Web.UI.Desktop.MasterPages.Dialog;if(settings.PreferredSize!=null)me.ComputeDialogWidthHeightFromPreferred(settings,D2L.LP.Web.UI.Html.Dom.GetViewportSize(handle.rootWin));handle.width=settings.Width?settings.Width:400;handle.height=settings.Height?settings.Height:300;var dialogHeight=handle.height;var loadedOnce=false;var adjustSize=function(){var scroll=D2L.LP.Web.UI.Html.Dom.GetScrollPosition(handle.rootWin); handle.dialog.style.top=scroll.top+50+handle.rootWin.D2L.LP.Web.UI.Desktop.MasterPages.Dialog.NumOfDialogs*handle.rootWin.D2L.LP.Web.UI.Common.MasterPages.Dialog.Offset+"px";me.SetSize(handle,handle.width,handle.height)};handle.dialog=handle.rootWin.document.createElement("div");handle.dialog.OnResize=new D2L.LP.Web.UI.Events.Event;handle.dialog.className="d2l-dialog d2l-dialog-mvc d2l-dialog-loading";handle.dialog.d2l_handle=handle;handle.firstLoadEvent=new D2L.LP.Web.UI.Events.Event;handle.inner= handle.rootWin.document.createElement("div");handle.inner.className="d2l-dialog-inner";handle.dialog.appendChild(handle.inner);var frameId=(new D2L.LP.Web.UI.Html.UniqueHtmlId).GetValue();handle.inner.innerHTML="<iframe src='/d2l/tools/blank.html' name='"+frameId+"' allowfullscreen allow='microphone *; camera *'></iframe>";handle.frame=handle.inner.firstChild;handle.frame.frameBorder="0";handle.frame.scrolling="no";handle.frame.className="d2l-dialog-frame d2l-dialog-frame-loading";handle.loadingSpinner= handle.rootWin.document.createElement("div");handle.loadingSpinner.className="d2l-dialog-loading-spinner";var spinner=handle.rootWin.document.createElement("d2l-loading-spinner");spinner.setAttribute("size","120");handle.loadingSpinner.appendChild(spinner);handle.inner.appendChild(handle.loadingSpinner);handle.onresize=function(){if(handle.isDragged)return;var viewport=D2L.LP.Web.UI.Html.Dom.GetViewportSize(handle.rootWin);var left=Math.max(viewport.width/2-handle.width/2,0);handle.dialog.style.left= left+handle.rootWin.D2L.LP.Web.UI.Desktop.MasterPages.Dialog.NumOfDialogs*handle.rootWin.D2L.LP.Web.UI.Common.MasterPages.Dialog.Offset+"px";if(handle.container)if(viewport.width<767){handle.container.classList.add("d2l-dialog-resizehandle-hide");var padding=me.computeDialogPadding(handle.dialog);var paddingTopBottom=0,paddingLeftRight=0;if(padding){paddingTopBottom+=padding.top+padding.bottom;paddingLeftRight+=padding.left+padding.right}handle.frame.style.width=viewport.width-paddingLeftRight+"px"; handle.frame.style.height=viewport.height-paddingTopBottom+"px"}else{D2L.LP.Web.UI.Desktop.MasterPages.Dialog.SetSize(handle,handle.width,handle.height);handle.container.classList.remove("d2l-dialog-resizehandle-hide")}};D2L.LP.Web.UI.Events.OnResize.AddListener(handle.onresize);D2L.LP.Web.UI.Html.Dom.AddEventListener("load",handle.frame,function(){if(!loadedOnce){loadedOnce=true;handle.firstLoadEvent.Trigger();return}if(handle.inner.contains(handle.loadingSpinner))handle.inner.removeChild(handle.loadingSpinner); handle.frame.contentDocument.body.classList.add("d2l-dialog-document-body");handle.frame.contentDocument.body.classList.add("d2l-dialog-mvc");handle.container=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-dialog-width",handle.frame.contentWindow.document);handle.body=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-dialog-body",handle.container);if(handle.body===null)handle.body=handle.container;handle.nodes.title=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-dialog-title", handle.container);handle.nodes.heading=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-heading",handle.nodes.title);handle.nodes.footer=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-dialog-footer-container",handle.container);if(settings.Onload!==undefined)settings.Onload.call(settings.Onload,handle);if(handle.container!==null){var rect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(handle.container);dialogHeight=rect.height;if(!handle.setWidthCalled&&settings.PreferredSize==null)handle.width= rect.width;handle.container.classList.add("d2l-dialog-flex");handle.frame.style.overflow="hidden"}else{handle.frame.style.overflow="scroll";handle.container=handle.frame.contentWindow.document.body;me.AdaptPageToDialog(handle)}if(handle.frame.contentWindow.D2L!==undefined){handle.frame.contentWindow.D2L.LP.Web.UI.Events.OnContentHeightChange.AddListener(function(newHeight){var desiredGrowth=newHeight+handle.bodyDiff-handle.height;if(handle.isResized||desiredGrowth<0)return;var rect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(handle.dialog); var scroll=D2L.LP.Web.UI.Html.Dom.GetScrollPosition(handle.rootWin);var viewport=D2L.LP.Web.UI.Html.Dom.GetViewportSize(handle.rootWin);var top=Math.max(rect.top-scroll.top,0);var roomToGrow=viewport.height-top-rect.height;newHeight=handle.height+Math.min(desiredGrowth,roomToGrow);me.SetSize(handle,handle.width,newHeight)});if(settings.Height===undefined){var h=D2L.LP.Web.UI.Html.Dom.GetAttribute(handle.container,"data-height");if(h!==null)handle.height=parseInt(h);else if(handle.nodes.footer!==null){var viewport= D2L.LP.Web.UI.Html.Dom.GetViewportSize(handle.rootWin);handle.height=Math.max(Math.min(dialogHeight+handle.nodes.footer.offsetHeight+10,viewport.height-100),200)}}if(handle.settings.AutoClose){handle.ondocumentclick=function(){handle.frame.contentWindow.D2L.LP.Web.UI.Desktop.MasterPages.Dialog.Close()};D2L.LP.Web.UI.Events.OnClick.AddListener(handle.ondocumentclick)}}setTimeout(function(){if(handle.body){var rectBody=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(handle.body);handle.bodyDiff=dialogHeight- rectBody.height;adjustSize();handle.onresize()}},0);handle.frame.contentWindow.document.body.style.overflow="hidden";D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-dialog-loading",handle.dialog);D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-dialog-frame-loading",handle.frame);me.Focus(handle.container,handle.frame.contentWindow)});adjustSize();handle.onresize();if(form===null)handle.firstLoadEvent.AddListener(function(){var frameLocation=location.GetUrl();try{handle.frame.contentWindow.location=frameLocation}catch(e){handle.frame.src= frameLocation}});handle.inner.appendChild(handle.frame)},Abort:function(win){D2L.LP.Web.UI.Desktop.MasterPages.Dialog.CloseHelper(false,undefined,win)},AbortExternal:function(){parent.D2L.LP.Web.UI.Desktop.MasterPages.Dialog.CloseHelper(false,undefined)},Close:function(result){D2L.LP.Web.UI.Desktop.MasterPages.Dialog.CloseHelper(true,result)},CloseExternal:function(result){parent.D2L.LP.Web.UI.Desktop.MasterPages.Dialog.CloseHelper(true,result)},CloseHelper:function(doTrigger,result,win){var handle= D2L.LP.Web.UI.Desktop.MasterPages.Dialog.GetHandle(win);if(handle===null)return result;D2L.LP.Web.UI.Desktop.MasterPages.Dialog.CloseHelperWithHandle(doTrigger,true,result,handle)},CloseHelperWithHandleAfterAnimation:function(doFocus,handle){var closingAnimation=function(){handle.dialog.removeEventListener("animationend",closingAnimation,false);handle.dialog.removeEventListener("webkitAnimationEnd",closingAnimation,false);handle.dialog.style.display="none";D2L.LP.Web.UI.Desktop.MasterPages.Dialog.CloseHelperForFocusSwitch(handle, doFocus)};handle.dialog.addEventListener("animationend",closingAnimation,false);handle.dialog.addEventListener("webkitAnimationEnd",closingAnimation,false);handle.dialog.classList.add("d2l-dialog-closing")},CloseHelperWithHandle:function(doTrigger,doFocus,result,handle){if(handle.m_isClosed)return;if(handle.onresize!==null)handle.win.D2L.LP.Web.UI.Events.OnResize.RemoveListener(handle.onresize);if(handle.ondocumentclick!==null)handle.win.D2L.LP.Web.UI.Events.OnClick.RemoveListener(handle.ondocumentclick); if(handle.shim!==null&&handle.settings.ShimType>0)D2L.LP.Web.UI.Desktop.Controls.Shim.Delete(handle.shim);if(handle.settings.byPassOpenerFocus)doFocus=false;if(doTrigger)handle.evt.Trigger(result);else if(handle.m_forceTriggerOnCancel)handle.evt.Trigger({});else handle.evt.Release();if(handle.rootWin.D2L.LP.Web.UI.Desktop.MasterPages.Dialog.NumOfDialogs<2){handle.rootWin.document.documentElement.classList.remove("d2l-dialog-open");handle.rootWin.document.documentElement.classList.remove("d2l-dialog-open-ios")}setTimeout(function(){handle.rootWin.D2L.LP.Web.UI.Desktop.MasterPages.Dialog.CloseHelperWithHandleAfterAnimation(doFocus, handle);if(D2L&&D2L.LP)D2L.LP.Web.UI.Legacy.MasterPages.Dialog.DestroyAdapter()},0);handle.m_isClosed=true},CloseHelperForFocusSwitch:function(handle,doFocus){var removeDialog=function(){handle.dialog.d2l_handle=null;handle.dialog.parentNode.removeChild(handle.dialog);handle.rootWin.D2L.LP.Web.UI.Desktop.MasterPages.Dialog.NumOfDialogs--};var assignFocusToOpener=function(){var promise=new Promise(function(resolve,reject){try{if(doFocus){var opener=handle.opener;setTimeout(function(){D2L.LP.Web.UI.Html.Dom.FocusNode(opener); resolve()},0)}}catch(e){resolve()}});return promise};assignFocusToOpener().then(removeDialog)},Focus:function(dialog,win){var focusId=D2L.LP.Web.UI.Html.Dom.GetAttribute(dialog,"data-focusid");if(focusId!==null){var focusElem=win.D2L.LP.Web.UI.Html.Dom.GetElementById(focusId);if(D2L.LP.Web.UI.Html.Dom.IsFocusable(focusElem)){D2L.LP.Web.UI.Html.Dom.FocusNode(focusElem);return}}var bodyNodes=win.document.getElementsByTagName("body");if(bodyNodes!==null&&bodyNodes.length>0){var skipFocus=bodyNodes[0].getAttribute("data-dialog-skipfocus"); if(skipFocus)return}var doc=win.document;var me=D2L.LP.Web.UI.Desktop.MasterPages.Dialog;var closeElem=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-dialog-close",dialog);var elems=me.GetFocusableElements(dialog);if(elems.length===0)return;try{if(closeElem!==null)closeElem.focus();win.focus();elems[0].focus()}catch(e){}if(closeElem===null)return;me.MakeFocusTrap(dialog,win,closeElem)},MakeFocusTrap:function(dialog,win,closeElem){var doc=win.document;var first=doc.createElement("span");first.tabIndex= 0;dialog.insertBefore(first,dialog.children[0]);var secondLast=doc.createElement("span");secondLast.tabIndex=0;dialog.appendChild(secondLast);var last=doc.createElement("span");last.tabIndex=0;dialog.appendChild(last);var delegated=false;D2L.LP.Web.UI.Html.Dom.AddEventListener("focus",first,function(){delegated=true;secondLast.focus()});D2L.LP.Web.UI.Html.Dom.AddEventListener("focus",secondLast,function(){if(delegated){delegated=false;return}closeElem.focus()});D2L.LP.Web.UI.Html.Dom.AddEventListener("focus", last,function(){closeElem.focus()})},GetFocusableElements:function(dialog){var focusableElems={"a":true,"input":true,"select":true,"textarea":true,"button":true};var elems=[];var closeElem=null;var findElems=function(node){if(node.nodeType!==1)return;var tagName=node.tagName.toLowerCase();if(focusableElems[tagName]===true){var focusable=true;if(tagName=="input"&&(node.type=="hidden"||node.disabled===true))focusable=false;else if(D2L.LP.Web.UI.Html.Css.GetStyle(node,"display")==="none")focusable=false; else if(D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-dialog-close",node)){closeElem=node;focusable=false}if(focusable)elems.push(node)}for(var i=0;i<node.childNodes.length;i++)findElems(node.childNodes[i])};findElems(dialog);if(elems.length===0&&closeElem!==null)elems.push(closeElem);return elems},GetHandle:function(win){win=win||window;var dialogs=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-dialog-frame",win.parent.document);for(var i=0;i<dialogs.length;i++)if(dialogs[i].contentWindow==win)return dialogs[i].parentNode.parentNode.d2l_handle; return null},FixSettings:function(settings){if(settings===undefined||settings===null)settings={};if(settings.AutoClose===undefined)settings.AutoClose=false;if(settings.ShimType===undefined)settings.ShimType=1;if(settings.Window===undefined)if(window.parent!==window&&window.parent.frames&&window.parent.frames.length===3)if(window.parent.document.body.nodeName==="FRAMESET")settings.Window=window;else settings.Window=window.parent;return settings},Open:function(opener,location,settings){return D2L.LP.Web.UI.Desktop.MasterPages.Dialog.OpenSubmit(null, opener,location,settings)},OpenHelper:function(opener,location,settings){return D2L.LP.Web.UI.Desktop.MasterPages.Dialog.OpenSubmitHelper(null,opener,location,settings)},OpenWithParam:function(openerId,location,params,settings){var evt=new D2L.LP.Web.UI.Events.Event;var serializer=new D2L.LP.Web.Serialization.Serializer;var createHidden=function(name,value){var hidden=document.createElement("input");hidden.type="hidden";hidden.name=name;hidden.value=value;return hidden};var form=document.createElement("form"); D2L.LP.Web.UI.Html.Dom.SetAttribute(form,"data-method","POST");for(var key in params)serializer.AddMember(key,params[key]);var members=serializer.GetMembers();for(var i=0;i<members.length;i++)form.appendChild(createHidden(members[i][0],members[i][1]));document.body.appendChild(form);var openSubmitEvent=D2L.LP.Web.UI.Desktop.MasterPages.Dialog.OpenSubmit(form,openerId,location,settings);openSubmitEvent.AddListener(function(result){evt.Trigger(result)});openSubmitEvent.AddReleaseListener(function(){evt.Release()}); return evt},OpenSubmit:function(form,opener,location,settings){var openerElement;if(opener===undefined||opener===null)throw"Dialog opener is required. Cannot be "+opener;else if(opener.GetValue!==undefined){var id=opener.GetValue();openerElement=D2L.LP.Web.UI.Html.Dom.GetElementById(id);if(openerElement===null||openerElement===undefined)throw"Dialog opener not found: "+id;else if(openerElement.focus===undefined)throw"Invalid dialog opener: "+id;}else if(opener.focus===undefined)throw"Invalid dialog opener: "+ opener;else openerElement=opener;return D2L.LP.Web.UI.Desktop.MasterPages.Dialog.OpenSubmitHelper(form,openerElement,location,settings)},OpenSubmitHelper:function(form,opener,location,settings){var me=D2L.LP.Web.UI.Desktop.MasterPages.Dialog;settings=me.FixSettings(settings);var evt=new D2L.LP.Web.UI.Events.Event;var rootWin=window;try{while(rootWin.parent!==rootWin&&rootWin.parent.D2L&&rootWin.parent.D2L.LP){var throwsIfXDomain=rootWin.parent.document;if(rootWin.parent.document.body.nodeName==="FRAMESET")if(rootWin.parent=== rootWin.parent.parent)break;rootWin=rootWin.parent}}catch(xdomainErr){}if(settings.Window)rootWin=settings.Window;var handle={dialog:null,frame:null,body:null,bodyDiff:50,height:200,heightTimeout:null,inner:null,isResized:false,container:null,onresize:null,ondocumentclick:null,shim:null,win:window,rootWin:rootWin,opener:opener,evt:evt,isDragged:false,settings:settings,nodes:{title:null,heading:null,close:null,footer:null},width:300};handle.rootWin.D2L.LP.Web.UI.Desktop.MasterPages.Dialog.NumOfDialogs++; handle.rootWin.document.documentElement.classList.add("d2l-dialog-open");if(D2L.LP.Web.UI.Desktop.MasterPages.Dialog.IsIos())handle.rootWin.document.documentElement.classList.add("d2l-dialog-open-ios");me.Build(handle,form,location,settings,rootWin);var appendToDom=function(){rootWin.document.body.appendChild(handle.dialog)};var shim=function(){if(settings.ShimType>0)handle.shim=D2L.LP.Web.UI.Desktop.Controls.Shim.Create(handle.dialog,settings.ShimType==2)};if(form!==null){handle.dialog.style.visibility= "hidden";appendToDom();handle.firstLoadEvent.AddListener(function(){D2L.LP.Web.UI.Common.Controls.Form.SubmitToIFrameHelper(form,handle.frame,location).AddListener(function(result){if(result){shim();handle.dialog.style.visibility="visible"}else me.CloseHelperWithHandle(false,false,undefined,handle)})})}else{shim();appendToDom()}return evt},computeDialogPadding:function(inDialog){if(!inDialog)return;var innerDialog=inDialog.firstChild;if(!innerDialog)return;var iframe=inDialog.frame;if(!iframe)return; var boundsInner=innerDialog.getBoundingClientRect();var boundsIframe=iframe.getBoundingClientRect();var padding={top:Math.abs(boundsInner.top-boundsIframe.top),bottom:Math.abs(boundsInner.bottom-boundsIframe.bottom),left:Math.abs(boundsInner.left-boundsIframe.left),right:Math.abs(boundsInner.right-boundsIframe.right)};return padding}};D2L.LP.Web.UI.Common.MasterPages.Dialog=D2L.LP.Web.UI.Desktop.MasterPages.Dialog; D2L.LP.Web.UI.Desktop.MasterPages.Dialog.Inline={Open:function(titleText,primaryMessage,secondaryMessage,primaryButtonText,secondaryButtonText,closeButtonText,iconClass,primaryButtonCallback,secondaryButtonCallback,abortCallback,openerId,id,equalButtonWidths){var contentElement=document.createDocumentFragment();if(primaryMessage){var primaryMessageElement=contentElement.appendChild(document.createElement("p"));primaryMessageElement.classList.add("d2l-dialog-inline-primary-message");primaryMessageElement.innerHTML= primaryMessage}if(secondaryMessage){var secondaryMessageElement=contentElement.appendChild(document.createElement("p"));secondaryMessageElement.classList.add("d2l-dialog-inline-secondary-message");secondaryMessageElement.innerHTML=secondaryMessage}var me=D2L.LP.Web.UI.Desktop.MasterPages.Dialog.Inline;me.OpenWithElement(titleText,contentElement,false,primaryButtonText,secondaryButtonText,closeButtonText,iconClass,primaryButtonCallback,secondaryButtonCallback,abortCallback,openerId,id,equalButtonWidths, true)},OpenWithElement:function(titleText,contentElement,noPadding,primaryButtonText,secondaryButtonText,closeButtonText,iconClass,primaryButtonCallback,secondaryButtonCallback,abortCallback,openerId,id,equalButtonWidths,isAlert){var me=D2L.LP.Web.UI.Desktop.MasterPages.Dialog.Inline;var rootWin=window;while(true){if(rootWin.parent===rootWin||rootWin.D2L===undefined||!D2L.LP.Web.UI.Html.Dom.HasSafeParent(rootWin))break;rootWin=rootWin.parent}var handle={activeElement:document.activeElement,cont:null, shim:null,openerId:openerId,abortCallback:abortCallback,rootWin:rootWin};var nodes=me.Build(handle,titleText,closeButtonText,iconClass,contentElement,noPadding,primaryButtonText,primaryButtonCallback,secondaryButtonText,secondaryButtonCallback,id,equalButtonWidths,isAlert);handle.cont=nodes.container;handle.shim=D2L.LP.Web.UI.Desktop.Controls.Shim.Create(nodes.container,false);nodes.container.d2l_handle=handle;rootWin.document.body.appendChild(nodes.container);handle.resizeFunc=function(){var viewport= D2L.LP.Web.UI.Html.Dom.GetViewportSize(rootWin);var scroll=D2L.LP.Web.UI.Html.Dom.GetScrollPosition(rootWin);var width;var contRect=nodes.container.getBoundingClientRect();width=contRect.width;var heightOther=60;if(nodes.titleCont)heightOther+=nodes.titleCont.getBoundingClientRect().height;if(nodes.footerCont)heightOther+=nodes.footerCont.getBoundingClientRect().height;nodes.bodyCont.style.maxHeight=contRect.height-heightOther+"px";nodes.container.style.left=(viewport.width-width)/2+"px";nodes.container.style.top= scroll.top+50+"px"};handle.resizeFunc();window.addEventListener("resize",handle.resizeFunc,false);nodes.anchorStart.focus()},Build:function(handle,titleText,closeButtonText,iconClass,contentElement,noPadding,primaryButtonText,primaryButtonCallback,secondaryButtonText,secondaryButtonCallback,id,equalButtonWidths,isAlert){var me=D2L.LP.Web.UI.Desktop.MasterPages.Dialog.Inline;var titleNodes=me.BuildTitle(handle,titleText,closeButtonText);var footerNodes=me.BuildFooter(handle,primaryButtonText,primaryButtonCallback, secondaryButtonText,secondaryButtonCallback,equalButtonWidths);var anchorStart=handle.rootWin.document.createElement("a");anchorStart.onclick="return false;";D2L.LP.Web.UI.Html.Dom.SetAttribute(anchorStart,"href","javascript:void(0);");D2L.LP.Web.UI.Html.Dom.AddEventListener("focus",anchorStart,function(){if(footerNodes.secondaryButton!==null)footerNodes.secondaryButton.focus();else if(footerNodes.primaryButton!==null)footerNodes.primaryButton.focus();else{var result=D2L.LP.Web.UI.Html.Dom.GetPreviousFocusableElement(anchorStart); if(result)result.focus();else titleNodes.close.focus()}});var bodyCont=handle.rootWin.document.createElement("div");var bodyClass="d2l-dialog-inline-body";if(noPadding)bodyClass+=" d2l-dialog-inline-body-nopadding";if(iconClass)bodyClass+=" d2l-dialog-inline-body-icon "+iconClass;else bodyClass+=" d2l-dialog-inline-body-noicon";bodyCont.className=bodyClass;bodyCont.id=(new D2L.LP.Web.UI.Html.UniqueHtmlId).GetValue();bodyCont.appendChild(contentElement);var anchorEnd=handle.rootWin.document.createElement("a"); anchorEnd.onclick="return false;";D2L.LP.Web.UI.Html.Dom.SetAttribute(anchorEnd,"href","javascript:void(0);");D2L.LP.Web.UI.Html.Dom.AddEventListener("focus",anchorEnd,function(){titleNodes.close.focus()});var inner=handle.rootWin.document.createElement("div");inner.className="d2l-dialog-inner";inner.appendChild(anchorStart);inner.appendChild(titleNodes.cont);inner.appendChild(bodyCont);if(footerNodes.cont!==null)inner.appendChild(footerNodes.cont);inner.appendChild(anchorEnd);var cont=handle.rootWin.document.createElement("div"); if(id)cont.id=id.GetValue();cont.className="d2l-dialog d2l-dialog-mvc d2l-dialog-inline";var openingAnimation=function(){cont.removeEventListener("animationend",openingAnimation,false);cont.removeEventListener("webkitAnimationEnd",openingAnimation,false);cont.classList.remove("d2l-dialog-loading")};cont.addEventListener("animationend",openingAnimation,false);cont.addEventListener("webkitAnimationEnd",openingAnimation,false);cont.classList.add("d2l-dialog-loading");D2L.LP.Web.UI.Html.Aria.SetRole(cont, isAlert?"alertdialog":"dialog");D2L.LP.Web.UI.Html.Aria.SetAttribute(cont,"describedby",bodyCont.id);D2L.LP.Web.UI.Html.Aria.SetAttribute(cont,"labelledby",titleNodes.title.id);D2L.LP.Web.UI.Html.Dom.AddKeyPressEventListener(cont,function(kpArgs){if(kpArgs.GetKey()===D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.Escape)me.AbortWithHandle(handle)});cont.appendChild(inner);D2L.LP.Web.UI.Desktop.MasterPages.Dialog.InitTitleHelper({isDragged:false},cont,titleNodes.cont,titleNodes.close,handle.rootWin, handle.rootWin);return{container:cont,title:titleNodes.title,titleCont:titleNodes.cont,bodyCont:bodyCont,footerCont:footerNodes.cont,close:titleNodes.close,anchorStart:anchorStart}},BuildTitle:function(handle,titleText,closeButtonText){var me=D2L.LP.Web.UI.Desktop.MasterPages.Dialog.Inline;var title=handle.rootWin.document.createElement("h2");title.className="d2l-heading vui-heading-3";title.innerHTML=titleText;title.id=(new D2L.LP.Web.UI.Html.UniqueHtmlId).GetValue();var closeButtonSpan=handle.rootWin.document.createElement("span"); closeButtonSpan.className="d2l-offscreen";closeButtonSpan.innerHTML=closeButtonText;var closeButton=handle.rootWin.document.createElement("a");closeButton.className="d2l-dialog-close";D2L.LP.Web.UI.Html.Aria.SetRole(closeButton,"button");D2L.LP.Web.UI.Html.Dom.SetAttribute(closeButton,"href","javascript:void(0);");D2L.LP.Web.UI.Html.Dom.SetAttribute(closeButton,"onclick","return false;");D2L.LP.Web.UI.Html.Dom.SetAttribute(closeButton,"title",closeButtonText);D2L.LP.Web.UI.Html.Dom.AddEventListener("click", closeButton,function(){me.AbortWithHandle(handle)});var innerSpan=handle.rootWin.document.createElement("span");innerSpan.appendChild(closeButtonSpan);closeButton.appendChild(innerSpan);var cont=handle.rootWin.document.createElement("div");cont.className="d2l-dialog-title";cont.appendChild(title);cont.appendChild(closeButton);return{cont:cont,title:title,close:closeButton}},BuildFooter:function(handle,primaryButtonText,primaryButtonCallback,secondaryButtonText,secondaryButtonCallback,equalButtonWidths){if(!primaryButtonText&& !secondaryButtonText)return{cont:null,primaryButton:null,secondaryButton:null};var me=D2L.LP.Web.UI.Desktop.MasterPages.Dialog.Inline;var buttonCont=handle.rootWin.document.createElement("div");buttonCont.className="d2l-dialog-buttons";var clear=handle.rootWin.document.createElement("div");clear.className="d2l-clear";var footerCont=handle.rootWin.document.createElement("div");footerCont.className="d2l-dialog-footer";footerCont.appendChild(buttonCont);footerCont.appendChild(clear);var primaryButton= primaryButtonText?buttonHelper(primaryButtonText,primaryButtonCallback,true):null;var secondaryButton=secondaryButtonText?buttonHelper(secondaryButtonText,secondaryButtonCallback,false):null;if(equalButtonWidths)setTimeout(function(){var maxWidthButton=Math.max(primaryButton.offsetWidth,secondaryButton.offsetWidth);secondaryButton.style.width=maxWidthButton+"px";primaryButton.style.width=maxWidthButton+"px"},1);return{cont:footerCont,primaryButton:primaryButton,secondaryButton:secondaryButton};function buttonHelper(buttonText, cb,isPrimary){var button=D2L.LP.Web.UI.Common.Controls.Button.Build(handle.rootWin.document);buttonCont.appendChild(button);D2L.LP.Web.UI.Common.Controls.Button.Init(button);D2L.LP.Web.UI.Common.Controls.Button.SetTextNode(button,buttonText);D2L.LP.Web.UI.Common.Controls.Button.SetIsPrimaryNode(button,isPrimary);D2L.LP.Web.UI.Common.Controls.Button.SetOnClickNode(button,function(){me.Close(handle);if(cb!==null)cb()});return button}},Close:function(handle){window.removeEventListener("resize",handle.resizeFunc, false);var closingAnimation=function(){handle.cont.removeEventListener("animationend",closingAnimation,false);handle.cont.removeEventListener("webkitAnimationEnd",closingAnimation,false);D2L.LP.Web.UI.Html.Dom.RemoveElement(handle.cont)};handle.cont.addEventListener("animationend",closingAnimation,false);handle.cont.addEventListener("webkitAnimationEnd",closingAnimation,false);handle.cont.classList.add("d2l-dialog-closing");D2L.LP.Web.UI.Desktop.Controls.Shim.Delete(handle.shim);var opener=handle.activeElement; if(handle.openerId!==null)opener=D2L.LP.Web.UI.Html.Dom.GetElementById(handle.openerId);setTimeout(function(){D2L.LP.Web.UI.Html.Dom.FocusNode(opener)},0)},Abort:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id);if(node===null||node.d2l_handle===undefined)return;D2L.LP.Web.UI.Desktop.MasterPages.Dialog.Inline.AbortWithHandle(node.d2l_handle)},AbortWithHandle:function(handle){D2L.LP.Web.UI.Desktop.MasterPages.Dialog.Inline.Close(handle);if(handle.abortCallback!==null)handle.abortCallback()}}; D2L.LP.Web.UI.Desktop.MasterPages.Dialog.InlineDialog=function(openerId,id,titleText,primaryMessage,secondaryMessage,positiveButtonText,negativeButtonText,abortButtonText,iconImageClassName,positiveResult,negativeResult,abortResult){var evt=new D2L.LP.Web.UI.Events.Event;positiveResult=positiveResult==null?undefined:positiveResult;negativeResult=negativeResult==null?undefined:negativeResult;abortResult=abortResult==null?undefined:abortResult;D2L.LP.Web.UI.Desktop.MasterPages.Dialog.Inline.Open(titleText, primaryMessage,secondaryMessage,positiveButtonText,negativeButtonText,abortButtonText,iconImageClassName,function(){evt.Trigger(positiveResult)},function(){evt.Trigger(negativeResult)},function(){evt.Trigger(abortResult)},openerId,id);return evt}; D2L.LP.Web.UI.Desktop.Controls.PageButtons={Init:function(node){var me=D2L.LP.Web.UI.Desktop.Controls.PageButtons;var $node=$(node);var nodeHeight=$node.outerHeight();var $spacer=$('<div class="d2l-page-buttons-spacer"></div>').height(nodeHeight+"px").insertAfter(node);var handle={buttonHeight:$node.height(),extraWidth:$node.outerWidth(true)-$node.width(),$node:$node,$spacer:$spacer,$win:$(window),isFloating:false};var reposition=function(){me.Reposition(handle)};handle.$win.scroll(reposition).resize(reposition); $(document).ready(reposition);var prevDocumentHeight=document.body.offsetHeight;setInterval(function(){var documentHeight=document.body.offsetHeight;if(prevDocumentHeight!==documentHeight)reposition();prevDocumentHeight=documentHeight},100)},SetIsFloating:function(handle,isFloating){if(handle.isFloating!==isFloating){handle.$spacer.toggleClass("d2l-page-buttons-float",isFloating);handle.$node.toggleClass("d2l-page-buttons-float",isFloating)}if(isFloating){var floatParent=handle.$node.parent();if(handle.$node.offset().top- 50<floatParent.offset().top){handle.$spacer.removeClass("d2l-page-buttons-float");handle.$node.removeClass("d2l-page-buttons-float");handle.isFloating=false;return}var extras=handle.$node.outerWidth(true)-handle.$node.width();var width=floatParent.width()-extras;handle.$node.width(width)}else handle.$node.width("auto");handle.isFloating=isFloating},Reposition:function(handle){var me=D2L.LP.Web.UI.Desktop.Controls.PageButtons;var docViewTop=handle.$win.scrollTop();var docViewBottom=docViewTop+handle.$win.height(); var documentHeight=$(document).height();var buttonPosition=handle.isFloating?handle.$spacer.position().top:handle.$node.position().top;if(buttonPosition+handle.buttonHeight+10<=docViewBottom||docViewBottom==documentHeight)me.SetIsFloating(handle,false);else me.SetIsFloating(handle,true)}}; D2L.LP.Web.UI.Desktop.MasterPages.PageMessage={Close:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(node===null)return;node.style.opacity=0;setTimeout(function(){D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(node,false);node.style.opacity=0;node.style.bottom="40px"},1500)},Open:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(node===null)return;node.style.zIndex=D2L.LP.Web.UI.Desktop.Controls.Shim.GetZIndex()+1E3;D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(node, true);setTimeout(function(){node.style.opacity=1;node.style.bottom="50px"},100)},Shake:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(node===null)return;D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-page-message-shake",node);setTimeout(function(){D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-page-message-shake",node)},1E3)}}; D2L.LP.Web.UI.Desktop.MasterPages.OptIn={m_storedResults:{},ReloadPage:function(){window.location.reload(true)},StoreResult:function(id,key,value){if(!this.m_storedResults[id])this.m_storedResults[id]={};this.m_storedResults[id][key]=value},GetResult:function(id,key){if(!D2L.LP.Web.UI.Desktop.MasterPages.OptIn.m_storedResults[id])return null;return D2L.LP.Web.UI.Desktop.MasterPages.OptIn.m_storedResults[id][key]},OnVisibilityChange:function(id,isVisible){var eventHandler=D2L.LP.Web.UI.ObjectRepository.TryGet(id, "OnVisibilityChange");if(eventHandler){this.StoreResult(id,"IsVisible",isVisible);eventHandler.call(eventHandler)}},OnOptIn:function(id){var eventHandler=D2L.LP.Web.UI.ObjectRepository.TryGet(id,"OnOptIn");if(eventHandler)eventHandler.call(eventHandler)},OnOptOut:function(id,event){var eventHandler=D2L.LP.Web.UI.ObjectRepository.TryGet(id,"OnOptOut");var details=event.detail||{};if(eventHandler){this.StoreResult(id,"Reason",details.reason||null);this.StoreResult(id,"Feedback",details.feedback||""); eventHandler.call(eventHandler)}}}; D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-flyout-instance",function(flyout){var flyoutEvents=window.D2L.LP.Web.UI.Desktop.MasterPages.OptIn;flyout.addEventListener("flyout-opened",flyoutEvents.OnVisibilityChange.bind(flyoutEvents,flyout.id,true));flyout.addEventListener("flyout-closed",flyoutEvents.OnVisibilityChange.bind(flyoutEvents,flyout.id,false));flyout.addEventListener("opt-in",flyoutEvents.OnOptIn.bind(flyoutEvents,flyout.id));flyout.addEventListener("opt-out",flyoutEvents.OnOptOut.bind(flyoutEvents, flyout.id))});D2L.LP.Web.UI.Desktop.Controls.Alert={Close:function(id){var alert=document.getElementById(id.GetValue());if(alert)alert.close()}};D2L.LP.Web.UI.Desktop.Controls.ButtonMenu=D2L.LP.Web.UI.Desktop.Controls.ButtonMenu||{}; D2L.LP.Web.UI.Desktop.Controls.ButtonMenu.Init=function(node){var contextMenuId=D2L.LP.Web.UI.Html.AbsoluteHtmlId.Create(node.getAttribute("data-contextMenuId"));var dataOpenerId=node.getAttribute("data-openerId");var opener=node.querySelector("#"+dataOpenerId);var loadFunction=function(e){if(!D2L.LP.Web.UI.Html.Dom.GetElementById(contextMenuId.GetValue()))return;if(D2L.LP.Web.UI.Desktop.Controls.ContextMenu.IsOpen(contextMenuId)){D2L.LP.Web.UI.Desktop.Controls.ContextMenu.Close(contextMenuId);return}var keypress= e.type==="keypress"?true:false;if(keypress&&e.which!==13&&e.which!==32)return;var isEnabled=D2L.LP.Web.UI.Desktop.Controls.ButtonMenu.IsEnabledNode(node);if(isEnabled){var openerId=D2L.LP.Web.UI.Html.AbsoluteHtmlId.Create(dataOpenerId);D2L.LP.Web.UI.Desktop.Controls.ContextMenu.CreateDropdownMenu(node,contextMenuId,openerId,null,keypress)}};opener.addEventListener("mouseup",loadFunction);opener.addEventListener("keypress",loadFunction);var closeFunction=function(){var dropdownMenuContent=node.querySelector("d2l-dropdown-menu"); if(dropdownMenuContent)node.removeChild(dropdownMenuContent)};node.addEventListener("d2l-dropdown-close",closeFunction)};D2L.LP.Web.UI.Desktop.Controls.ButtonMenu.IsEnabledNode=function(node){return!node.disabled}; D2L.LP.Web.UI.Desktop.Controls.ButtonMenu.SetItemIsEnabled=function(id,key,isEnabled){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var contextMenuId=D2L.LP.Web.UI.Html.Dom.GetAttribute(node,"data-contextMenuId");D2L.LP.Web.UI.Desktop.Controls.ContextMenu.SetItemIsEnabled(D2L.LP.Web.UI.Html.AbsoluteHtmlId.Create(contextMenuId),key,isEnabled)}; D2L.LP.Web.UI.Desktop.Controls.ButtonMenu.SetIsEnabled=function(id,isEnabled){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());node.disabled=!isEnabled;D2L.LP.Web.UI.Desktop.Controls.ContextMenu.SetIsEnabled(id,isEnabled)}; D2L.LP.Web.UI.Desktop.Controls.CalendarMini={SetFocus:function(id,ariaMessage){var miniCalPlaceholder=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(!miniCalPlaceholder)return;var miniCal=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-calendar-mini",miniCalPlaceholder);if(D2L.LP.Web.UI.Html.Dom.HasAttribute(miniCalPlaceholder,"data-restoreColumn")){var startFromBottom=true;if(D2L.LP.Web.UI.Html.Dom.HasAttribute(miniCalPlaceholder,"data-startFromBottom")){startFromBottom=D2L.LP.Web.UI.Html.Dom.GetAttribute(miniCalPlaceholder, "data-startFromBottom");startFromBottom=startFromBottom=="true";D2L.LP.Web.UI.Html.Dom.RemoveAttribute(miniCalPlaceholder,"data-startFromBottom")}var restoreColumn=D2L.LP.Web.UI.Html.Dom.GetAttribute(miniCalPlaceholder,"data-restoreColumn")-0;D2L.LP.Web.UI.Html.Dom.RemoveAttribute(miniCalPlaceholder,"data-restoreColumn");miniCal.navRestoreColumnFocus(restoreColumn,startFromBottom)}else if(D2L.LP.Web.UI.Html.Dom.HasAttribute(miniCalPlaceholder,"data-restoreDate")){var restoreDay=D2L.LP.Web.UI.Html.Dom.GetAttribute(miniCalPlaceholder, "data-restoreDate");D2L.LP.Web.UI.Html.Dom.RemoveAttribute(miniCalPlaceholder,"data-restoreDate");miniCal.navFocusDay(restoreDay)}else miniCal.navFocusDay(1);if(ariaMessage!==undefined&&ariaMessage!==null)D2L.LP.Web.UI.Html.Aria.LogMessage(ariaMessage)}};D2L.LP.Web.UI.Desktop.Controls.ContainerIcon={SetIsVisible:function(id,isVisible){D2L.LP.Web.UI.Html.Dom.SetIsDisplayed(id,isVisible)}};D2L.LP.Web.UI.Desktop.Controls.ContextMenu=D2L.LP.Web.UI.Desktop.Controls.ContextMenu||{}; (function(){var functions={Close:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.ContextMenu;var d2lDropdownContent=me.GetDropdownContent(id);if(d2lDropdownContent)d2lDropdownContent.close();else{var floatingContainerId=me.GetFloatingContainerHtmlId(id);D2L.LP.Web.UI.Desktop.Controls.FloatingContainer.Close(floatingContainerId,true)}},OnCloseHandler:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.ContextMenu;var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(node.m_openerId!=null){var openerNode= D2L.LP.Web.UI.Html.Dom.GetElementById(node.m_openerId.GetValue());D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-contextmenu-opener-open",openerNode);openerNode.m_isClicked=false;D2L.LP.Web.UI.Html.Dom.DispatchEvent("blur",openerNode)}D2L.LP.Web.UI.Desktop.Controls.ContextMenu.GetOnCloseEvent(id).Trigger()},GetFloatingContainerHtmlId:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var floatingContainerId=node.getAttribute("data-floatingContainerId");return D2L.LP.Web.UI.Html.AbsoluteHtmlId.Create(floatingContainerId)}, GetDropdownContent:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var dropdownContentId=node.getAttribute("data-dropdownContentId");return dropdownContentId?D2L.LP.Web.UI.Html.Dom.GetElementById(dropdownContentId):null},GetOpenerKey:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());return node.m_openerKey},GetOnCloseEvent:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.ContextMenu;if(me.OnCloseEvents[id.GetValue()]===undefined)me.OnCloseEvents[id.GetValue()]= new D2L.LP.Web.UI.Events.Event;return me.OnCloseEvents[id.GetValue()]},CloneMenu:function(node,contextMenuId,openerId,dropdownMenu){node=node||D2L.LP.Web.UI.Html.Dom.GetElementById(openerId.GetValue());dropdownMenu=dropdownMenu||node.querySelector("d2l-dropdown-content");if(!dropdownMenu)return;var opener=D2L.LP.Web.UI.Html.Dom.GetElementById(openerId.GetValue());var menuTemplate=D2L.LP.Web.UI.Html.Dom.GetElementById(contextMenuId.GetValue());var clone;if(menuTemplate.content)if(menuTemplate.content.firstElementChild)clone= document.importNode(menuTemplate.content,true).firstElementChild;else clone=menuTemplate.content.querySelector("*").cloneNode(true);else clone=menuTemplate.querySelector("*").cloneNode(true);if(!clone.hasAttribute("label"))clone.setAttribute("label",opener.getAttribute("text"));clone.addEventListener("d2l-menu-item-select",function(e){var contextMenuItemOnSelectHandler=D2L.LP.Web.UI.ObjectRepository.TryGet(e.target.id);if(contextMenuItemOnSelectHandler)contextMenuItemOnSelectHandler.call(contextMenuItemOnSelectHandler)}); dropdownMenu.appendChild(clone)},CreateDropdownMenu:function(node,contextMenuId,openerId,openerKey,keypress){var menuTemplate=D2L.LP.Web.UI.Html.Dom.GetElementById(contextMenuId.GetValue());if(!menuTemplate)return;var dropdownContentId=menuTemplate.getAttribute("data-dropdownContentId");var dropdownMenu=document.createElement("d2l-dropdown-menu");dropdownMenu.setAttribute("no-pointer","");dropdownMenu.setAttribute("align","start");dropdownMenu.setAttribute("min-width","200");dropdownMenu.setAttribute("max-width", "370");dropdownMenu.setAttribute("vertical-offset","12");dropdownMenu.setAttribute("id",dropdownContentId);dropdownMenu.setAttribute("class","d2l-dropdown-menu-contextmenu");dropdownMenu.addEventListener("d2l-dropdown-open",function(){menuTemplate.m_openerKey=openerKey});D2L.LP.Web.UI.Desktop.Controls.ContextMenu.CloneMenu(node,contextMenuId,openerId,dropdownMenu);node.appendChild(dropdownMenu);var me=this;setTimeout(function(){keypress=keypress?keypress:false;dropdownMenu.open(keypress);me.SetLeft(dropdownMenu, node)},0)},IsOpen:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.ContextMenu;var isOnDemand=D2L.LP.Web.UI.ObjectRepository.HasKeys(id.GetValue(),"LoadHandler");if(isOnDemand&&!D2L.LP.Web.UI.Desktop.Controls.ContextMenuOnDemand.IsLoaded(id))return false;var d2lDropdownContent=me.GetDropdownContent(id);if(d2lDropdownContent)return d2lDropdownContent.opened;else{var floatingContainerId=D2L.LP.Web.UI.Desktop.Controls.ContextMenu.GetFloatingContainerHtmlId(id);return D2L.LP.Web.UI.Desktop.Controls.FloatingContainer.IsOpen(floatingContainerId)}}, Open:function(id,openerId,openerKey,targetId){var me=D2L.LP.Web.UI.Desktop.Controls.ContextMenu;var isOnDemand=D2L.LP.Web.UI.ObjectRepository.HasKeys(id.GetValue(),"LoadHandler");if(isOnDemand&&!D2L.LP.Web.UI.Desktop.Controls.ContextMenuOnDemand.IsLoaded(id)){var openerNode=D2L.LP.Web.UI.Html.Dom.GetElementById(openerId.GetValue());var isD2lDropdownPlaceholder=openerNode.className.indexOf("d2l-contextmenu-ph-dropdown")>-1;var openerButtonId=openerNode.getAttribute("data-openerId");if(isD2lDropdownPlaceholder)me.OpenOnDemand(openerNode, id,openerButtonId,openerKey);else{var loadRet=D2L.LP.Web.UI.Desktop.Controls.ContextMenuOnDemand.Load(id,openerKey);loadRet.AddListener(function(){D2L.LP.Web.UI.Desktop.Controls.ContextMenu.Open(id,openerId,openerKey,targetId)})}return}var d2lDropdownContent=me.GetDropdownContent(id);if(d2lDropdownContent)d2lDropdownContent.open(false);else me.Opend2lMenuWithPlaceholder(id,openerId,openerKey,targetId)},OpenOnDemand:function(node,id,openerId,openerKey,keypress){if(!D2L.LP.Web.UI.Desktop.Controls.ContextMenuOnDemand.IsLoaded(id)){var loadRet= D2L.LP.Web.UI.Desktop.Controls.ContextMenuOnDemand.Load(id,openerKey);loadRet.AddListener(function(){D2L.LP.Web.UI.Desktop.Controls.ContextMenu.CreateDropdownMenu(node,id,openerId,openerKey,keypress)})}},Opend2lMenuWithPlaceholder:function(id,openerId,openerKey,targetId){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());node.m_openerKey=openerKey;node.m_openerId=openerId;var floatingContainerId=D2L.LP.Web.UI.Desktop.Controls.ContextMenu.GetFloatingContainerHtmlId(id);var floatingContainer= D2L.LP.Web.UI.Html.Dom.GetElementById(floatingContainerId);var openerNode=D2L.LP.Web.UI.Html.Dom.GetElementById(openerId.GetValue());if(!floatingContainer.querySelector("d2l-menu")){var clone=document.importNode(node.content,true);clone.firstElementChild.setAttribute("label",openerNode.getAttribute("aria-label"));clone.firstElementChild.addEventListener("d2l-menu-item-select",function(e){var contextMenuItemOnSelectHandler=D2L.LP.Web.UI.ObjectRepository.TryGet(e.target.id);if(contextMenuItemOnSelectHandler)contextMenuItemOnSelectHandler.call(contextMenuItemOnSelectHandler)}); floatingContainer.appendChild(clone)}var openSettings={Position:D2L.LP.Web.UI.Html.Style.OverlayPosition.Bottom};if(targetId!==undefined&&targetId!==null)openSettings.TargetId=targetId;D2L.LP.Web.UI.Desktop.Controls.FloatingContainer.Open(floatingContainerId,openerId,openSettings);D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-contextmenu-opener-open",openerNode);var floatingContainerNode=node.parentNode;var contextMenuItems=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-contextmenu-item",floatingContainerNode); if(contextMenuItems.length>0){D2L.LP.Web.UI.Desktop.Controls.ContextMenu.InitMenuItemClasses(contextMenuItems);var menu=floatingContainer.querySelector("d2l-menu");menu.focus()}},InitMenuItemClasses:function(contextMenuItems){var currentMenuItem,firstVisibleItem=null,lastVisibleItem,firstVisibleItemClassName="d2l-first-visible-item",lastItemClassName="d2l-last-visible-item";for(var i=0;i<contextMenuItems.length;i++){currentMenuItem=contextMenuItems[i];D2L.LP.Web.UI.Html.Dom.RemoveClassName(firstVisibleItemClassName, currentMenuItem);D2L.LP.Web.UI.Html.Dom.RemoveClassName(lastItemClassName,currentMenuItem);if(!D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-hidden",currentMenuItem)){lastVisibleItem=currentMenuItem;if(!firstVisibleItem)firstVisibleItem=currentMenuItem}}if(firstVisibleItem)D2L.LP.Web.UI.Html.Dom.AddClassName(firstVisibleItemClassName,firstVisibleItem);if(lastVisibleItem)D2L.LP.Web.UI.Html.Dom.AddClassName(lastItemClassName,lastVisibleItem)},GetAncestorBoundingClientRect:function(dropdownMenu){var offsetParent= dropdownMenu.offsetParent;if(offsetParent&&offsetParent.tagName!=="BODY")return offsetParent.getBoundingClientRect();var table=D2L.LP.Web.UI.Html.Dom.GetAncestorElementsByClassName("d2l-grid-wrapper",dropdownMenu);if(table&&table.length>0)return table[0].getBoundingClientRect();else if(offsetParent)return offsetParent.getBoundingClientRect();else return null},SetLeft:function(dropdownMenu,opener){var self=this;requestAnimationFrame(function(){var tableBoundingRect=self.GetAncestorBoundingClientRect(dropdownMenu); if(!tableBoundingRect)return;var openerBoundingRect=opener.getBoundingClientRect();var leftValue=getComputedStyle(document.body).direction==="rtl"?openerBoundingRect.right-tableBoundingRect.left:openerBoundingRect.left-tableBoundingRect.left;requestAnimationFrame(function(){dropdownMenu.style.left=leftValue+"px"})})},Toggle:function(id,openerId,openerKey){var me=D2L.LP.Web.UI.Desktop.Controls.ContextMenu;if(me.IsOpen(id))me.Close(id);else me.Open(id,openerId,openerKey)},SetIsEnabled:function(id,isEnabled){var dropdownMenuContainer= D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var openerId=dropdownMenuContainer.getAttribute("data-openerId");if(openerId){var opener=D2L.LP.Web.UI.Html.Dom.GetElementById(openerId);opener.disabled=!isEnabled}},GetMenuItem:function(id,key){var itemId=id.GetValue()+"_"+key;var node=D2L.LP.Web.UI.Html.Dom.GetElementById(itemId);if(node)return node;var template=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var content=template.content;var item=content.querySelector("#"+itemId);return item}, SetItemIsEnabled:function(id,key,isEnabled){var node=D2L.LP.Web.UI.Desktop.Controls.ContextMenu.GetMenuItem(id,key);if(!node)return;if(isEnabled)node.removeAttribute("disabled");else node.setAttribute("disabled","")},SetItemIsVisible:function(id,key,isVisible){var node=D2L.LP.Web.UI.Desktop.Controls.ContextMenu.GetMenuItem(id,key);if(!node)return;if(isVisible)node.removeAttribute("hidden");else node.setAttribute("hidden","")},ClickItem:function(id,key){var itemId=id.GetValue()+"_"+key;var node=D2L.LP.Web.UI.Html.Dom.GetElementById(itemId); node.click()}};if(typeof Object.assign!="function")Object.defineProperty(Object,"assign",{value:function assign(target,varArgs){if(target==null)throw new TypeError("Cannot convert undefined or null to object");var to=Object(target);for(var index=1;index<arguments.length;index++){var nextSource=arguments[index];if(nextSource!=null)for(var nextKey in nextSource)if(Object.prototype.hasOwnProperty.call(nextSource,nextKey))to[nextKey]=nextSource[nextKey]}return to},writable:true,configurable:true});Object.assign(D2L.LP.Web.UI.Desktop.Controls.ContextMenu, functions)})();D2L.LP.Web.UI.Desktop.Controls.ContextMenu.OnCloseEvents={};D2L.LP.Web.UI.Desktop.Controls.DataListItem={}; D2L.LP.Web.UI.Desktop.Controls.DataList={AdjustLastVisibleChild:function(node){var lastVisibleChild=null;var child=D2L.LP.Web.UI.Html.Dom.GetFirstElementChild(node);while(child!==null){var isHidden=D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-hidden",child);if(!isHidden)lastVisibleChild=child;D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-datalist-lastchild",child);child=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(child)}if(lastVisibleChild!==null)D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-datalist-lastchild", lastVisibleChild)},AddItems:function(dataListId,itemId,placeholderId,provider,createPlaceholder){var evt=new D2L.LP.Web.UI.Events.Event;if(dataListId===null||placeholderId===null||provider===null){evt.Release();return evt}if(D2L.LP.Web.UI.Html.Dom.GetElementById(placeholderId.GetValue())===null)createPlaceholder.call(createPlaceholder);var rc=D2L.LP.Web.UI.ObjectRepository.TryGet(placeholderId.GetValue());if(rc===null)if(!D2L.LP.Web.UI.ObjectRepository.TryClone(dataListId.GetValue(),"0",placeholderId.GetValue(), "0")){evt.Release();return evt}var me=D2L.LP.Web.UI.Desktop.Controls.DataList;var providerRet=provider.call(provider);providerRet.AddReleaseListener(function(){evt.Release()});providerRet.AddListener(function(){var listNode=me.GetListNode(dataListId);me.SetIsEmptyTextVisible(listNode,false);me.AdjustLastVisibleChild(listNode);var newItemNodes=me.GetNewItemNodesByNode(listNode);me.SetIsNewItems(newItemNodes,false);me.GetOnLoadMoreCompletedEvent(dataListId).Trigger(me.GetHasMoreItems(dataListId),newItemNodes); D2L.LP.Web.UI.ObjectRepository.Remove(placeholderId.GetValue(),"0");evt.Trigger()});return evt},AddItemsAfter:function(dataListId,itemId,placeholderId,provider){var me=D2L.LP.Web.UI.Desktop.Controls.DataList;if(dataListId===null)dataListId=me.GetDataListIdByItemId(itemId);var listNode=me.GetListNode(dataListId);var evt=me.AddItems(dataListId,itemId,placeholderId,provider,function(){var itemNode;if(itemId!==null)itemNode=D2L.LP.Web.UI.Html.Dom.GetElementById(itemId.GetValue());else itemNode=me.GetLastItemNode(dataListId); var placeholderNode=document.createElement("li");placeholderNode.setAttribute("id",placeholderId.GetValue());placeholderNode.className="d2l-datalist-item-placeholder";if(itemNode!==null)D2L.LP.Web.UI.Html.Dom.InsertElementAfter(placeholderNode,itemNode);else{var loadMorePlaceholderNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-datalist-item-placeholder-bottom",listNode);if(loadMorePlaceholderNode!==null){var parent=loadMorePlaceholderNode.parentNode;parent.insertBefore(placeholderNode, loadMorePlaceholderNode)}else listNode.appendChild(placeholderNode)}});return evt},AddItemsBefore:function(dataListId,itemId,placeholderId,provider){var me=D2L.LP.Web.UI.Desktop.Controls.DataList;if(dataListId===null)dataListId=me.GetDataListIdByItemId(itemId);var listNode=me.GetListNode(dataListId);var evt=me.AddItems(dataListId,itemId,placeholderId,provider,function(){var itemNode;if(itemId!==null)itemNode=D2L.LP.Web.UI.Html.Dom.GetElementById(itemId.GetValue());else itemNode=me.GetFirstItemNode(dataListId, true);var placeholderNode=document.createElement("li");placeholderNode.setAttribute("id",placeholderId.GetValue());placeholderNode.className="d2l-datalist-item-placeholder";if(itemNode!==null)itemNode.parentNode.insertBefore(placeholderNode,itemNode);else{var loadMorePlaceholderNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-datalist-item-placeholder-bottom",listNode);if(loadMorePlaceholderNode!==null){var parent=loadMorePlaceholderNode.parentNode;parent.insertBefore(placeholderNode,loadMorePlaceholderNode)}else listNode.appendChild(placeholderNode)}}); return evt},AddItemByNode:function(listNode,itemNode){var me=D2L.LP.Web.UI.Desktop.Controls.DataList;var loadMorePlaceholderNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-datalist-item-placeholder-bottom",listNode);var sourceList=itemNode.parentNode;if(loadMorePlaceholderNode!==null){var parent=loadMorePlaceholderNode.parentNode;parent.insertBefore(itemNode,loadMorePlaceholderNode)}else listNode.appendChild(itemNode);me.SetIsEmptyTextVisible(listNode,false);me.AdjustLastVisibleChild(listNode); if(sourceList!==listNode){var sourceListId=new D2L.LP.Web.UI.Html.AbsoluteHtmlId(sourceList.parentNode.getAttribute("id"));me.AdjustLastVisibleChild(sourceList);if(!me.GetHasVisibleItem(sourceListId))me.SetIsEmptyTextVisible(sourceList,true)}},AddItemClassNames:function(node,className){if(node!==undefined&&className.length>0&&node.className.indexOf(className,0)==-1)node.className+=" "+className},Get:function(){return D2L.LP.Web.UI.Desktop.Controls.DataList},GetDataListIdByItemId:function(itemId){var itemNode= D2L.LP.Web.UI.Html.Dom.GetElementById(itemId.GetValue());return new D2L.LP.Web.UI.Html.AbsoluteHtmlId(itemNode.parentNode.parentNode.getAttribute("id"))},GetDataListPlaceholder:function(dataListRootNode){var itemNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementChild(dataListRootNode);while(itemNode!==null){if(D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-datalist-item-placeholder",itemNode))return itemNode;itemNode=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(itemNode)}return null},GetEvent:function(id,events){var evt= events[id];if(evt===undefined){evt=new D2L.LP.Web.UI.Events.Event;events[id]=evt}return evt},GetFirstItemNode:function(id,includeHidden){var me=D2L.LP.Web.UI.Desktop.Controls.DataList;var listNode=me.GetListNode(id);var itemNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-datalist-item",listNode);if(itemNode===null)return null;if(includeHidden)return itemNode;else if(!D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-hidden",itemNode))return itemNode;return me.GetNextItemNode(itemNode,includeHidden)}, GetHasMoreItems:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.DataList;var listNode=me.GetListNode(id);var placeholderNode=me.GetDataListPlaceholder(listNode);if(placeholderNode===null)return false;if(D2L.LP.Web.UI.ObjectRepository.TryGet(placeholderNode.getAttribute("id"),2))return true;return false},GetHasVisibleItem:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.DataList;var itemNode=me.GetFirstItemNode(id,false);return itemNode!==null},GetItemCount:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.DataList; var count=0;var itemNode=me.GetFirstItemNode(id,false);while(itemNode!==null){count+=1;itemNode=me.GetNextItemNode(itemNode,false)}return count},GetItemsNodes:function(id,className){var me=D2L.LP.Web.UI.Desktop.Controls.DataList;var listNode=me.GetListNode(id);return D2L.LP.Web.UI.Html.Dom.GetElementsByClassName(className,listNode)},GetLastItemNode:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.DataList;var listNode=me.GetListNode(id);var itemNode=D2L.LP.Web.UI.Html.Dom.GetLastElementChild(listNode); while(itemNode!==null){if(D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-datalist-item",itemNode))return itemNode;itemNode=D2L.LP.Web.UI.Html.Dom.GetPreviousElementSibling(itemNode)}return null},GetListNode:function(id){return D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-datalist",D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue()))},GetNewItemNodesByNode:function(listNode){var itemNodes=D2L.LP.Web.UI.Html.Dom.GetImmediateChildElementsByClassName("d2l-datalist-newitem",listNode);return itemNodes}, GetNextItemNode:function(itemNode,includeHidden){itemNode=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(itemNode);while(itemNode!==null){if(D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-datalist-item",itemNode))if(includeHidden)return itemNode;else if(!D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-hidden",itemNode))return itemNode;itemNode=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(itemNode)}return null},GetPage:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.DataList;var dataListId=id.GetValue();if(!D2L.LP.Web.UI.ObjectRepository.HasKey(dataListId))return; var onGetPage=D2L.LP.Web.UI.ObjectRepository.Get(dataListId,1);if(onGetPage===null)return;var node=D2L.LP.Web.UI.Html.Dom.GetElementById(dataListId);var isReadOnly=D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-readonly",node);me.GetOnPageEvent(id).Trigger();me.GetOnLoadEvent(id).Trigger();onGetPage.call(onGetPage).AddListener(function(){if(isReadOnly){var dlNode=D2L.LP.Web.UI.Html.Dom.GetElementById(dataListId);D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-readonly",dlNode)}me.TryFocusFirstItem(id);me.GetOnPageCompletedEvent(id).Trigger(me.GetItemsNodes(id, "d2l-datalist-item"))})},GetOnLoadEvent:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.DataList;return me.GetEvent(id.GetValue(),me.OnLoadEvents)},GetOnLoadCompletedEvent:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.DataList;return me.GetEvent(id.GetValue(),me.OnLoadCompletedEvents)},GetOnLoadMoreCompletedEvent:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.DataList;return me.GetEvent(id.GetValue(),me.OnLoadMoreCompletedEvents)},GetOnPageEvent:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.DataList; return me.GetEvent(id.GetValue(),me.OnPageEvents)},GetOnPageCompletedEvent:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.DataList;return me.GetEvent(id.GetValue(),me.OnPageCompletedEvents)},GetOnRemoveItemEvent:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.DataList;return me.GetEvent(id.GetValue(),me.OnRemoveItemEvents)},HighlightItem:function(itemId){var itemNode=D2L.LP.Web.UI.Html.Dom.GetElementById(itemId.GetValue());D2L.LP.Web.UI.Desktop.Controls.DataList.HighlightItemByNode(itemNode)}, HighlightItemByNode:function(itemNode){if(!itemNode)return;D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-datalist-item-highlight-transition-color",itemNode);setTimeout(function(){D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-datalist-item-highlight-transition",itemNode);if(D2L.LP.Web.UI.Html.Css.Capability.SupportsTransition())D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-datalist-item-highlight-transition-color",itemNode);setTimeout(function(){D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-datalist-item-highlight-transition", itemNode);D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-datalist-item-highlight-transition-color",itemNode)},1500)},0)},LoadMore:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.DataList;var listNode=me.GetListNode(id);var placeholderNode=me.GetDataListPlaceholder(listNode);if(placeholderNode===null)return;var placeholderId=placeholderNode.getAttribute("id");var onLoadMore;if(D2L.LP.Web.UI.ObjectRepository.HasKey(placeholderId)){onLoadMore=D2L.LP.Web.UI.ObjectRepository.Get(placeholderId,1);if(onLoadMore!== null){var nextItemNode=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(placeholderNode);var previousItemNode=D2L.LP.Web.UI.Html.Dom.GetPreviousElementSibling(placeholderNode);me.GetOnLoadEvent(id).Trigger();onLoadMore.call(onLoadMore).AddListener(function(){var itemNode;var itemNodes=[];if(previousItemNode===null)itemNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementChild(listNode);else itemNode=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(previousItemNode);while(itemNode!==null&&itemNode!=nextItemNode){if(!D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-datalist-item-placeholder", itemNode))itemNodes.push(itemNode);itemNode=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(itemNode)}me.SetIsNewItems(itemNodes,false);if(itemNodes.length>0){var focusableElement=D2L.LP.Web.UI.Html.Dom.GetNextFocusableElement(itemNodes[0]);if(focusableElement&&focusableElement.focus)focusableElement.focus()}me.SetIsEmptyTextVisible(listNode,false);me.AdjustLastVisibleChild(listNode);me.GetOnLoadMoreCompletedEvent(id).Trigger(me.GetHasMoreItems(id),itemNodes)})}}},MoveItemByNode:function(itemNode,moveToItemNode, isBefore){var me=D2L.LP.Web.UI.Desktop.Controls.DataList;var newList=moveToItemNode.parentNode;var sourceList=itemNode.parentNode;if(isBefore)newList.insertBefore(itemNode,moveToItemNode);else D2L.LP.Web.UI.Html.Dom.InsertElementAfter(itemNode,moveToItemNode);me.AdjustLastVisibleChild(newList);if(sourceList!==newList){var sourceListId=new D2L.LP.Web.UI.Html.AbsoluteHtmlId(sourceList.parentNode.getAttribute("id"));me.AdjustLastVisibleChild(sourceList);if(!me.GetHasVisibleItem(sourceListId))me.SetIsEmptyTextVisible(sourceList, true)}},RemoveItem:function(itemId){if(itemId===null)return;var me=D2L.LP.Web.UI.Desktop.Controls.DataList;var itemNode=D2L.LP.Web.UI.Html.Dom.GetElementById(itemId.GetValue());me.RemoveItemByNode(itemNode)},RemoveItemByNode:function(itemNode){if(itemNode===null)return;var me=D2L.LP.Web.UI.Desktop.Controls.DataList;var listNode=itemNode.parentNode;var dataListId=new D2L.LP.Web.UI.Html.AbsoluteHtmlId(listNode.parentNode.getAttribute("id"));listNode.removeChild(itemNode);if(!me.GetHasVisibleItem(dataListId))me.SetIsEmptyTextVisible(listNode, true);me.AdjustLastVisibleChild(listNode);me.GetOnRemoveItemEvent(dataListId).Trigger(itemNode)},ReplaceItem:function(itemId,placeholderId,provider){if(placeholderId===null||provider===null)return;var itemNode=D2L.LP.Web.UI.Html.Dom.GetElementById(itemId.GetValue());if(itemNode===null)return;itemNode.setAttribute("id",placeholderId.GetValue());var dataListId=new D2L.LP.Web.UI.Html.AbsoluteHtmlId(itemNode.parentNode.parentNode.getAttribute("id"));var rc=D2L.LP.Web.UI.ObjectRepository.TryGet(placeholderId.GetValue()); if(rc===null)if(!D2L.LP.Web.UI.ObjectRepository.TryClone(dataListId.GetValue(),"0",placeholderId.GetValue(),"0"))return;var me=D2L.LP.Web.UI.Desktop.Controls.DataList;provider.call(provider).AddListener(function(){var listNode=me.GetListNode(dataListId);me.AdjustLastVisibleChild(listNode);me.GetOnLoadMoreCompletedEvent(dataListId).Trigger(me.GetHasMoreItems(dataListId));D2L.LP.Web.UI.ObjectRepository.Remove(placeholderId.GetValue(),"0")})},ReplaceItemContent:function(itemId,placeholderId,provider){var me= D2L.LP.Web.UI.Desktop.Controls.DataList;if(placeholderId===null||provider===null)return;var itemNode=D2L.LP.Web.UI.Html.Dom.GetElementById(itemId.GetValue());if(itemNode===null)return;var contentNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-datalist-item-content",itemNode);contentNode.setAttribute("id",placeholderId.GetValue());D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-placeholder-inner",contentNode);var dataListId=me.GetDataListIdByItemId(itemId);var rc=D2L.LP.Web.UI.ObjectRepository.TryGet(placeholderId.GetValue()); if(rc===null)if(!D2L.LP.Web.UI.ObjectRepository.TryClone(dataListId.GetValue(),"0",placeholderId.GetValue(),"0"))return;provider.call(provider).AddListener(function(){D2L.LP.Web.UI.ObjectRepository.Remove(placeholderId.GetValue(),"0")})},RemoveItemClassNames:function(node,className){if(node!==undefined&&className.length>0)node.className=node.className.replace(" "+className,"")},ScrollToFirstItem:function(dataListId){var me=D2L.LP.Web.UI.Desktop.Controls.DataList;var itemNode=me.GetFirstItemNode(dataListId, false);if(!itemNode)return;var isVisible=D2L.LP.Web.UI.Html.Dom.IsVisibleInContainer(itemNode);if(isVisible)return;return D2L.LP.Web.UI.Html.Dom.ScrollToElement(itemNode,0,false)},SetIsEmptyTextVisible:function(listNode,isVisible){var emptyTextNode=D2L.LP.Web.UI.Html.Dom.GetPreviousElementSibling(listNode);if(isVisible){D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-hidden",listNode);D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-hidden",emptyTextNode)}else{D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-hidden", emptyTextNode);D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-hidden",listNode)}},SetItemIsVisible:function(id,isVisible){var item=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(item,isVisible);D2L.LP.Web.UI.Desktop.Controls.DataList.AdjustLastVisibleChild(item.parentNode)},SetIsNewItems:function(itemNodes,isNew){if(isNew)for(var i=0;i<itemNodes.length;i++)D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-datalist-newitem",itemNodes[i]);else for(var j=0;j<itemNodes.length;j++)D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-datalist-newitem", itemNodes[j])},TryFocusFirstItem:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.DataList;var firstItemNode=me.GetFirstItemNode(id);if(!firstItemNode)return false;var focusableElements=$(firstItemNode).find(":focusable");if(!focusableElements||focusableElements.length===0)return false;focusableElements[0].focus();return true},TryGetSelectionUpdatedEvent:function(id){var summaryNode=D2L.LP.Web.UI.Desktop.Controls.DataList.Summary.GetSummaryNode(id);if(summaryNode===null)return null;var e=D2L.LP.Web.UI.Desktop.Controls.DataList.Summary.GetSelectionUpdatedEvent(id); return e},OnLoadEvents:{},OnLoadCompletedEvents:{},OnLoadMoreCompletedEvents:{},OnPageEvents:{},OnPageCompletedEvents:{},OnRemoveItemEvents:{},CaptureOnClickRules:{"A":true,"BUTTON":true,"D2L-BUTTON":true,"D2L-BUTTON-ICON":true,"D2L-BUTTON-SUBTLE":true,"INPUT":true,"LABEL":true,"SELECT":true,"TEXTAREA":true}}; D2L.LP.Web.UI.Desktop.Controls.DataList.SimpleItems={SetIsSelected:function(itemId,isSelected){var itemNode=D2L.LP.Web.UI.Html.Dom.GetElementById(itemId.GetValue());if(itemNode==null)return;if(isSelected)D2L.LP.Web.UI.Html.Dom.AddClassName("vui-selected",itemNode);else D2L.LP.Web.UI.Html.Dom.RemoveClassName("vui-selected",itemNode)}}; D2L.LP.Web.UI.Desktop.Controls.TimeRangeBinder={Init:function(startId,endId,autoShiftTimes,inclusive){var me=D2L.LP.Web.UI.Desktop.Controls.TimeRangeBinder;var ts=D2L.LP.Web.UI.Desktop.Controls.TimeSelector;var startNodes=ts.GetNodes(startId);var endNodes=ts.GetNodes(endId);$(startNodes.container).on("d2l-time-selector-change",function(evt,time,prevTime){me.OnStartChange(startNodes,endNodes,time,prevTime,true,autoShiftTimes,inclusive)});$(endNodes.container).on("d2l-time-selector-change",function(){me.RenderValidation(startNodes, endNodes,true,inclusive)})},OnStartChange:function(startNodes,endNodes,time,prevTime,isSameDay,autoShiftTimes,inclusive){var me=D2L.LP.Web.UI.Desktop.Controls.TimeRangeBinder;var ts=D2L.LP.Web.UI.Desktop.Controls.TimeSelector;var endTime=ts.GetTimeNodes(endNodes);var wasValid=me.Validate(prevTime,endTime,inclusive);if(isSameDay&&wasValid&&autoShiftTimes){var hourDiff=time.GetHour()-prevTime.GetHour();var minuteDiff=time.GetMinute()-prevTime.GetMinute();var newEndHour=endTime.GetHour()+hourDiff;var newEndMinute= endTime.GetMinute()+minuteDiff;if(newEndMinute>59){newEndHour++;newEndMinute-=60}else if(newEndMinute<0){newEndHour--;newEndMinute+=60}if(newEndHour>23){newEndHour=23;newEndMinute=59}else if(newEndHour<0){newEndHour=0;newEndMinute=0}ts.SetTimeNodes(endNodes,new D2L.LocalTime(newEndHour,newEndMinute,0))}me.RenderValidation(startNodes,endNodes,isSameDay,inclusive)},RenderValidation:function(startNodes,endNodes,isSameDay,inclusive){var me=D2L.LP.Web.UI.Desktop.Controls.TimeRangeBinder;var isVisible= D2L.LP.Web.UI.Html.Dom.IsVisible(endNodes.edit);var isValid=me.ValidateNodes(startNodes,endNodes,inclusive);if(!isSameDay||isValid){endNodes.edit.removeAttribute("aria-invalid");startNodes.edit.removeAttribute("aria-invalid")}else{endNodes.edit.setAttribute("aria-invalid","true");if(!isVisible)startNodes.edit.setAttribute("aria-invalid","true")}},ValidateIds:function(startId,endId,inclusive){var ts=D2L.LP.Web.UI.Desktop.Controls.TimeSelector;return D2L.LP.Web.UI.Desktop.Controls.TimeRangeBinder.ValidateNodes(ts.GetNodes(startId), ts.GetNodes(endId),inclusive)},ValidateNodes:function(startNodes,endNodes,inclusive){var ts=D2L.LP.Web.UI.Desktop.Controls.TimeSelector;var startIsEnabled=ts.IsEnabledNodes(startNodes);var endIsEnabled=ts.IsEnabledNodes(endNodes);if(!startIsEnabled||!endIsEnabled)return true;var startTime=ts.GetTimeNodes(startNodes);var endTime=ts.GetTimeNodes(endNodes);return D2L.LP.Web.UI.Desktop.Controls.TimeRangeBinder.Validate(startTime,endTime,inclusive)},Validate:function(startTime,endTime,inclusive){if(startTime.GetHour()=== endTime.GetHour())return inclusive?startTime.GetMinute()<=endTime.GetMinute():startTime.GetMinute()<endTime.GetMinute();return startTime.GetHour()<endTime.GetHour()}}; D2L.LP.Web.UI.Desktop.Controls.TimeSelector={IntervalEnum:{Five:5,Ten:10,Fifteen:15,Twenty:20,Thirty:30,Sixty:60},BuildSelectList:function(nodes,timeInterval){if(timeInterval===null||timeInterval==undefined||timeInterval<5||timeInterval>60)timeInterval=30;if(nodes.list===null){nodes.list=document.createElement("ul");D2L.LP.Web.UI.Html.Dom.SetAttribute(nodes.list,"role","listbox");nodes.list.className="d2l-time-selector-list";nodes.floatingContainer.appendChild(nodes.list)}while(nodes.list.childNodes.length> 0)nodes.list.removeChild(nodes.list.firstChild);var locale=D2L.LP.Globalization.Locale;var dateTimeFormatter=locale.GetDateTimeFormatter();var hour=0;var minute=0;while(hour<24){var time=new D2L.LocalTime(hour,minute,0);var timeStr=dateTimeFormatter.FormatTime(time);var item=document.createElement("li");D2L.LP.Web.UI.Html.Dom.SetAttribute(item,"role","option");var id=new D2L.LP.Web.UI.Html.UniqueHtmlId;item.id=id.GetValue();item.d2l_time=time;item.d2l_index=nodes.list.childNodes.length;item.appendChild(document.createTextNode(timeStr)); nodes.list.appendChild(item);minute+=timeInterval;if(minute>=60){++hour;minute-=60}}},GetNodes:function(id){var idVal=id.GetValue();var node=D2L.LP.Web.UI.Html.Dom.GetElementById(idVal);if(node===null)throw"TimeSelector not found: '"+idVal+"'.";return D2L.LP.Web.UI.Desktop.Controls.TimeSelector.GetNodesByNode(node)},GetNodesByNode:function(node){var container=node.parentNode;var hour=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(node);if(D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-form-balloon",hour))hour= D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(hour);var minute=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(hour);var isEnabled=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(minute);var floatingContainer=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(isEnabled);var list=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-time-selector-list",floatingContainer);return{container:container,floatingContainer:floatingContainer,hour:hour,minute:minute,isEnabled:isEnabled,edit:node,list:list}},GetTime:function(id){var nodes= D2L.LP.Web.UI.Desktop.Controls.TimeSelector.GetNodes(id);return D2L.LP.Web.UI.Desktop.Controls.TimeSelector.GetTimeNodes(nodes)},GetTimeNodes:function(nodes){var hour=parseInt(nodes.hour.value);var minute=parseInt(nodes.minute.value);var result=new D2L.LocalTime(hour,minute,0);return result},IsEnabledNodes:function(nodes){return!nodes.edit.disabled},SetEnforceTimeIntervals:function(id,isEnforced){id.$().data("enforcetimeintervals",isEnforced)},SetIsEnabled:function(id,isEnabled){var me=D2L.LP.Web.UI.Desktop.Controls.TimeSelector; me.SetIsEnabledNodes(me.GetNodes(id),isEnabled)},SetIsEnabledNodes:function(nodes,isEnabled){var me=D2L.LP.Web.UI.Desktop.Controls.TimeSelector;nodes.isEnabled.value=isEnabled?"1":"0";nodes.edit.disabled=!isEnabled;var time=me.GetTimeNodes(nodes);$(nodes.container).trigger("d2l-time-selector-change",[time,time])},SetIsVisible:function(id,isVisible){var me=D2L.LP.Web.UI.Desktop.Controls.TimeSelector;me.SetIsVisibleNode(me.GetNodes(id).container,isVisible)},SetIsVisibleNode:function(node,isVisible){D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(node, isVisible)},SetTime:function(id,time){var me=D2L.LP.Web.UI.Desktop.Controls.TimeSelector;var nodes=me.GetNodes(id);me.SetTimeNodes(nodes,time)},SetTimeInterval:function(id,interval){interval=parseInt(interval);if(isNaN(interval))interval=30;var intervalEnum=D2L.LP.Web.UI.Desktop.Controls.TimeSelector.IntervalEnum;for(var timeInterval in intervalEnum){var timeValue=intervalEnum[timeInterval];if(interval<=timeValue){interval=timeValue;break}}if(interval>intervalEnum.Sixty)interval=60;id.$().data("timeinterval", interval)},SetTimeNodes:function(nodes,time,useInputTime){var prevTime=D2L.LP.Web.UI.Desktop.Controls.TimeSelector.GetTimeNodes(nodes);var locale=D2L.LP.Globalization.Locale;var dateTimeFormatter=locale.GetDateTimeFormatter();if(useInputTime){var dateTimeParser=locale.GetDateTimeParser();var inputtedTime=dateTimeParser.TryParseTime(nodes.edit.value);time=new D2L.LocalTime(inputtedTime.GetHour(),inputtedTime.GetMinute(),inputtedTime.GetSecond())}var timeStr=dateTimeFormatter.FormatTime(time);var oldTimeStr= nodes.edit.value;nodes.edit.value=timeStr;nodes.hour.value=time.GetHour();nodes.minute.value=time.GetMinute();$(nodes.container).trigger("d2l-time-selector-change",[time,prevTime]);if(timeStr!=oldTimeStr)$(nodes.edit).trigger("change")}}; D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector={IsEnabledNodes:function(nodes){return!nodes.edit.disabled},SetHasTime:function(id,hasTime){var me=D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector;var nodes=me.GetNodes(id);D2L.LP.Web.UI.Desktop.Controls.TimeSelector.SetIsVisibleNode(nodes.timeNodes.container,hasTime);nodes.hasTime.value=hasTime?"1":"0"},SetIsEnabled:function(id,isEnabled){var me=D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector;var nodes=me.GetNodes(id);me.SetIsEnabledNodes(nodes,isEnabled)}, GetIsEnabled:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector;var nodes=me.GetNodes(id);return me.IsEnabledNodes(nodes)},SetIsEnabledNodes:function(nodes,isEnabled){nodes.isEnabled.value=isEnabled?"1":"0";nodes.edit.disabled=!isEnabled;D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(nodes.calendarLink,isEnabled);D2L.LP.Web.UI.Desktop.Controls.TimeSelector.SetIsEnabledNodes(nodes.timeNodes,isEnabled);if(nodes.nowButton!=null)D2L.LP.Web.UI.Common.Controls.Button.SetIsEnabledNode(nodes.nowButton, isEnabled);var me=D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector;var dateTime=me.GetSelectedDateTimeNodes(nodes);$(nodes.container).trigger("d2l-datetime-selector-change",[dateTime,dateTime])},SetSelectedDateTime:function(id,selectedDateTime){var me=D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector;var nodes=me.GetNodes(id);me.SetSelectedDateTimeByNode(nodes,selectedDateTime)},PageInitialLoadTimestamp:(new Date).getTime(),SetDateTimeToNow:function(id,localDateTimeAtPageLoad){var me=D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector; var millisecondsSpentOnPage=(new Date).getTime()-me.PageInitialLoadTimestamp;var now=new Date(localDateTimeAtPageLoad.GetTimestamp()+millisecondsSpentOnPage);me.SetSelectedDateTime(id,D2L.LocalDateTime.FromJavaScriptDate(now))},SetSelectedDateTimeByNode:function(nodes,selectedDateTime){var me=D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector;var prevDateTime=me.GetSelectedDateTimeNodes(nodes);var prevDateTimeStr=nodes.edit.value;var formatter=D2L.LP.Globalization.Locale.GetDateTimeFormatter();nodes.edit.value= formatter.FormatInputDate(selectedDateTime);nodes.edit.d2l_lastGoodDate=selectedDateTime;nodes.year.value=selectedDateTime.GetYear();nodes.month.value=selectedDateTime.GetMonth();nodes.day.value=selectedDateTime.GetDay();var time=new D2L.LocalTime(selectedDateTime.GetHour(),selectedDateTime.GetMinute());D2L.LP.Web.UI.Desktop.Controls.TimeSelector.SetTimeNodes(nodes.timeNodes,time);setTimeout(function(){var miniCalPartialRenderFunction=D2L.LP.Web.UI.ObjectRepository.Get(nodes.edit.id,"CalPartial"); me.RefreshMiniCalendar(miniCalPartialRenderFunction)});$(nodes.container).trigger("d2l-datetime-selector-change",[selectedDateTime,prevDateTime]);if(prevDateTimeStr!=nodes.edit.value)$(nodes.edit).trigger("change")},SetSelectedDateByInputNodeId:function(id,selectedDateTime){var me=D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector;var nodes=me.GetNodes(id);var dateTime=me.GetSelectedDateTimeNodes(nodes);selectedDateTime=new D2L.LocalDateTime(selectedDateTime.GetYear(),selectedDateTime.GetMonth(),selectedDateTime.GetDay(), dateTime.GetHour(),dateTime.GetMinute(),0);me.SetSelectedDateTimeByNode(nodes,selectedDateTime)},GetSelectedDateTime:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector;var nodes=me.GetNodes(id);return me.GetSelectedDateTimeNodes(nodes)},GetSelectedDateTimeNodes:function(nodes){var year=parseInt(nodes.year.value);var month=parseInt(nodes.month.value);var day=parseInt(nodes.day.value);var time=D2L.LP.Web.UI.Desktop.Controls.TimeSelector.GetTimeNodes(nodes.timeNodes);return new D2L.LocalDateTime(year, month,day,time.GetHour(),time.GetMinute(),time.GetSecond())},GetNodes:function(id,phid){var idVal=id.GetValue();var edit=D2L.LP.Web.UI.Html.Dom.GetElementById(idVal);if(edit===null)throw"DateTimeSelector not found:'"+idVal+"'.";var container=edit.parentNode.parentNode;var timeContainer=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-time-selector",container);var timeEdit=D2L.LP.Web.UI.Html.Dom.GetFirstElementChild(timeContainer);var timeNodes=D2L.LP.Web.UI.Desktop.Controls.TimeSelector.GetNodes(new D2L.LP.Web.UI.Html.AbsoluteHtmlId(timeEdit.id)); var hiddens=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-datetime-selector-hiddens",container);var calendarLink=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-datetime-selector-calendar-link",container);var floatingContainer=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-floating-container",container);var placeholderContainer;if(phid==undefined||phid==null)placeholderContainer=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-placeholder",floatingContainer);else{placeholderContainer= D2L.LP.Web.UI.Html.Dom.GetElementById(phid);floatingContainer=D2L.LP.Web.UI.Html.Dom.GetParentElementByClassName("d2l-floating-container",placeholderContainer)}var miniCalendar;if(placeholderContainer==null||placeholderContainer==undefined)miniCalendar=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-calendar-mini",floatingContainer);else miniCalendar=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-calendar-mini",placeholderContainer);var year=D2L.LP.Web.UI.Html.Dom.GetFirstElementChild(hiddens); var month=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(year);var day=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(month);var hasTime=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(day);var isEnabled=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(hasTime);var nowButton=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-datetime-selector-now-button",container);return{container:container,edit:edit,timeNodes:timeNodes,year:year,month:month,day:day,hasTime:hasTime,isEnabled:isEnabled,calendarLink:calendarLink, floatingContainer:floatingContainer,miniCalendar:miniCalendar,nowButton:nowButton}},OpenMiniCalendar:function(floatingContainerId,dateInputId,openerId,focus,focusOnOpenTargetId){if(!D2L.LP.Web.UI.Desktop.Controls.FloatingContainer.IsOpen(floatingContainerId)){var openerNode=D2L.LP.Web.UI.Html.Dom.GetElementById(openerId.GetValue());D2L.LP.Web.UI.Desktop.Controls.FloatingContainer.Open(floatingContainerId,openerId,{AttachToBody:false,AutoCloseExclusions:[openerNode],FocusOnOpen:focus,FocusOnOpenTargetControlId:focusOnOpenTargetId, Position:D2L.LP.Web.UI.Html.Style.OverlayPosition.Bottom,TargetId:dateInputId})}},RefreshMiniCalendar:function(partialRenderFunction){partialRenderFunction.call(partialRenderFunction)},GetHasTimeNodes:function(nodes){var hasTime=nodes.hasTime.value=="1";return hasTime},ValidateRange:function(id,ignoreTime,earliest,latest){var selectedDate=D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector.GetSelectedDateTime(id);if(earliest!==null&&latest!==null){var isEarly=D2L.LocalDateTime.Compare(selectedDate,earliest, ignoreTime)<0;var isLate=D2L.LocalDateTime.Compare(selectedDate,latest,ignoreTime)>0;return!isEarly&&!isLate}else if(earliest!==null)return D2L.LocalDateTime.Compare(selectedDate,earliest,ignoreTime)>=0;else return D2L.LocalDateTime.Compare(selectedDate,latest,ignoreTime)<=0}}; D2L.LP.Web.UI.Desktop.Controls.EditInPlace={Click:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());D2L.LP.Web.UI.Desktop.Controls.EditInPlace.ClickHelper(node,false)},ClickHelper:function(node,autoResize){var id=node.id;$(node).parent().attr("data-isOpen","true");var targetId=D2L.LP.Web.UI.ObjectRepository.TryGet(id);if(targetId==null)return;var targetIdValue=targetId.GetValue();var target=D2L.LP.Web.UI.Html.Dom.GetElementById(targetIdValue);target.d2l_opener=node;if(autoResize){var rect= D2L.LP.Web.UI.Html.Dom.GetBoundingRect(node);target.style.width=Math.max(rect.width,100)+"px";target.style.minHeight=rect.height+"px"}D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(node,false);D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(target,true);if(D2L.LP.Web.UI.ObjectRepository.HasKeys(targetIdValue,"edit")){var onEdit=D2L.LP.Web.UI.ObjectRepository.Get(targetIdValue,"edit");onEdit()}},Finish:function(id){var target=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());D2L.LP.Web.UI.Desktop.Controls.EditInPlace.FinishHelper(target)}, FinishHelper:function(target,doTrigger,isEmpty){var targetIdVal=target.id;var opener=target.d2l_opener;var anchor=D2L.LP.Web.UI.Html.Dom.GetPreviousElementSibling(opener);target.d2l_opener=null;if(isEmpty!==undefined)D2L.LP.Web.UI.Desktop.Controls.EditInPlace.SetIsEmptyHelper(opener,isEmpty);D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(opener,true);D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(target,false);if(doTrigger){var hasFinish=D2L.LP.Web.UI.ObjectRepository.HasKeys(targetIdVal,"finish");if(hasFinish){var onFinish= D2L.LP.Web.UI.ObjectRepository.Get(targetIdVal,"finish");var ret=onFinish();ret.AddListener(function(){var editable=$(target).prev()[0];D2L.LP.Web.UI.Desktop.Controls.EditInPlace.ModifyAnchors(editable)})}D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-editable-changed",opener)}else{var hasAbort=D2L.LP.Web.UI.ObjectRepository.HasKeys(targetIdVal,"abort");if(hasAbort){var onAbort=D2L.LP.Web.UI.ObjectRepository.Get(targetIdVal,"abort");onAbort()}}setTimeout(function(){D2L.LP.Web.UI.Html.Dom.FocusNode(anchor)}, 0);setTimeout(function(){D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-editable-changed",opener)},1500)},GetHtmlEditorContent:function(id){var htmlEditorId=$("#"+id.GetValue()).attr("data-d2l-htmleditorid");var htmlParam=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.GetHtml(new D2L.LP.Web.UI.Html.AbsoluteHtmlId(htmlEditorId));return htmlParam},IsEditorOpen:function(id){return $("#"+id.GetValue()).attr("data-isOpen")},ModifyAnchors:function(node){$(node).find("a").attr("target","_blank")},SetIsEmpty:function(id, isEmpty){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());D2L.LP.Web.UI.Desktop.Controls.EditInPlace.SetIsEmptyHelper(node,isEmpty)},SetIsEmptyHelper:function(node,isEmpty){var empty=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-editable-empty",node);if(empty!==null)D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(empty,isEmpty);var container=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-editable-content",node);if(container!==null)D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(container, !isEmpty)}};D2L.LP.Web.UI.Desktop.Controls.EditInPlace.Edit={Clear:function(id){var target=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var edit=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-edit",target);D2L.LP.Web.UI.Common.Controls.Edit.ClearValueNode(edit)},OnEdit:function(id){var edit=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());edit.d2l_value=edit.value;edit.select()}}; D2L.LP.Web.UI.Desktop.Controls.EditInPlace.EditUrl={OnEdit:function(id){var edit=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());edit.d2l_value=edit.value;if(edit.value=="")edit.value="http://";edit.select()}};D2L.LP.Web.UI.Desktop.Controls.EditInPlace.LongEdit={Clear:function(id){var target=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var edit=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-longedit",target);D2L.LP.Web.UI.Common.Controls.LongEdit.ClearValueNode(edit)}}; D2L.LP.Web.UI.Desktop.Controls.EditInPlace.HtmlEditor={Cancel:function(editorId,targetId){var target=D2L.LP.Web.UI.Html.Dom.GetElementById(targetId.GetValue());D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.SetHtml(editorId,target.d2l_html);D2L.LP.Web.UI.Desktop.Controls.EditInPlace.FinishHelper(target)},GetHtml:function(id){var target=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(target.d2l_html!==undefined)return target.d2l_html;else return""},OnEdit:function(id,editorId,html){var evt=new D2L.LP.Web.UI.Events.Event; var targetId=id.GetValue();var target=D2L.LP.Web.UI.Html.Dom.GetElementById(targetId);if(target.d2l_initialized==true){D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.Focus(editorId);evt.Trigger()}else{if(target.d2l_html===undefined)target.d2l_html=html;var initializeEditor=D2L.LP.Web.UI.ObjectRepository.TryGet(targetId,"initializeEditor");if(initializeEditor!=null){initializeEditor.call(initializeEditor).AddListener(function(){D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.Focus(editorId);evt.Trigger()});target.d2l_initialized= true}else evt.Trigger()}return evt},Update:function(id,param){var target=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var hasChanged=false;var newHtml=param.GetHtml();if(target.d2l_html!=newHtml){target.d2l_html=newHtml;hasChanged=true}var isEmpty=newHtml==null||newHtml.length==0;D2L.LP.Web.UI.Desktop.Controls.EditInPlace.FinishHelper(target,hasChanged,isEmpty)},GetOnInit:function(id){}};D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-emoticon-selector",function(node){D2L.LP.Web.UI.Desktop.Controls.EmoticonSelector.Init(node)}); D2L.LP.Web.UI.Desktop.Controls.EmoticonSelector={Init:function(node){var me=D2L.LP.Web.UI.Desktop.Controls.EmoticonSelector;var onSelectFunction=D2L.LP.Web.UI.ObjectRepository.TryGet(node.id,"OnSelectFunction");var emoticonNodes=me.GetEmoticonNodes(node);for(var e=0;e<emoticonNodes.length;e++){var target=emoticonNodes[e];D2L.LP.Web.UI.Html.Dom.AddEventListener("mouseenter",target,function(event){me.SetActive(event,node)});D2L.LP.Web.UI.Html.Dom.AddEventListener("mouseleave",target,me.SetInactive); D2L.LP.Web.UI.Html.Dom.AddEventListener("click",target,function(){if(onSelectFunction===null)return;onSelectFunction.call(onSelectFunction)})}var numEmoticonsPerRow=parseInt(node.getAttribute("data-d2l-emoticonrowsize"),10);D2L.LP.Web.UI.Html.Dom.AddKeyPressEventListener(node,function(args){var result=me.HandleKeyPress(args,node,emoticonNodes,numEmoticonsPerRow,onSelectFunction);if(result){var event=args.GetEventObject();D2L.LP.Web.UI.Html.Dom.CancelEventDefaultBehaviour(event)}});me.SetAriaRoles(node); me.ClearActiveNodes(node);me.SetNodeActive(emoticonNodes[0])},SetAriaRoles:function(node){D2L.LP.Web.UI.Html.Aria.SetRole(node,"application");var emoticonList=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-emoticon-selector-emoticon-list",node);var heading=D2L.LP.Web.UI.Html.Dom.GetPreviousElementSibling(emoticonList);D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-emoticonselector-title",heading);D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-emoticonselector-rclabel",heading);D2L.LP.Web.UI.Html.Aria.SetAttribute(emoticonList, "labelledby",heading.id)},SetActive:function(event,selector){var me=D2L.LP.Web.UI.Desktop.Controls.EmoticonSelector;var target;if(event.target)target=event.target;if(event.srcElement)target=event.srcElement;me.SetNodeActive(target,selector)},SetInactive:function(event){var me=D2L.LP.Web.UI.Desktop.Controls.EmoticonSelector;var target;if(event.target)target=event.target;if(event.srcElement)target=event.srcElement;me.SetNodeInactive(target)},SetNodeActive:function(node,selector){var me=D2L.LP.Web.UI.Desktop.Controls.EmoticonSelector; if(!me.IsActiveNode(node)){me.ClearActiveNodes(selector);D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-emoticon-selector-emoticon-active",node);node.focus()}},SetNodeInactive:function(node){var me=D2L.LP.Web.UI.Desktop.Controls.EmoticonSelector;if(me.IsActiveNode(node))D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-emoticon-selector-emoticon-active",node)},GetActiveNode:function(node){var me=D2L.LP.Web.UI.Desktop.Controls.EmoticonSelector;var emoticonNodes=me.GetEmoticonNodes(node);var activeNode=me.GetActiveNodeFromEmoticonNodes(emoticonNodes); return activeNode},GetActiveNodeFromEmoticonNodes:function(emoticonNodes){var me=D2L.LP.Web.UI.Desktop.Controls.EmoticonSelector;for(var i=0;i<emoticonNodes.length;i++){var currentNode=emoticonNodes[i];if(me.IsActiveNode(currentNode))return currentNode}return null},GetEmoticonNodes:function(node){var emoticonNodes=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-emoticon-selector-nav",node);return emoticonNodes},IsActiveNode:function(node){var isActive=D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-emoticon-selector-emoticon-active", node);return isActive},HandleKeyPress:function(args,selector,emoticonNodes,emoticonsPerRow,onSelectFunction){var me=D2L.LP.Web.UI.Desktop.Controls.EmoticonSelector;var keyCode=args.GetKey();if(keyCode===D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.Tab){var event=args.GetEventObject();var target=D2L.LP.Web.UI.Html.Dom.GetEventTargetElement(event);if(!target||emoticonNodes.indexOf(target)<0||me.IsActiveNode(target))return false;me.SetNodeActive(target,selector);return true}if(keyCode===D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.Enter){var event= args.GetEventObject();var target=D2L.LP.Web.UI.Html.Dom.GetEventTargetElement(event);if(!target||!me.IsActiveNode(target))return false;if(onSelectFunction===null)return false;onSelectFunction.call(onSelectFunction);return true}var result=me.HandleNav(selector,keyCode,emoticonNodes,emoticonsPerRow);return result},HandleNav:function(selector,keyCode,emoticonNodes,emoticonsPerRow){var me=D2L.LP.Web.UI.Desktop.Controls.EmoticonSelector;var currentActiveNode=me.GetActiveNodeFromEmoticonNodes(emoticonNodes); var currentPosition=emoticonNodes.indexOf(currentActiveNode);var navFunction;var isRowPositionValidFunction;var isRTL=D2L.LP.Globalization.Locale.GetTextFormatDescriptor().TextDirection===D2L.LP.Globalization.Formatting.Text.TextDirection.RightToLeft;var leftMovePositionCheck=function(currentPos,newPos){var isNewPositionValid=newPos%emoticonsPerRow<currentPos%emoticonsPerRow;return isNewPositionValid};var rightMovePositionCheck=function(currentPos,newPos){var isNewPositionValid=newPos%emoticonsPerRow> currentPos%emoticonsPerRow;return isNewPositionValid};switch(keyCode){case D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.ArrowUp:navFunction=function(currentPos){newPos=currentPos-emoticonsPerRow;return newPos};break;case D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.ArrowDown:navFunction=function(currentPos){newPos=currentPos+emoticonsPerRow;return newPos};break;case D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.ArrowLeft:navFunction=function(currentPos){newPos=isRTL?currentPos+1:currentPos-1;return newPos}; isRowPositionValidFunction=isRTL?rightMovePositionCheck:leftMovePositionCheck;break;case D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.ArrowRight:navFunction=function(currentPos){newPos=newPos=isRTL?currentPos-1:currentPos+1;return newPos};isRowPositionValidFunction=isRTL?leftMovePositionCheck:rightMovePositionCheck;break;default:break}if(navFunction){me.ArrowNavHandler(navFunction,isRowPositionValidFunction,emoticonNodes,currentActiveNode,currentPosition);return true}return false},ArrowNavHandler:function(navFunction, isRowPositionValidFunction,emoticonNodes,currentActiveNode,currentPosition){var me=D2L.LP.Web.UI.Desktop.Controls.EmoticonSelector;var newPosition;if(currentActiveNode===null)newPosition=0;else newPosition=navFunction(currentPosition);if(isRowPositionValidFunction&&!isRowPositionValidFunction(currentPosition,newPosition))return;if(!me.IsAbsolutePositionValid(emoticonNodes.length,newPosition))return;var newActiveNode=emoticonNodes[newPosition];me.SetNodeInactive(currentActiveNode);me.SetNodeActive(newActiveNode)}, IsAbsolutePositionValid:function(numberOfEmoticons,position){var minPosition=0;var maxPosition=numberOfEmoticons-1;var isPositionValid=position>=minPosition&&position<=maxPosition;return isPositionValid},ClearActiveNodes:function(node){var me=D2L.LP.Web.UI.Desktop.Controls.EmoticonSelector;var emoticonNodes=me.GetEmoticonNodes(node);for(var e=0;e<emoticonNodes.length;e++){var currentNode=emoticonNodes[e];me.SetNodeInactive(currentNode)}},InsertEmoticon:function(selectorId,baseEmoticonLocation){var me= D2L.LP.Web.UI.Desktop.Controls.EmoticonSelector;var selector=D2L.LP.Web.UI.Html.Dom.GetElementById(selectorId);var activeNode=me.GetActiveNode(selector);if(activeNode===null)return;var emoticonName=activeNode.getAttribute("data-d2l-emoji");var altText=activeNode.getAttribute("title").toLowerCase();var emoticonPath=baseEmoticonLocation+emoticonName+".svg";var html="<img";html+=' src="'+emoticonPath+'"';html+=' alt="'+altText+'"';html+=' data-d2l-emoji="'+emoticonName+'"';html+=">";return html}}; D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-fileinput",function(node){var me=D2L.LP.Web.UI.Desktop.Controls.FileInput;var initialChangeKey=me.GetChangeKey(node);$(node).data("changeKey",initialChangeKey);me.SetAddFileVisibility(node)}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-fileinput-upload-progress",function(node){D2L.LP.Web.UI.Html.Aria.SetRole(node,"progressbar");D2L.LP.Web.UI.Html.Aria.SetAttribute(node,"aria-valuemin","0");D2L.LP.Web.UI.Html.Aria.SetAttribute(node,"aria-valuemax","100");D2L.LP.Web.UI.Html.Aria.SetAttribute(node,"aria-valuenow","0")});D2L.LP.Web.UI.Html.PartialRendering.AddClassNameToFocusIncludeList("d2l-fileinput"); D2L.LP.Web.UI.Desktop.Controls.FileInput={AddFiles:function(id,files){var evt=new D2L.LP.Web.UI.Events.Event;var me=D2L.LP.Web.UI.Desktop.Controls.FileInput;var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var placeholderNode=me.GetFilePlaceholder(node);var listNode=me.GetFileListNode(node);if(placeholderNode==null){evt.Release();return evt}var placeholderId=placeholderNode.getAttribute("id");var onAddFile=D2L.LP.Web.UI.ObjectRepository.TryGet(placeholderId,1);if(onAddFile==null){evt.Release(); return evt}node.d2l_addFiles=files;onAddFile.call(onAddFile).AddListener(function(){node.d2l_lastAddedFiles=node.d2l_addFiles;var onAddFilesComplete=D2L.LP.Web.UI.ObjectRepository.TryGet(node.getAttribute("id"),"OnAddFilesComplete");if(onAddFilesComplete!==null)onAddFilesComplete.call(onAddFilesComplete);node.d2l_addFiles=undefined;me.SetAddFileVisibility(node);D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-hidden",listNode);me.TriggerChangeEvent(node);evt.Trigger()});return evt},AddLinks:function(id, links){var evt=new D2L.LP.Web.UI.Events.Event;var me=D2L.LP.Web.UI.Desktop.Controls.FileInput;var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var placeholderNode=me.GetFilePlaceholder(node);var listNode=me.GetFileListNode(node);if(placeholderNode==null){evt.Release();return evt}var placeholderId=placeholderNode.getAttribute("id");var onAddLink=D2L.LP.Web.UI.ObjectRepository.TryGet(placeholderId,2);if(onAddLink==null){evt.Release();return evt}node.d2l_addLinks=links;onAddLink.call(onAddLink).AddListener(function(){node.d2l_lastAddedLinks= node.d2l_addLinks;var onAddLinksComplete=D2L.LP.Web.UI.ObjectRepository.TryGet(node.getAttribute("id"),"OnAddLinksComplete");if(onAddLinksComplete!==null)onAddLinksComplete.call(onAddLinksComplete);node.d2l_addLinks=undefined;me.SetAddFileVisibility(node);D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-hidden",listNode);me.TriggerChangeEvent(node);evt.Trigger()});return evt},Clear:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.FileInput;var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue()); var listNode=me.GetFileListNode(node);var itemNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementChild(listNode);while(itemNode!=null){if(!D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-fileinput-placeholder",itemNode))me.RemoveFile(new D2L.LP.Web.UI.Html.AbsoluteHtmlId(itemNode.getAttribute("id")));itemNode=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(itemNode)}me.SetErrorMessageVisibility(node,"d2l-fileinput-filecount-error",false);me.SetErrorMessageVisibility(node,"d2l-fileinput-filetype-error",false);me.SetErrorMessageVisibility(node, "d2l-fileinput-filesize-error",false);me.SetErrorMessageVisibility(node,"d2l-fileinput-fileempty-error",false);me.SetErrorMessageVisibility(node,"d2l-fileinput-fileupload-error",false)},GetAbortLinkNodeByNode:function(node){var me=D2L.LP.Web.UI.Desktop.Controls.FileInput;var progressBarNode=me.GetProgressBarNodeByNode(node);var abortLinkNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementChild(progressBarNode);return abortLinkNode},GetAddButtonsNode:function(node){return D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-fileinput-addbuttons", node)},GetAddFilesByPlaceholderId:function(placeholderId){var placeholderNode=D2L.LP.Web.UI.Html.Dom.GetElementById(placeholderId.GetValue());var node=D2L.LP.Web.UI.Html.Dom.GetParentElementByClassName("d2l-fileinput",placeholderNode);if(node.d2l_addFiles!==undefined)return node.d2l_addFiles;else return[]},GetAddLinksByPlaceholderId:function(placeholderId){var placeholderNode=D2L.LP.Web.UI.Html.Dom.GetElementById(placeholderId.GetValue());var node=D2L.LP.Web.UI.Html.Dom.GetParentElementByClassName("d2l-fileinput", placeholderNode);if(node.d2l_addLinks!==undefined)return node.d2l_addLinks;else return[]},GetChangeKey:function(node){var newKey="";var comma="";var files=D2L.LP.Web.UI.Desktop.Controls.FileInput.GetFilesByNode(node);var links=D2L.LP.Web.UI.Desktop.Controls.FileInput.GetLinksByNode(node);for(var i=0;i<files.length;i++){var actionType=files[i].GetActionType();if(actionType!="AddRemove"){newKey+=comma+(files[i].GetActionType()+files[i].GetPluginKey()+files[i].GetId());comma=","}}for(var i=0;i<links.length;i++){var linkActionType= links[i].GetActionType();if(linkActionType!="AddRemove"){newKey+=comma+(links[i].GetActionType()+links[i].GetLinkName()+links[i].GetLocation());comma=","}}return newKey},GetFileCount:function(node){var me=D2L.LP.Web.UI.Desktop.Controls.FileInput;var fileCount=0;var listNode=me.GetFileListNode(node);var itemNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementChild(listNode);while(itemNode!=null){if(!D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-hidden",itemNode)&&!D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-fileinput-placeholder", itemNode))fileCount++;itemNode=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(itemNode)}return fileCount},GetFileListNode:function(node){return D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-fileinput-filelist",node)},GetFilePlaceholder:function(node){return D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-fileinput-placeholder",node)},GetFiles:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var files=D2L.LP.Web.UI.Desktop.Controls.FileInput.GetFilesByNode(node); return files},GetLinks:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var links=D2L.LP.Web.UI.Desktop.Controls.FileInput.GetLinksByNode(node);return links},GetFilesByNode:function(node){var me=D2L.LP.Web.UI.Desktop.Controls.FileInput;var listNode=me.GetFileListNode(node);var files=[];var itemNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementChild(listNode);while(itemNode!=null){if(itemNode.classList.contains("d2l-fileinput-link")){itemNode=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(itemNode); continue}var fileName=itemNode.getAttribute("data-d2l-name");var actionTypeNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementChild(itemNode);var pluginKeyNode=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(actionTypeNode);var idNode=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(pluginKeyNode);var fileSizeNode=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(idNode);var previewHrefNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-link",itemNode);var previewUrl=previewHrefNode&&previewHrefNode.href;files.push(new D2L.LP.Web.UI.Desktop.Controls.FileInput.FileParam(fileName, actionTypeNode.value,pluginKeyNode.value,idNode.value,fileSizeNode.value,previewUrl));itemNode=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(itemNode)}return files},GetLinksByNode:function(node){var me=D2L.LP.Web.UI.Desktop.Controls.FileInput;var listNode=me.GetFileListNode(node);var links=[];var itemNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementChild(listNode);while(itemNode!=null){if(!itemNode.classList.contains("d2l-fileinput-link")){itemNode=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(itemNode); continue}var linkName=itemNode.getAttribute("data-d2l-name");var actionTypeNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementChild(itemNode);var nameNode=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(actionTypeNode);var locationNode=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(nameNode);links.push(new D2L.LP.Web.UI.Desktop.Controls.FileInput.LinkParam(linkName,actionTypeNode.value,locationNode.value));itemNode=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(itemNode)}return links},GetLastAddedFiles:function(id){var node= D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var files=node.d2l_lastAddedFiles;if(node.d2l_lastAddedFiles===undefined&&node.d2l_lastAddedFiles===null)files=[];return new D2L.LP.Web.UI.Desktop.Controls.FileInput.Param(files)},GetParam:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.FileInput;var files=me.GetFiles(id);var links=me.GetLinks(id);return new D2L.LP.Web.UI.Desktop.Controls.FileInput.Param(files,links)},GetProgressBarNodeByNode:function(node){var progressBarNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-fileinput-upload-progress", node);return progressBarNode},GetRemovedFile:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var removedFile=[];removedFile.push(node.d2l_removedFile);return new D2L.LP.Web.UI.Desktop.Controls.FileInput.Param(removedFile)},GetUploadButtonId:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var buttons=D2L.LP.Web.UI.Desktop.Controls.FileInput.GetAddButtonsNode(node);var uploadButton=D2L.LP.Web.UI.Html.Dom.GetFirstElementChild(buttons);return uploadButton.id}, HideErrorMessages:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.FileInput;me.HideErrorMessagesByNode(D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue()))},HasChanged:function(node){var newChangeKey=D2L.LP.Web.UI.Desktop.Controls.FileInput.GetChangeKey(node);var oldChangeKey=$(node).data("changeKey");var hasChanged=newChangeKey!==oldChangeKey;return hasChanged},HideErrorMessagesByNode:function(node){var errorsNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-fileinput-errors",node); var errorNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementChild(errorsNode);while(errorNode!=null){D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-hidden",errorNode);errorNode=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(errorNode)}},OnDropAbort:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.FileInput;var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());me.ResetUploadByNode(node)},OnDropError:function(id,errorNumber){var me=D2L.LP.Web.UI.Desktop.Controls.FileInput;var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue()); me.ResetUploadByNode(node);if(errorNumber===1)me.SetErrorMessageVisibility(node,"d2l-fileinput-filecount-error",true);else if(errorNumber===2)me.SetErrorMessageVisibility(node,"d2l-fileinput-filetype-error",true);else if(errorNumber===3)me.SetErrorMessageVisibility(node,"d2l-fileinput-filesize-error",true);else if(errorNumber===6)me.SetErrorMessageVisibility(node,"d2l-fileinput-fileempty-error",true);else if(errorNumber===7)me.SetErrorMessageVisibility(node,"d2l-fileinput-filenamelength-error",true); else me.SetErrorMessageVisibility(node,"d2l-fileinput-fileupload-error",true)},OnDropFilesComplete:function(id,files){var evt=null;var me=D2L.LP.Web.UI.Desktop.Controls.FileInput;var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(files!=null&&files.length>0){var fileInputFiles=[];for(var i=0;i<files.length;i++)fileInputFiles.push(new D2L.LP.Web.UI.Files.File(files[i].GetId(),files[i].GetFileSystemType(),files[i].GetName(),files[i].GetSize()));evt=me.AddFiles(id,fileInputFiles)}me.UpdateProgressBarByNode(node.getAttribute("data-d2l-msg-uploadcomplete"), 100,me.GetProgressBarNodeByNode(node));me.ResetUploadByNode(node);return evt},OnDropProgress:function(id,progress){var me=D2L.LP.Web.UI.Desktop.Controls.FileInput;var progressBarNode=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());me.UpdateProgressBarByNode(progress.GetFileName(),progress.GetTotalPercent(),progressBarNode)},OnDropStarted:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.FileInput;var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var progressBarNode=me.GetProgressBarNodeByNode(node); var abortLinkNode=me.GetAbortLinkNodeByNode(node);node.d2l_isUploading=true;me.HideErrorMessagesByNode(node);me.SetAddFileEnabled(node);me.UpdateProgressBarByNode("",0,progressBarNode);setTimeout(function(){if(node.d2l_isUploading){D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-hidden",progressBarNode);D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-hidden",abortLinkNode)}},500)},RemoveFile:function(itemId){var me=D2L.LP.Web.UI.Desktop.Controls.FileInput;var itemNode=D2L.LP.Web.UI.Html.Dom.GetElementById(itemId.GetValue()); var listNode=itemNode.parentNode;var actionTypeNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementChild(itemNode);if(actionTypeNode.value==="None")actionTypeNode.value="Remove";else if(actionTypeNode.value==="Add")actionTypeNode.value="AddRemove";D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-hidden",itemNode);var node=listNode.parentNode;me.SetAddFileVisibility(node);var count=me.GetFileCount(node);if(count===0)D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-hidden",listNode);var fileName=itemNode.getAttribute("data-d2l-name"); var pluginKeyNode=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(actionTypeNode);var idNode=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(pluginKeyNode);var fileSizeNode=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(idNode);node.d2l_removedFile=new D2L.LP.Web.UI.Desktop.Controls.FileInput.FileParam(fileName,actionTypeNode.value,pluginKeyNode.value,idNode.value,fileSizeNode.value);var onRemoveFile=D2L.LP.Web.UI.ObjectRepository.TryGet(node.getAttribute("id"),"OnRemoveFile");if(onRemoveFile!==null)onRemoveFile.call(onRemoveFile); me.TriggerChangeEvent(node)},ResetUploadByNode:function(node){var me=D2L.LP.Web.UI.Desktop.Controls.FileInput;var progressBarNode=me.GetProgressBarNodeByNode(node);var abortLinkNode=me.GetAbortLinkNodeByNode(node);node.d2l_isUploading=false;me.SetAddFileEnabled(node);D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-hidden",abortLinkNode);D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-hidden",progressBarNode)},SetAddFileEnabled:function(node){var me=D2L.LP.Web.UI.Desktop.Controls.FileInput;var isEnabled=node.d2l_isAddFileAllowed&& !node.d2l_isUploading;var addButtonsContainer=me.GetAddButtonsNode(node);var addButtonNodes=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("vui-button",addButtonsContainer);for(var i=0;i<addButtonNodes.length;i++)D2L.LP.Web.UI.Common.Controls.Button.SetIsEnabled(new D2L.LP.Web.UI.Html.AbsoluteHtmlId(addButtonNodes[i].getAttribute("id")),isEnabled)},SetAddFileVisibility:function(node){var me=D2L.LP.Web.UI.Desktop.Controls.FileInput;node.d2l_isAddFileAllowed=false;if(node.getAttribute("data-d2l-ismultiple")== "true")node.d2l_isAddFileAllowed=true;else node.d2l_isAddFileAllowed=me.GetFileCount(node)==0;var disableDisableDragDrop=D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-fileinput-disabledragdrop",node);D2L.LP.Web.UI.Html.Files.FileUpload.FileDrop.Default.SetIsEnabledByNode(node,node.d2l_isAddFileAllowed);if(node.d2l_isAddFileAllowed){D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-fileinput-add",node);if(disableDisableDragDrop===null)D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-fileinput-add-border",node)}else{D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-fileinput-add", node);if(disableDisableDragDrop===null)D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-fileinput-add-border",node)}},SetErrorMessageVisibility:function(node,className,isVisible){var errorNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName(className,node);D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(errorNode,isVisible)},ShowHandlingMessage:function(id,fileExists){var fileControl=D2L.LP.Web.UI.Html.Dom.GetElementById(id);if(fileControl&&fileExists){var me=D2L.LP.Web.UI.Desktop.Controls.FileInput;setTimeout(function(){me.SetErrorMessageVisibility(fileControl, "d2l-fileinput-loading-message",true)},3E3)}},UpdateProgressBarByNode:function(text,percent,node){var progressBarTextNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementChild(D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-fileinput-upload-progress-bar",node));var progressBarColourNode=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(progressBarTextNode);var isPercent=!isNaN(percent);if(isPercent)progressBarTextNode.innerHTML=text+" "+percent.toString()+"%";else progressBarTextNode.innerHTML=text+" - Uploading"; if(percent==0||!isPercent){progressBarColourNode.style.width="0px";progressBarColourNode.style.backgroundColor="transparent"}else{if(progressBarColourNode.parentNode.clientWidth==0)progressBarColourNode.style.width="100%";else progressBarColourNode.style.width=progressBarColourNode.parentNode.clientWidth*percent/100-8+"px";if(progressBarColourNode.style.backgroundColor=="transparent")progressBarColourNode.style.backgroundColor=""}if(isPercent)D2L.LP.Web.UI.Html.Aria.SetAttribute(node,"aria-valuenow", percent.toString())},TriggerChangeEvent:function(node){var hasChanged=D2L.LP.Web.UI.Desktop.Controls.FileInput.HasChanged(node);if(hasChanged)D2L.LP.Web.UI.Html.ChangeTracking.Trackable.TriggerChange(node);else D2L.LP.Web.UI.Html.ChangeTracking.Trackable.TriggerRestore(node)},ValidateRequired:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.FileInput;var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());return me.GetFileCount(node)>0},ValidateUploadInProgress:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue()); return node.d2l_isUploading===undefined||node.d2l_isUploading===false}}; D2L.LP.Web.UI.Desktop.Controls.FileInput.FileParam=D2L.Class.Create({Construct:function(fileName,actionType,pluginKey,id,fileSize,previewUrl){if(actionType===undefined)actionType="";if(pluginKey===undefined)pluginKey="";if(id===undefined)id="";if(fileSize===undefined)fileSize="";if(previewUrl===undefined)previewUrl="";this.m_fileName=fileName;this.m_actionType=actionType;this.m_pluginKey=pluginKey;this.m_id=id;this.m_fileSize=fileSize;this.m_previewUrl=previewUrl},_serialize:function(serializer){serializer.AddMember("actionType", this.m_actionType);serializer.AddMember("pluginKey",this.m_pluginKey);serializer.AddMember("id",this.m_id)},GetActionType:function(){return this.m_actionType},GetPluginKey:function(){return this.m_pluginKey},GetId:function(){return this.m_id},GetFileName:function(){return this.m_fileName},GetFileSize:function(){return this.m_fileSize},GetPreviewUrl:function(){return this.m_previewUrl}}); D2L.LP.Web.UI.Desktop.Controls.FileInput.Param=D2L.Class.Create({Construct:function(files,links){if(files===undefined)files=[];if(links===undefined)links=[];this.m_files=files;this.m_links=links},_serialize:function(serializer){serializer.AddMember("files",this.m_files);serializer.AddMember("links",this.m_links)},GetFiles:function(){return this.m_files},GetLinks:function(){return this.m_links}}); D2L.LP.Web.UI.Desktop.Controls.FileInput.LegacyAddFile={AddFile:function(fileInputId,openFunction){openFunction.call(openFunction).AddListener(function(files){if(files==null||files.length==0)return;var fileInputFiles=[];for(var i=0;i<files.length;i++)fileInputFiles.push(new D2L.LP.Web.UI.Files.File(files[i].FileId,files[i].FileSystemType,files[i].FileName,files[i].Size));D2L.LP.Web.UI.Desktop.Controls.FileInput.AddFiles(fileInputId,fileInputFiles)})}}; D2L.LP.Web.UI.Desktop.Controls.FileInput.RecordAudioFile={SaveAudio:function(id,openFunction){openFunction.call(openFunction).AddListener(function(files){D2L.LP.Web.UI.Desktop.Controls.FileInput.AddFiles(id,files)})}}; D2L.LP.Web.UI.Desktop.Controls.FileInput.RecordVideoFile={AddFile:function(fileInputId,openFunction,callback){openFunction.call(openFunction).AddListener(function(file){if(file==null||file.length==0)return;var fileInputFile=new D2L.LP.Web.UI.Files.File(file.FileId,file.FileSystemType,file.FileName,file.Size);D2L.LP.Web.UI.Desktop.Controls.FileInput.AddFiles(fileInputId,fileInputFile);if(callback)callback.call(callback,file)})}}; D2L.LP.Web.UI.Desktop.Controls.FloatingContainer={Open:function(id,openerId,openSettings){var elem=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());D2L.LP.Web.UI.Desktop.Controls.FloatingContainer.OpenNode(elem,openerId,openSettings)},OpenNode:function(elem,openerId,openSettings){var me=D2L.LP.Web.UI.Desktop.Controls.FloatingContainer;if(elem.onFocusHandler===undefined)elem.onFocusHandler=function(evt){var activeNode=D2L.LP.Web.UI.Html.Dom.GetActiveElement();var isFrameOrBody=D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-dialog-frame", activeNode)||D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-body",activeNode);if(!D2L.LP.Web.UI.Html.Dom.IsAncestor(elem,activeNode)&&!isFrameOrBody)me.CloseNode(elem,true)};D2L.LP.Web.UI.Html.Dom.AddEventListener("focus",document.body,elem.onFocusHandler,true);openSettings=me.NormalizeOpenSettings(openSettings);var openerElem=D2L.LP.Web.UI.Html.Dom.GetElementById(openerId.GetValue());if(openerElem===null)throw"FloatingContainer opener not found: '"+openerId.GetValue()+"'.";var targetElem=openerElem;if(openSettings.TargetId!= null)targetElem=D2L.LP.Web.UI.Html.Dom.GetElementById(openSettings.TargetId.GetValue());elem.m_previousParent=elem.parentNode;D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(elem,true);D2L.LP.Web.UI.Html.Dom.OverlayElement(elem,targetElem,openerElem,openSettings.Position,openSettings.VerticalOffset,openSettings.HorizontalOffset,openSettings.IsAutoPosition,openSettings.IsAutoScroll,openSettings.AttachToBody);elem.style.zIndex=1E3;elem.m_openerId=openerId.GetValue();elem.m_isOpen=true;elem.tabIndex=openSettings.TabIndex; elem.m_openSettings=openSettings;elem.m_ignoreAutoHide=true;elem.m_autoCloseExclusions=openSettings.AutoCloseExclusions;setTimeout(function(){elem.m_ignoreAutoHide=false},0);if(openSettings.FocusOnOpen)if(openSettings.FocusOnOpenTargetControlId!==null)try{var focusTargetNode=D2L.LP.Web.UI.Html.Dom.GetElementById(openSettings.FocusOnOpenTargetControlId.GetValue());focusTargetNode.focus()}catch(e){}else me.Focus(elem)},NormalizeOpenSettings:function(settings){if(settings===undefined||settings===null)settings= {};settings.TargetId=settings.TargetId||null;settings.Position=settings.Position||D2L.LP.Web.UI.Html.Style.OverlayPosition.Right;settings.VerticalOffset=settings.VerticalOffset||0;settings.HorizontalOffset=settings.HorizontalOffset||0;settings.IsAutoScroll=settings.IsAutoScroll||false;settings.IsAutoPosition=settings.IsAutoPosition||true;settings.FocusOnOpen=settings.FocusOnOpen||true;settings.FocusOnOpenTargetControlId=settings.FocusOnOpenTargetControlId||null;settings.TabIndex=settings.TabIndex|| 0;settings.AttachToBody=settings.AttachToBody||false;settings.AutoCloseExclusions=settings.AutoCloseExclusions||[];return settings},RefreshOpenNode:function(node){if(node.m_isOpen){var openSettings=node.m_openSettings;openSettings.FocusOnOpen=false;D2L.LP.Web.UI.Desktop.Controls.FloatingContainer.OpenNode(node,new D2L.LP.Web.UI.Html.AbsoluteHtmlId(node.m_openerId),openSettings)}},Focus:function(node){var focusableElems={"a":true,"input":true,"select":true,"textarea":true,"button":true};var allNodes= node.all?node.all:node.getElementsByTagName("*");for(var i=0;i<allNodes.length;i++){var cNode=allNodes[i];if(focusableElems[cNode.tagName.toLowerCase()]&&D2L.LP.Web.UI.Html.Css.GetStyle(cNode,"display")!=="none"&&!(cNode.type=="hidden"||cNode.disabled===true)&&cNode.className.indexOf("d2l-floating-container-close")<0){try{cNode.focus()}catch(e){}break}}},Close:function(id,ignoreFocus){var elem=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());D2L.LP.Web.UI.Desktop.Controls.FloatingContainer.CloseNode(elem, ignoreFocus)},CloseNode:function(elem,ignoreFocus){if(!elem.m_isOpen)return;if(elem.d2l_onClose===undefined)elem.d2l_onClose=D2L.LP.Web.UI.ObjectRepository.TryGet(elem.getAttribute("id"),"onClose");if(elem.d2l_onClose!==null)elem.d2l_onClose.call(elem.d2l_onClose);if(elem.onFocusHandler!==undefined)D2L.LP.Web.UI.Html.Dom.RemoveEventListener("focus",document.body,elem.onFocusHandler,true);if(ignoreFocus===undefined)ignoreFocus=false;var openerId=elem.m_openerId;var openerElem=D2L.LP.Web.UI.Html.Dom.GetElementById(openerId); D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(elem,false);if(openerElem&&openerElem.focus&&!ignoreFocus)try{openerElem.focus()}catch(e){}elem.m_isOpen=false;D2L.LP.Web.UI.Desktop.Controls.FloatingContainer.MoveToOriginalParent(elem)},MoveToOriginalParent:function(elem){if(elem.m_previousParent)elem.m_previousParent.appendChild(elem)},IsOpen:function(id){var elem=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());return D2L.LP.Web.UI.Desktop.Controls.FloatingContainer.IsOpenNode(elem)},IsOpenNode:function(elem){if(elem.m_isOpen=== undefined)return false;return elem.m_isOpen},Toggle:function(id,openerId,openSettings){if(D2L.LP.Web.UI.Desktop.Controls.FloatingContainer.IsOpen(id))D2L.LP.Web.UI.Desktop.Controls.FloatingContainer.Close(id);else D2L.LP.Web.UI.Desktop.Controls.FloatingContainer.Open(id,openerId,openSettings)},Init:function(){var me=D2L.LP.Web.UI.Desktop.Controls.FloatingContainer;var dom=D2L.LP.Web.UI.Html.Dom;if(me.m_initialized)return;me.m_initialized=true;D2L.LP.Web.UI.Events.OnClick.AddListener(function(e){var eventTarget= D2L.LP.Web.UI.Html.Dom.GetEventTargetElement(e);var autoCloseContainers=dom.GetElementsByClassName("d2l-floating-container");for(var i=0;i<autoCloseContainers.length;i++){var container=autoCloseContainers[i];if(container.m_isOpen&&!container.m_ignoreAutoHide){var exclusions=container.m_autoCloseExclusions||[];var ancestor=dom.IsAncestor(container,eventTarget);if(!ancestor)for(var j=0;j<exclusions.length;j++)if(exclusions[j]==eventTarget||dom.IsAncestor(exclusions[j],eventTarget)){ancestor=true;break}if(!ancestor)me.CloseNode(container, true)}}});var floatingContainerNodesInsidePartial={};D2L.LP.Web.UI.Common.Controls.Form.OnBeforeSubmit.AddListener(function(form){var floatingContainerNodes=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-floating-container",form);for(var i=0;i<floatingContainerNodes.length;i++){var fcNode=floatingContainerNodes[i];if(me.IsOpenNode(fcNode))me.MoveToOriginalParent(fcNode)}});D2L.LP.Web.UI.Html.PartialRendering.OnBefore.AddListener(function(placeholderId){var placeholder=dom.GetElementById(placeholderId.GetValue()); floatingContainerNodesInsidePartial[placeholderId.GetValue()]=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-floating-container",placeholder);for(var i=0;i<floatingContainerNodesInsidePartial[placeholderId.GetValue()].length;i++){var fcNode=floatingContainerNodesInsidePartial[placeholderId.GetValue()][i];if(me.IsOpenNode(fcNode))me.MoveToOriginalParent(fcNode)}});D2L.LP.Web.UI.Html.PartialRendering.OnAfter.AddListener(function(placeholderId){for(var i=0;floatingContainerNodesInsidePartial[placeholderId.GetValue()]!== undefined&&i<floatingContainerNodesInsidePartial[placeholderId.GetValue()].length;i++){var fcNode=floatingContainerNodesInsidePartial[placeholderId.GetValue()][i];if(me.IsOpenNode(fcNode))try{me.RefreshOpenNode(fcNode)}catch(e){}}})}};D2L.LP.Web.UI.Desktop.Controls.FloatingContainer.m_mouseEvent=null; D2L.LP.Web.UI.Common.Controls.Form.Validate=function(balloonContainer,validators,showErrors){if(showErrors===undefined)showErrors=true;var ret=new D2L.LP.Web.UI.Events.Event;var errors=[];var handleResult=function(result,index,validator){var isError=result===undefined||result===null||result===false;if(isError)errors.push(validator);if(result.AddListener!==undefined)result.AddListener(function(r){handleResult(r,index,validator)});else validate(++index)};var validate=function(index){if(index==validators.length){if(errors.length> 0&&showErrors)D2L.LP.Web.UI.Common.Controls.MessageArea.ShowErrors(errors);ret.Trigger(errors.length===0);return}var validator=validators[index];var result=validator.validation.apply(validator.validation);handleResult(result,index,validator)};D2L.LP.Web.UI.Common.Controls.MessageArea.Reset(balloonContainer);setTimeout(function(){validate(0)},0);return ret}; D2L.LP.Web.UI.Desktop.Controls.MediaPlayer={PlayerInitializer:function(node){var mp=D2L.LP.Web.UI.Desktop.Controls.MediaPlayer;if(!VideoPlayer||typeof VideoPlayer!=="object")return;mp.InitializeMediaPlayerControls(node.getAttribute("data-mediaplayer-controlslang"));if(mejs&&!VideoPlayer._hasInit){var VuiVideoPlayer=new MediaElementGenerator;VideoPlayer.initVideoPlayer(VuiVideoPlayer);VideoPlayer._hasInit=true}mp.InitializeWarningsAndErrors(node.getAttribute("data-mediaplayer-warningsanderrorslang")); mp.InitializeCCLanguages(node.getAttribute("data-mediaplayer-cclanguages"))},AddCssUrl:function(inCssUrl){$link=$(document).find("head").find("link");var NotAddCssflag=true;for(var i=0;$link[i];i++)if($($link[i]).attr("href")===inCssUrl){NotAddCssflag=false;break}if(NotAddCssflag){var $css=$('<link rel="stylesheet" type="text/css" href="'+inCssUrl+'">');$(document).find("head").append($css)}},InitializeMediaPlayerControls:function(langTerms){langTerms=JSON.parse(langTerms);if(mejs&&mejs.i18n&&mejs.i18n.locale){var locales= mejs.i18n.locale.strings;if(!locales){locales={};locales.en={}}for(var locale in locales)for(var term in langTerms)if(langTerms.hasOwnProperty(term))locales[locale][term]=langTerms[term]}},InitializeWarningsAndErrors:function(langTerms){langTerms=JSON.parse(langTerms);if(ParserWarnings)ParserWarnings.InitializeLangTerms(langTerms)},InitializeCCLanguages:function(languages){languages=JSON.parse(languages);if(mejs)for(var locale in languages)if(languages.hasOwnProperty(locale))mejs.language.codes[locale]= languages[locale]},GetWarningsAndErrors:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var warnings=[];if(node){var messages=node.getAttribute("data-mediaplayer-warnings");if(messages){var msgObj=JSON.parse(messages);for(var i=0;msgObj[i];i++)if(msgObj[i].text)warnings.push(msgObj[i].text.msg)}}return warnings},HasErrors:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var errors=false;if(node){var messages=node.getAttribute("data-mediaplayer-warnings"); if(messages){var msgObj=JSON.parse(messages);for(var i=0;msgObj[i];i++)if(msgObj[i].type==="error"){errors=true;break}}}return errors},GetTitle:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(node){var data=node.getAttribute("data-mediaplayer-video-data");var title="";if(data){var dataObj=JSON.parse(data);if(dataObj.title)title=dataObj.title}return title}return""},GetAuthor:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(node){var data=node.getAttribute("data-mediaplayer-video-data"); var author="";if(data){var dataObj=JSON.parse(data);if(dataObj.author)author=dataObj.author}return author}return""},GetSourceProvider:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(node){var data=node.getAttribute("data-mediaplayer-video-data");var sourceProvider="";if(data){var dataObj=JSON.parse(data);if(dataObj.sourceProvider)sourceProvider=dataObj.sourceProvider}return sourceProvider}return""},GetSourceName:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue()); if(node){var data=node.getAttribute("data-mediaplayer-video-data");var sourceName="";if(data){var dataObj=JSON.parse(data);if(dataObj.sourceName)sourceName=dataObj.sourceName}return sourceName}return""},GetMediaPlayerSrc:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(node){var src=node.getAttribute("data-mediaplayer-src");if(!src)return"";return src}return""},GetPageUrl:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(node){var pageUrl=node.getAttribute("data-mediaplayer-pageurl"); if(!pageUrl)return"";return pageUrl}return""},GetSupportedMediaExtensions:function(){if(VideoParser)return VideoParser.SupportedFileExtensions();else return["mp4"]},IsSupportedMediaFile:function(inUrl){if(VideoParser)return VideoParser.isSupportedFile(inUrl);else return false},IsEmpty:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(node)return node.hasChildNodes()>0?true:false},SetSource:function(id,source){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue()); if(node){$(node).attr("data-mediaplayer-src",source);$(node).empty();setTimeout(function(){VideoPlayer.create(id.GetValue(),source,{pluginPath:"https://s.brightspace.com/lib/vui-mediaplayer/0.2.1/"});$(".mejs-container .mejs-controls").css("visibility","hidden")},0)}},TriggerUpdate:function(id){return D2L.LP.Web.UI.Desktop.Controls.MediaPlayer.Trigger(id,"vui.mediaplayer.resize")},Trigger:function(id,value){var node=$("#"+id.GetValue());if(node.length>0){node.trigger(value);return true}return false}, VideoError:function(error){var $errorContainer=$('<div class="mediaplayer-cannotplay-container"></div>');var $tcContainer=$('<div class="mediaplayer-cannotplay-table-cell"></div>');var $messageContainer=$("<div></div>");$tcContainer.append($messageContainer);$errorContainer.append($tcContainer);var $parent=$(error).parent();var $mediaplayer=$(error).parents(".vui-mediaplayer");var h;var w;$mediaplayer.attr("data-mediaplayer-warnings",null);if($mediaplayer.height()===0){h=225;w=400;var p=$(error).parents(); for(var i=0;p[i];i++)if($(p[i]).height()===0)$(p[i]).height(h);else break}else{h=$mediaplayer.height()<=524?$mediaplayer.height():524;w=$mediaplayer.width()<=940?$mediaplayer.width():940}$parent.height(h).width(w);$mediaplayer.find("video").height(h).width(w);$mediaplayer.find(".mejs-container").height(h).width(w);var $message=$('<div class="mediaplayer-cannotplay-message" role="alert"></div>');if(h!==90&&w!==160){$messageContainer.append('<div class="mediaplayer-cannotplay-icon"></div>');$message.append('<h3 class="mediaplayer-cannotplay-message-h3">'+ mejs.i18n.t("txtBrowserCannotPlayVideo")!=="undefined"?mejs.i18n.t("txtBrowserCannotPlayVideo"):"Your browser cannot play that video."+"</h3>");var tmp="";if($mediaplayer.attr("data-mediaplayer-video-data")&&$mediaplayer.attr("data-mediaplayer-size")){var info=JSON.parse($mediaplayer.attr("data-mediaplayer-video-data"));tmp=info.title+" - "+$mediaplayer.attr("data-mediaplayer-size");$message.append("<br>")}$message.append("<i>"+tmp+"</i>");$message.append("<br>")}else $message.append('<h3 class="mediaplayer-cannotplay-message-h3">'+ mejs.i18n.t("txtCannotPlayVideo")!=="undefined"?mejs.i18n.t("txtCannotPlayVideo"):"Cannot play video."+"</h3>");$message.append('<a href="'+$(error).attr("src")+'" tabindex="0"><span>'+mejs.i18n.t("Download File")+"</span></a>");$messageContainer.append($message);var mec=$parent.find(".me-cannotplay");mec.empty();$parent.parents(".mejs-container").css("background","#ffffff");$parent.append($errorContainer)}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditor={ActionIdMap:{},AllowSpellChecker:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;return me.AllowSpellCheckerByNode(D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue()))},AllowSpellCheckerByNode:function(node){return node.getAttribute("data-d2l-allow-spellchecker")==="true"},AppendHtml:function(editorId,html){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var node=me.GetEditor(editorId);var isInline=me.IsInlineByNode(node);node.d2l_control.AppendHtml(editorId, html,isInline)},CheckAccessibility:function(editorId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var node=me.GetEditor(editorId);node.d2l_control.CheckAccessibility(editorId)},ExecuteCommand:function(editorId,name,value){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var node=me.GetEditor(editorId);node.d2l_control.ExecuteCommand(editorId,name,value)},Focus:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var node=me.GetEditor(id);node.d2l_control.FocusByNode(node)},GetActionId:function(editorId, actionName){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var actionIdMap=me.GetActionIdMap(editorId);return actionIdMap[actionName]},GetActionIdMap:function(editorId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var actionIdMap=me.ActionIdMap[editorId];if(actionIdMap===undefined){actionIdMap={};me.ActionIdMap[editorId]=actionIdMap}return actionIdMap},GetComputedStyle:function(editorId,styleAttribute){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var node=me.GetEditor(editorId);return node.d2l_control.GetComputedStyle(editorId, styleAttribute)},GetEditor:function(editorId){return D2L.LP.Web.UI.Html.Dom.GetElementById(editorId.GetValue())},GetFileAdded:function(editorId){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(editorId.GetValue());var files=node.d2l_files;if(files.length===0||files.length<node.d2l_files_queued)return;var file=files[files.length-node.d2l_files_queued];node.d2l_files_queued-=1;return new D2L.LP.Web.UI.Files.File(file.GetId(),file.GetFileSystemType(),file.GetName(),file.GetSize())},GetHtml:function(editorId){var me= D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var node=D2L.LP.Web.UI.Html.Dom.GetElementById(editorId.GetValue());me.UpdateFilesNodeByNode(node);var files=node.d2l_files;return new D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.Param(editorId.GetValue(),node.d2l_control.GetHtml(editorId),node.getAttribute("data-d2l-htmlorgunitid"),files)},GetSelectedNode:function(editorId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var node=me.GetEditor(editorId);return node.d2l_control.GetSelectedNode(editorId)},GetSelectionContent:function(editorId){var me= D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var node=me.GetEditor(editorId);return node.d2l_control.GetSelectionContent(editorId)},GetSpellcheckText:function(editorId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var node=me.GetEditor(editorId);return node.d2l_control.GetSpellcheckText(editorId)},HasChanged:function(editorId){var node=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.GetEditor(editorId);return node.d2l_control.HasChanged(editorId)},IsDirty:function(editorId){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(editorId.GetValue()); return node.d2l_control.IsDirty(editorId)},IsEmpty:function(editorId){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(editorId.GetValue());var html=node.d2l_control.GetHtml(editorId);if(html==null)return true;if(D2L.LP.Web.UI.Html.JavaScript.TrimString(0,html).length<1)return true;return false},InsertDelayed:function(editorId,delayedFunction,selectionProvider,resolve,reject){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;me.PasteDelayed(editorId,delayedFunction,selectionProvider,null,resolve,reject)}, IsInline:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;return me.IsInlineByNode(D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue()))},IsInlineByNode:function(node){return node.getAttribute("data-d2l-editor-isinline")==="true"},MoveToStart:function(editorId){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(editorId.GetValue());node.d2l_control.MoveToStart(editorId)},PasteDelayed:function(editorId,delayedFunction,selectionProvider,htmlProvider,resolve,reject){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor; var node=me.GetEditor(editorId);node.d2l_control.PasteDelayed(editorId,delayedFunction,selectionProvider,htmlProvider,resolve,reject)},ResetChanged:function(editorId){var node=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.GetEditor(editorId);D2L.LP.Web.UI.Html.ChangeTracking.Tracker.TriggerReset(node)},SetActionId:function(actionName,actionId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var editorId=D2L.LP.Web.UI.Html.Dom.GetParentElementByClassName("d2l-htmleditor",document.getElementById(actionId.GetValue())).id; var actionIdMap=me.GetActionIdMap(editorId);actionIdMap[actionName]=actionId},SelectNode:function(editorId,nodeToSelect){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var node=me.GetEditor(editorId);node.d2l_control.SelectNode(editorId,nodeToSelect)},SetHtml:function(editorId,html,baseRelativePath,keepFiles){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var evt=new D2L.LP.Web.UI.Events.Event;var node=me.GetEditor(editorId);var orgUnitId=node.getAttribute("data-d2l-htmlorgunitid");var filterMode= node.getAttribute("data-d2l-filtermode");keepFiles=keepFiles||false;if(keepFiles===false)node.d2l_files=[];if(node.d2l_files===undefined||node.d2l_files===null)node.d2l_files=[];node.d2l_files_queued=0;var convertResponseHandler=function(response){node.d2l_control.SetHtml(editorId,response);evt.Trigger()};var params={filterMode:filterMode,html:html};if(baseRelativePath)params.baseRelativePath=baseRelativePath;var options={success:convertResponseHandler,failure:function(){evt.Release()}};D2L.LP.Web.UI.Rpc.Connect(D2L.LP.Web.UI.Rpc.Verbs.POST, (new D2L.LP.Web.Http.UrlLocation("/d2l/lp/htmleditor/converttoabsolute")).WithQueryString("ou",orgUnitId),params,options);return evt},SetIsResizeDisplayedByNode:function(node,isDisplayed){var resizeNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-resize",node);if(isDisplayed)D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-hidden",resizeNode);else D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-hidden",resizeNode)},SetSize:function(editorId,height,width){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor; var node=me.GetEditor(editorId);node.d2l_control.SetSize(editorId,height,width)},SetSpellcheckText:function(editorId,response){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var node=me.GetEditor(editorId);return node.d2l_control.SetSpellcheckText(editorId,response)},ToggleDisplayComponents:function(editorId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var node=D2L.LP.Web.UI.Html.Dom.GetElementById(editorId.GetValue());if(D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-htmleditor-hide-components", node))D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-htmleditor-hide-components",node);else D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-htmleditor-hide-components",node);me.UpdateComponentVisibilityByNode(node);D2L.LP.Web.UI.Events.OnResize.Trigger()},TriggerFileAdded:function(editorId,file){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(editorId.GetValue());node.d2l_files.push(file);node.d2l_files_queued+=1;var onFileAdded=D2L.LP.Web.UI.ObjectRepository.TryGet(editorId.GetValue(),"onFileAdded");if(onFileAdded!= null)onFileAdded.call(onFileAdded)},UpdateComponentVisibilityByNode:function(node){var toolbarNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-header",node);var containerNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-component-container",node);var visibilityToggleNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-component-toggle",toolbarNode);if(visibilityToggleNode==null)return;D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(visibilityToggleNode, true);var isDaylight=D2L.LP.Web.UI.Daylight.IsEnabled();var toolbarWidth=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(toolbarNode).width-(!isDaylight?0:22);var toggleWidth=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(visibilityToggleNode).width+(!isDaylight?8:7);var boundingWidth=toolbarWidth-toggleWidth;if(boundingWidth<=0)return;if(!containerNode.d2l_initialized){var componentNodes=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-htmleditor-hide1",containerNode);for(var i=0;i<componentNodes.length;i++){var componentNode= componentNodes[i];componentNode.d2l_width=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(componentNode).width+(!isDaylight?4:8);D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-htmleditor-hide1-hidden",componentNode)}containerNode.d2l_initialized=true}var containerHasHiddenComponent=false;if(containerNode.scrollWidth>boundingWidth){containerHasHiddenComponent=true;var componentNodes=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-htmleditor-hide1",containerNode);var componentNumber=componentNodes.length;while(componentNumber--){var componentNode= componentNodes[componentNumber];if(!D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-htmleditor-hide1-hidden",componentNode)){componentNode.d2l_width=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(componentNode).width+(!isDaylight?4:8);D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-htmleditor-hide1-hidden",componentNode);if(containerNode.scrollWidth<boundingWidth)break}}}else{var componentNodes=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-htmleditor-hide1-hidden",containerNode);for(var i=0;i<componentNodes.length;i++){var componentNode= componentNodes[i];var componentWidth=componentNode.d2l_width;if(containerNode.scrollWidth+componentWidth<boundingWidth)D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-htmleditor-hide1-hidden",componentNode);else{containerHasHiddenComponent=D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-htmleditor-hide-components",node);break}}}D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(visibilityToggleNode,containerHasHiddenComponent);if(D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-htmleditor-hide-components",node)){var showTitle= D2L.LP.Web.UI.Html.Dom.GetAttribute(node,"data-d2l-toolbar-toggle-show");D2L.LP.Web.UI.Common.Controls.Button.SetTextNode(visibilityToggleNode,showTitle);D2L.LP.Web.UI.Common.Controls.Button.SetTitleNode(visibilityToggleNode,showTitle)}else{var hideTitle=D2L.LP.Web.UI.Html.Dom.GetAttribute(node,"data-d2l-toolbar-toggle-hide");D2L.LP.Web.UI.Common.Controls.Button.SetTextNode(visibilityToggleNode,hideTitle);D2L.LP.Web.UI.Common.Controls.Button.SetTitleNode(visibilityToggleNode,hideTitle)}},UpdateFilesNodeByNode:function(node){var filesNode= D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-files",node);if(!filesNode)return;D2L.LP.Web.UI.Html.Dom.RemoveChildElements(filesNode);if(!node.d2l_files||node.d2l_files.length===0)return;var files=node.d2l_files;var scope=filesNode.getAttribute("data-d2l-scope");for(var i=0;i<files.length;i++){var fileNumber=i+1;var idPrefix;if(fileNumber<2)idPrefix=scope+"$files$";else idPrefix=scope+"$files`"+fileNumber+"$";var fsTypeNode=filesNode.appendChild(document.createElement("input")); fsTypeNode.setAttribute("id",idPrefix+"FileSystemType");fsTypeNode.setAttribute("name",idPrefix+"FileSystemType");fsTypeNode.setAttribute("value",files[i].GetFileSystemType());var idNode=filesNode.appendChild(document.createElement("input"));idNode.setAttribute("id",idPrefix+"Id");idNode.setAttribute("name",idPrefix+"Id");idNode.setAttribute("value",files[i].GetId());var locationNode=filesNode.appendChild(document.createElement("input"));locationNode.setAttribute("id",idPrefix+"Location");locationNode.setAttribute("name", idPrefix+"Location");locationNode.setAttribute("value",files[i].GetLocation())}},ValidateRequired:function(editorId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;return!me.IsEmpty(editorId)},WordCount:function(editorId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var node=me.GetEditor(editorId);return node.d2l_control.GetText(editorId)},OnInput:function(editorId,delegate){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var node=me.GetEditor(editorId);return node.d2l_control.OnInput(editorId, delegate)}};D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents={}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.FraEditor={AppendHtml:function(editorId,html){},ExecuteCommand:function(editorId,name,value){},FocusByNode:function(node){},GetComputedStyle:function(editorId,styleAttribute){},GetHtml:function(editorId){},GetSelectedNode:function(editorId){},GetSelectionContent:function(editorId){return""},HasChanged:function(editorId){return false},IsDirty:function(editorId){},MoveToStart:function(editorId){},PasteDelayed:function(editorId,delayedFunction,unused,htmlProvider, resolve,reject){var fn=delayedFunction.call(delayedFunction);fn.AddListener(function(obj){var doInsert=function(html){if(html)resolve(html)};if(htmlProvider){var htmlResult=htmlProvider.call(htmlProvider,obj);if(typeof htmlResult==="string")doInsert(htmlResult);else if(typeof htmlResult==="object"&&htmlResult.AddListener)htmlResult.AddListener(function(html){doInsert(html)})}else doInsert(obj)});fn.AddReleaseListener(function(){reject("Cancelled")})},SelectNode:function(editorId,nodeToSelect){},SetHtml:function(editorId, html){},SetSize:function(editorId,height,width){}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor={AppendHtml:function(editorId,html,isInline){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var current=me.GetHtml(editorId);var result;if(isInline)result=current+html;else{var loc=current.indexOf("</body>");result=current.substring(0,loc)+html+current.substring(loc,current.length)}me.SetHtml(editorId,result)},CheckAccessibility:function(editorId){var plugins=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin;plugins.CheckAccessibility(editorId)}, ExecuteCommand:function(editorId,name,value){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor,core=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core;var node=core.ContextNode("d2l_context");me.MoveToBookmarkByNode(node);core.ExecuteCommand({"name":name,"value":value})},FocusByNode:function(node){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor,core=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core;var textAreaId=me.GetTextAreaId(node);core.Focus(textAreaId)}, GetChangeKey:function(node){var value=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.GetHtml(new D2L.LP.Web.UI.Html.AbsoluteHtmlId(node.getAttribute("id")));var serializer=new D2L.LP.Web.Serialization.Url.Serializer;value._serialize(serializer);var changeKey=serializer.Serialize();return changeKey},GetComputedStyle:function(editorId,styleAttribute){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var node=me.GetSelectedNode(editorId);return me.GetComputedStyleByNode(node,styleAttribute)}, GetComputedStyleByNode:function(node,styleAttribute){if(!node)return;if(node.nodeType===9)node=node.body;var getStyleValue=function(node){var value=D2L.LP.Web.UI.Html.Css.GetStyle(node,styleAttribute);if(styleAttribute==="background-color"&&value==="transparent"&&node.parentNode)value=getStyleValue(node.parentNode);return value};return getStyleValue(node)},GetHtml:function(editorId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor,core=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core; var textAreaId=me.GetTextAreaId(editorId);return core.GetContent(textAreaId)},GetSelectedNode:function(editorId){var htmlEditor=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor,me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor,core=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core;var htmlEditorNode=htmlEditor.GetEditor(editorId);var node=null;if(core.isIE()){node=htmlEditorNode.d2l_selectedNode;if(node)return node}var textAreaId=me.GetTextAreaId(editorId);node=core.GetSelectedNode(textAreaId); return node},GetSelectionContent:function(editorId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor,core=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core;var textAreaId=me.GetTextAreaId(editorId);var content=core.GetSelectionContent(textAreaId);return content},GetSpellcheckText:function(editorId){var htmlEditor=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor,me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor,core=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core; var htmlEditorNode=htmlEditor.GetEditor(editorId);var textAreaId=me.GetTextAreaId(editorId);var walk=function(n,f){var d=core.GetDocument(textAreaId);var w;if(d.createTreeWalker){w=d.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,false);while((n=w.nextNode())!==null)f.call(f,n)}else core.Walk({"tree":n,"delegate":f,"name":"childNodes"})};var tx="";var nodeDic=new D2L.Util.Dictionary;var nodeIden=0;walk(core.GetBody(textAreaId),function(n){if(n.nodeType===3&&n.nodeValue.trim()){nodeDic.Add(nodeIden, n);tx+=n.nodeValue+"["+nodeIden+":d2lsciden]";nodeIden++}});htmlEditorNode.d2l_nodeDic=nodeDic;return tx},GetTextAreaId:function(nodeOrId){if(nodeOrId.GetValue)nodeOrId=D2L.LP.Web.UI.Html.Dom.GetElementById(nodeOrId.GetValue());var textAreaNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-textarea",nodeOrId);return textAreaNode.getAttribute("id")},GetText:function(editorId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor,core=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core; var textAreaId=me.GetTextAreaId(editorId);return core.GetText(textAreaId)},OnInput:function(editorId,delegate){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor,core=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core;var textAreaId=me.GetTextAreaId(editorId);var textAreaNode=D2L.LP.Web.UI.Html.Dom.GetElementById(textAreaId);var node=D2L.LP.Web.UI.Html.Dom.GetParentElementByClassName("d2l-htmleditor",textAreaNode);node.inputHandlers.push(delegate)},TriggerInputChanged:function(node){for(var i= 0;i<node.inputHandlers.length;i++){delegate=node.inputHandlers[i];delegate.call(this)}},HasChanged:function(editorId){var node=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.GetEditor(editorId);var hasChanged=$(node).data("initialChangeKey")!==$(node).data("changeKey");return hasChanged},InitializeCallback:function(textAreaId,body,doc){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor,core=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core,htmlEditor=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor; var textAreaNode=D2L.LP.Web.UI.Html.Dom.GetElementById(textAreaId);var node=D2L.LP.Web.UI.Html.Dom.GetParentElementByClassName("d2l-htmleditor",textAreaNode);if(!node)return;var iFrameNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementChild(core.GetContentAreaContainer(textAreaId));var title=node.getAttribute("data-d2l-editor-title");if(title||title==="")iFrameNode.title=title;var labelledById=node.getAttribute("data-d2l-editor-labelledbyid");if(labelledById)D2L.LP.Web.UI.Html.Aria.SetAttribute(iFrameNode, "labelledby",labelledById);D2L.LP.Web.UI.Html.Dom.AddEventListener("focus",iFrameNode.contentWindow,function(e){node.d2l_onContentFocus.Trigger();node.d2l_hasFocus=true;D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-htmleditor-frosted",node)});D2L.LP.Web.UI.Html.Dom.AddEventListener("blur",iFrameNode.contentWindow,function(e){node.d2l_hasFocus=false;setTimeout(function(){if(!node.d2l_hasFocus)D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-htmleditor-frosted",node)},0);me.TriggerChangeEvent(node)});core.OnInput(textAreaId, function(){me.TriggerInputChanged(node)});me.TriggerInputChanged(node);if(D2L.LP.Web.UI.Daylight.IsEnabled())core.OnObjectResize(textAreaId,function(e){if(e.target.hasAttribute("data-d2l-editor-default-img-style")&&core.GetStyle(textAreaId,e.target,"max-width")==="100%"){core.SetStyle(textAreaId,e.target,"max-width","");e.target.removeAttribute("data-d2l-editor-default-img-style")}});if(core.isIE()){var getBookmark=function(evt){node.d2l_selectedNode=core.GetSelectedNode();node.d2l_bookmark=core.GetBookMark(textAreaId, 1)};var editorBody=core.GetBody(textAreaId);D2L.LP.Web.UI.Html.Dom.AddEventListener("select",editorBody,getBookmark,true);D2L.LP.Web.UI.Html.Dom.AddEventListener("click",editorBody,getBookmark,true);D2L.LP.Web.UI.Html.Dom.AddEventListener("keyup",editorBody,getBookmark);core.OnMouseUp(textAreaId,function(){getBookmark()});if(core.isIE()){var parentPlaceholders=D2L.LP.Web.UI.Html.Dom.GetParentElementsByClassName("d2l-placeholder-live",iFrameNode);if(parentPlaceholders)for(var i=0;i<parentPlaceholders.length;i++)D2L.LP.Web.UI.Html.Dom.RemoveAttribute(parentPlaceholders[i], "aria-live")}}var $node=$(node);var initialChangeKey=me.GetChangeKey(node);$node.data("initialChangeKey",initialChangeKey).data("changeKey",initialChangeKey);$(document).on("vui-reset",function(evt){var changeKey=$node.data("changeKey");var hasChanged=changeKey!==$node.data("initialChangeKey");var isParentTracker=D2L.LP.Web.UI.Html.Dom.IsAncestor(evt.target,node);if(!isParentTracker||!hasChanged)return;$node.data("initialChangeKey",changeKey);D2L.LP.Web.UI.Html.ChangeTracking.Trackable.TriggerRestore(node)}); me.SetSizeByNode(node,node.getAttribute("data-d2l-height"),node.getAttribute("data-d2l-width"));node.style.visibility="visible";setTimeout(function(){htmlEditor.UpdateComponentVisibilityByNode(node)},0)},InitializeLayout:function(editorId){var editorNode=D2L.LP.Web.UI.Html.Dom.GetElementById(editorId);if(!editorNode)return;var resizeHandle=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-resize",editorNode);var resizeSettings={Handle:resizeHandle,DisplayType:"hidden",GhostType:D2L.LP.Web.UI.Html.DragDrop.GhostType.OriginalShadow}; var onResize=D2L.LP.Web.UI.Html.DragDrop.MakeResizeableNode(editorNode,resizeSettings,window,window);var htmlEditor=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;if(onResize)onResize.AddListener(function(size){htmlEditor.SetSize(new D2L.LP.Web.UI.Html.AbsoluteHtmlId(editorNode.getAttribute("id")),size.height+"px",size.width+"px")});D2L.LP.Web.UI.Events.OnResize.AddListener(function(){htmlEditor.UpdateComponentVisibilityByNode(editorNode)})},IsDirty:function(editorId){var core=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core, me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var textAreaId=me.GetTextAreaId(editorId);return core.IsDirty(textAreaId)},MoveToBookmarkByNode:function(node){var core=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core,me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var textAreaId=me.GetTextAreaId(node);if(!core.isIE())return;core.MoveToBookmark(textAreaId,node.d2l_bookmark)},MoveToStart:function(editorId){var core=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core; var textAreaId=me.GetTextAreaId(editorId);setTimeout(function(){core.ExecuteCommand({"name":"selectall","value":null},textAreaId);core.Collapse(textAreaId,true)},0)},Paste:function(editorId,html){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor,core=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core,htmlEditor=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var node=htmlEditor.GetEditor(editorId);var textAreaId=me.GetTextAreaId(node);me.MoveToBookmarkByNode(node);if(html)core.ExecuteCommand({"name":core.AttributeMap.InsertContent, "value":html},textAreaId)},PasteDelayed:function(editorId,delayedFunction,selectionProvider,htmlProvider){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor,core=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core,htmlEditor=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var node=htmlEditor.GetEditor(editorId);var textAreaId=me.GetTextAreaId(node);delayedFunction.call(delayedFunction).AddListener(function(obj){var doInsert=function(html){if(selectionProvider)selectionProvider.call(selectionProvider); me.MoveToBookmarkByNode(node);if(html)core.ExecuteCommand({"name":core.AttributeMap.InsertContent,"value":html},textAreaId)};if(htmlProvider){var htmlResult=htmlProvider.call(htmlProvider,obj);if(typeof htmlResult==="string")doInsert(htmlResult);else if(typeof htmlResult==="object"&&htmlResult.AddListener)htmlResult.AddListener(function(html){doInsert(html)})}else doInsert(obj)})},SelectNode:function(editorId,nodeToSelect){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor,core=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core; var textAreaId=me.GetTextAreaId(editorId);core.SelectNode(textAreaId,nodeToSelect)},SetHeightByNode:function(node,height){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor,core=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core;if(height.substr(height.length-2,2)==="px"){var pixelHeight=parseInt(height.substr(0,height.length));var toolbarHeight=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-header",node)).height;var footerHeight= D2L.LP.Web.UI.Html.Dom.GetBoundingRect(D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-footer",node)).height;pixelHeight-=toolbarHeight+footerHeight;if(pixelHeight<120)pixelHeight="120";height=pixelHeight+"px"}core.SetHeight(me.GetTextAreaId(node),height);D2L.LP.Web.UI.Events.OnSizingFinished.Trigger()},SetHtml:function(editorId,html){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor,core=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core;var textAreaId=me.GetTextAreaId(editorId); core.SetContent(textAreaId,html)},SetSize:function(editorId,height,width){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;me.SetSizeByNode(D2L.LP.Web.UI.Html.Dom.GetElementById(editorId.GetValue()),height,width)},SetSizeByNode:function(node,height,width){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;me.SetWidthByNode(node,width);setTimeout(function(){me.SetHeightByNode(node,height)},0)},SetSpellcheckText:function(editorId,response){var htmlEditor=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor, htmlEditorNode=htmlEditor.GetEditor(editorId),i,text,iden,phrase,node,nodeDic=htmlEditorNode.d2l_nodeDic;if(!nodeDic)return;var phrases=response.split(":d2lsciden]");var dic=new D2L.Util.Dictionary;for(i=0;i<phrases.length;i++){phrase=phrases[i];iden=phrase.substring(phrase.lastIndexOf("[")+1);text=phrase.substring(0,phrase.lastIndexOf("["));dic.Add(iden,text)}for(i=0;i<nodeDic.Keys().length;i++){node=nodeDic.Get(nodeDic.Keys()[i]);text=dic.Get(nodeDic.Keys()[i]);if(text||text==="")node.data=text}htmlEditorNode.d2l_nodeDic= undefined},SetWidthByNode:function(node,width){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor,core=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core,htmlEditor=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;if(width.substr(width.length-2,2)==="px")if(parseInt(width.substr(0,width.length))<200)width="200px";node.style.width=width;core.SetWidth(me.GetTextAreaId(node),width);htmlEditor.UpdateComponentVisibilityByNode(node);return width},TriggerChangeEvent:function(node){var me= D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var initialChangeKey=$(node).data("initialChangeKey");var lastChangeKey=$(node).data("changeKey");var newChangeKey=me.GetChangeKey(node);if(newChangeKey===lastChangeKey)return;$(node).data("changeKey",newChangeKey);if(newChangeKey!==initialChangeKey)D2L.LP.Web.UI.Html.ChangeTracking.Trackable.TriggerChange(node);else D2L.LP.Web.UI.Html.ChangeTracking.Trackable.TriggerRestore(node)},UpdateTextArea:function(textAreaId){var core=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core, textAreaNode=D2L.LP.Web.UI.Html.Dom.GetElementById(textAreaId);if(textAreaNode)textAreaNode.value=core.GetContent(textAreaId)}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.TextEditor={AppendHtml:function(editorId,html){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.TextEditor;me.SetHtml(editorId,me.GetHtml(editorId)+html)},ExecuteCommand:function(editorId,name,value){},FocusByNode:function(node){var textAreaNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-textarea",node);textAreaNode.focus()},GetComputedStyle:function(editorId,styleAttribute){},GetHtml:function(editorId){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(editorId.GetValue()); var textAreaNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-textarea",node);return textAreaNode.value},GetSelectedNode:function(editorId){},GetSelectionContent:function(editorId){return""},GetSpellcheckText:function(editorId){return this.GetHtml(editorId)},GetTextAreaId:function(node){var textAreaNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-textarea",node);return textAreaNode.getAttribute("id")},HasChanged:function(editorId){var node=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.GetEditor(editorId); var textAreaNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-textarea",node);return textAreaNode._changeTracking.hasChanged},IsDirty:function(editorId){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(editorId.GetValue());return node.d2l_isDirty},MoveToStart:function(editorId){},PasteDelayed:function(editorId,delayedFunction,selectionProvider,htmlProvider){},SelectNode:function(editorId,nodeToSelect){},SetHtml:function(editorId,html){var htmlEditor=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor; var node=htmlEditor.GetEditor(editorId);var textAreaNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-textarea",node);textAreaNode.value=html;$(textAreaNode).trigger("change");node.d2l_isDirty=true},SetSize:function(editorId,height,width){},SetSpellcheckText:function(editorId,response){var editNode=this.SetHtml(editorId,response)}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.NoEditor={AppendHtml:function(editorId,html){},ExecuteCommand:function(editorId,name,value){},FocusByNode:function(node){},GetComputedStyle:function(editorId,styleAttribute){},GetHtml:function(editorId){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(editorId.GetValue());var hiddenNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementChild(node);return hiddenNode.value},GetSelectedNode:function(editorId){},GetSelectionContent:function(editorId){return""},HasChanged:function(editorId){return false}, IsDirty:function(editorId){},MoveToStart:function(editorId){},PasteDelayed:function(editorId,delayedFunction,selectionProvider,htmlProvider){},SelectNode:function(editorId,nodeToSelect){},SetHtml:function(editorId,html){var htmlEditor=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var node=htmlEditor.GetEditor(editorId);var hiddenNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementChild(node);hiddenNode.value=html},SetSize:function(editorId,height,width){}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.FileData=D2L.Class.Create({Construct:function(fileSystemType,id,name,size,location){if(fileSystemType===undefined)fileSystemType="";this.m_fileSystemType=fileSystemType;if(id===undefined)id="";this.m_id=id;if(name===undefined)name="";this.m_name=name;if(size===undefined)size=0;this.m_size=size;if(location===undefined)location="";this.m_location=location},_serialize:function(serializer){serializer.AddMember("fileSystemType",this.m_fileSystemType);serializer.AddMember("id", this.m_id);serializer.AddMember("location",this.m_location)},GetFileSystemType:function(){return this.m_fileSystemType},GetId:function(){return this.m_id},GetName:function(){return this.m_name},GetLocation:function(){return this.m_location},GetSize:function(){return this.m_size}}); D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.Param=D2L.Class.Create({Construct:function(id,html,htmlOrgUnitId,files){if(id===undefined)id="";this.m_id=id;if(html===undefined)html="";this.m_html=html;if(htmlOrgUnitId===undefined)htmlOrgUnitId=0;this.m_htmlOrgUnitId=htmlOrgUnitId;if(files===undefined)files=[];this.m_files=files},_serialize:function(serializer){serializer.AddMember("id",this.m_id);serializer.AddMember("html",this.m_html);serializer.AddMember("htmlOrgUnitId",this.m_htmlOrgUnitId);serializer.AddMember("files", this.m_files)},GetFiles:function(){return this.m_files},GetHtml:function(){return this.m_html}}); D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.Button={GetOnActiveChangeByNode:function(node){if(node.d2l_onActiveChange===undefined)node.d2l_onActiveChange=new D2L.LP.Web.UI.Events.Event;return node.d2l_onActiveChange},GetOnEnabledChangeByNode:function(node){if(node.d2l_onEnabledChange===undefined)node.d2l_onEnabledChange=new D2L.LP.Web.UI.Events.Event;return node.d2l_onEnabledChange},Initialize:function(name,commandName,buttonId,mixins){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.Button; var plugin=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin;var node;var onClick=null;if(mixins&&mixins["onClick"])onClick=mixins["onClick"];return plugin.InitializeControl("Button",{"action":D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.Button,"name":name,"commandName":commandName,"controlId":buttonId,"onClick":onClick,"nodeChange":function(args){if(!node)node=D2L.LP.Web.UI.Html.Dom.GetElementById(buttonId.GetValue());if(mixins&&mixins["activatedDelegate"])me.SetIsActiveByNode(node, mixins["activatedDelegate"](args));else if(!mixins||mixins["activatedDelegate"]!==null)me.SetIsActiveByNode(node,args.getCommandState(commandName));if(mixins&&mixins["enabledDelegate"])me.SetIsEnabledByNode(node,mixins["enabledDelegate"](args))}})},InitializeByNode:function(node){D2L.LP.Web.UI.Html.Aria.SetRole(node,"button");var title=D2L.LP.Web.UI.Html.Dom.GetAttribute(node,"title");if(title!=null&&title.length>0)D2L.LP.Web.UI.Html.Aria.SetAttribute(node,"label",title);D2L.LP.Web.UI.Common.Controls.Link.InstallClickable(node); var isDisabled=D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-htmleditor-button-disabled",node);if(isDisabled)D2L.LP.Web.UI.Html.Aria.SetAttribute(node,"disabled","true");var hasOnClick=D2L.LP.Web.UI.Html.Dom.HasAttribute(node,"data-onclick");if(!hasOnClick)return;var onClick=D2L.LP.Web.UI.Html.Dom.GetAttribute(node,"data-onclick");D2L.LP.Web.UI.Html.Dom.RemoveAttribute(node,"data-onclick");D2L.LP.Web.UI.Html.Dom.AddEventListener("click",node,function(){var isDisabled=D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-htmleditor-button-disabled", node);if(!isDisabled)eval(onClick)})},SetIsActive:function(id,isActive){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.Button;var buttonId=id.GetValue();var node=D2L.LP.Web.UI.Html.Dom.GetElementById(buttonId);me.SetIsActiveByNode(node,isActive)},SetIsActiveByNode:function(node,isActive){if(isActive==D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-htmleditor-button-active",node))return;if(isActive)D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-htmleditor-button-active",node);else D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-htmleditor-button-active", node);if(node.d2l_onActiveChange!==undefined)node.d2l_onActiveChange.Trigger(isActive)},SetIsEnabled:function(id,isEnabled){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.Button;var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());me.SetIsEnabledByNode(node,isEnabled)},SetIsEnabledByNode:function(node,isEnabled){var isDisabled=D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-htmleditor-button-disabled",node);if(!isEnabled==isDisabled)return;D2L.LP.Web.UI.Html.Aria.SetAttribute(node,"disabled", !isEnabled);if(isEnabled)D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-htmleditor-button-disabled",node);else D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-htmleditor-button-disabled",node);if(node.d2l_onEnabledChange!==undefined)node.d2l_onEnabledChange.Trigger(isEnabled)}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.ColorButton={SetColorSample:function(id,value){var sampleNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-color-sample",D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue()));sampleNode.style.background=value},UpdateClassName:function(id,className,addClassName){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(addClassName==D2L.LP.Web.UI.Html.Dom.HasClassName(className,node))return;if(addClassName)D2L.LP.Web.UI.Html.Dom.AddClassName(className, node);else D2L.LP.Web.UI.Html.Dom.RemoveClassName(className,node)}};D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.Menu={Register:function(menuId,editorNode){editorNode.d2l_onContentFocus.AddListener(function(){D2L.LP.Web.UI.Desktop.Controls.MenuFlyout.Close(menuId)})}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.SelectList={Initialize:function(name,commandName,listId){var plugin=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin;var selectList=D2L.LP.Web.UI.Common.Controls.SelectList;var values;return plugin.InitializeControl("SelectList",{"selectList":D2L.LP.Web.UI.Common.Controls.SelectList,"name":name,"commandName":commandName,"controlId":listId,"nodeChange":function(args){if(!values)values=selectList.GetValues(listId);var newValue=args.getCommandValue(commandName); if(newValue===0)newValue="";var currentValue=selectList.GetSelectedValue(listId);if(newValue==currentValue)return;for(var i=0;i<values.length;i++)if(values[i]===newValue){selectList.SetSelectedValue(listId,newValue);return}selectList.SetSelectedValue(listId,"")}})}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.SplitButton={DoAction:function(splitButtonId){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(splitButtonId.GetValue());var menuContainer=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(node);var activeItem=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-split-item-active",menuContainer);D2L.LP.Web.UI.Html.Dom.DispatchEvent("click",activeItem)},SetIsActiveByNode:function(node,isActive){if(isActive)D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-htmleditor-split-button-active", node);else D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-htmleditor-split-button-active",node)},SetIsEnabledByNode:function(node,isEnabled){if(isEnabled)D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-htmleditor-split-button-disabled",node);else D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-htmleditor-split-button-disabled",node)},SetSelectedItemByNode:function(menuItem){var node=D2L.LP.Web.UI.Html.Dom.GetPreviousElementSibling(D2L.LP.Web.UI.Html.Dom.GetParentElementByClassName("d2l-htmleditor-toolbar-item", menuItem));D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.SplitButton.UpdateByNode(node,menuItem.getAttribute("data-d2l-key"))},Update:function(splitButtonId,itemKey){D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.SplitButton.UpdateByNode(D2L.LP.Web.UI.Html.Dom.GetElementById(splitButtonId.GetValue()),itemKey)},UpdateByNode:function(node,itemKey){if(node.getAttribute("data-d2l-key")===itemKey)return;var itemData=node.d2l_itemsData[itemKey];if(itemData===undefined)return;var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.SplitButton; node.setAttribute("title",itemData.title);D2L.LP.Web.UI.Html.Aria.SetAttribute(node,"label",itemData.title);node.setAttribute("data-d2l-key",itemData.key);var iconNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-split-button-icon",node);iconNode.src=itemData.src;iconNode.className="d2l-htmleditor-split-button-icon "+itemData.className;var menuContainer=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(node);var menuItems=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-htmleditor-buttonmenuitem", menuContainer);for(var i=0;i<menuItems.length;i++){var menuItem=menuItems[i];var key=menuItem.getAttribute("data-d2l-key");if(key!==itemKey)D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-htmleditor-split-item-active",menuItem);else{D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-htmleditor-split-item-active",menuItem);me.SetIsActiveByNode(node,D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-htmleditor-button-active",menuItem));me.SetIsEnabledByNode(node,!D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-htmleditor-button-disabled", menuItem))}}}};D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.AutosaveAction={TriggerSave:function(){if(typeof tinymce==="undefined")return;if(!tinymce)return;if(typeof tinymce.triggerSave==="function")tinymce.triggerSave()}};D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.AccessibilityCheckAction={CheckAccessibility:function(editorId){return D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.CheckAccessibility(editorId)}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.AttributesAction={Plugin:function(action,isEnabled,host){host.registerService("fra-html-editor-attributes","0.1",{click:function(attributes){if(!isEnabled)return Promise.reject("disabled");var promise=new Promise(function(resolve,reject){action(attributes,resolve,reject)});return promise},config:function(){return{isEnabled:isEnabled}}})},GetAttributesData:function(editorId){var node=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.GetSelectedNode(editorId); if(node==null||node.nodeName=="BODY"||node.nodeType==9||node.getAttribute===undefined)return null;var title="";if(D2L.LP.Web.UI.Html.Dom.HasAttribute(node,"title"))title=node.getAttribute("title");var idValue="";if(D2L.LP.Web.UI.Html.Dom.HasAttribute(node,"id"))idValue=node.getAttribute("id");var className=node.className;var style="";if(D2L.LP.Web.UI.Html.Dom.HasAttribute(node,"style"))style=node.getAttribute("style");var textDirection="";if(D2L.LP.Web.UI.Html.Dom.HasAttribute(node,"dir"))textDirection= node.getAttribute("dir");return{title:title,id:idValue,className:className,style:style,textDirection:textDirection}},Initialize:function(buttonId){var button=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.Button;var plugin=button.Initialize("d2l_attributes","attributes",buttonId,{activatedDelegate:null,enabledDelegate:function(args){var isDisabled=args.element!=null&&(args.element.nodeName==="BODY"||args.element.nodeName==="BR"||args.element.nodeType===9);return!isDisabled}});return plugin}, SetAttributes:function(editorId,location,attributes,resolve,reject){if(attributes){location.RemoveQueryString("attributes");location=location.WithQueryString("attributes",attributes)}var event=D2L.LP.Web.UI.Desktop.MasterPages.Dialog.Open(editorId,location);event.AddListener(function(obj){if(resolve){resolve(obj);return}var node=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.GetSelectedNode(editorId);if(node==null)return;var setAttr=function(name,value){if(value=="")node.removeAttribute(name);else node.setAttribute(name, value)};node.className=obj.className;setAttr("title",obj.title);setAttr("id",obj.id);setAttr("style",obj.style);setAttr("dir",obj.textDirection)});if(reject)event.AddReleaseListener(function(){reject("Cancelled")})}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.AttributesAction.View={GetAttributes:function(id){var nodeId=id.GetValue();var node=D2L.LP.Web.UI.Html.Dom.GetElementById(nodeId);var getTitle=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getTitle");var title=getTitle.call(getTitle);var getId=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getId");var idValue=getId.call(getId);var getClassName=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getClassName");var className=getClassName.call(getClassName); className=className.replace(/,[\s]*|;[\s]*/g," ");var getStyle=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getStyle");var style=getStyle.call(getStyle);var getTextDirection=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getTextDirection");var textDirection=getTextDirection.call(getTextDirection);return{title:D2L.LP.Web.UI.Html.JavaScript.TrimString(0,title),id:D2L.LP.Web.UI.Html.JavaScript.TrimString(0,idValue),className:D2L.LP.Web.UI.Html.JavaScript.TrimString(0,className),style:D2L.LP.Web.UI.Html.JavaScript.TrimString(0, style),textDirection:textDirection}}};D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.CodeAction={Plugin:function(action,isEnabled,host){host.registerService("fra-html-editor-code","0.1",{config:function(){return{isEnabled:isEnabled}}})}}; D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-htmleditor-code",function(node){var dialogBody=D2L.LP.Web.UI.Html.Dom.GetParentElementByClassName("d2l-dialog-body",node);var textArea=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-dialog-textarea",node);var wordWrap=D2L.LP.Web.UI.Html.Dom.GetPreviousElementSibling(D2L.LP.Web.UI.Html.Dom.GetPreviousElementSibling(node));var wordWrapRect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(wordWrap);var daylightEnabled=D2L.LP.Web.UI.Daylight.IsEnabled(); var resizeTextArea=function(){var rect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(dialogBody);if(!daylightEnabled)textArea.style.width=rect.width-46+"px";textArea.style.height=rect.height-wordWrapRect.height-35+"px"};D2L.LP.Web.UI.Events.OnResize.AddListener(function(){setTimeout(resizeTextArea,0)})}); D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.CodeAction.View={GetCode:function(id){var textArea=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());return textArea.value},SetWrap:function(id,isWrap){var textArea=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var wrapType="off";if(isWrap)wrapType="soft";textArea.setAttribute("wrap",wrapType)}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.DirectionalityAction={InitializeLtr:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.DirectionalityAction;var plugin=me.Initialize(id,"ltr");return plugin},InitializeRtl:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.DirectionalityAction;var plugin=me.Initialize(id,"rtl");return plugin},Initialize:function(id,dir){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.DirectionalityAction;var button= D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.Button;return button.Initialize("d2l_"+dir,dir,id,{activatedDelegate:function(args){return me.IsDirection(args.getParentBlockElement(args.element),dir)},enabledDelegate:function(args){return args.getParentBlockElement(args.element)!=null}})},IsDirection:function(element,dir){if(element)return element.getAttribute("dir")===dir;return false},SetDirection:function(editorId,direction){var plugin=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin; var parent=plugin.GetParentNodeOfSelected(editorId);if(parent)if(plugin.GetAttribute(editorId,parent,"dir")!==direction)plugin.SetAttribute(editorId,parent,"dir",direction);else plugin.SetAttribute(editorId,parent,"dir","");plugin.Focus(editorId)}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.EquationActions={GetSelectedMathML:function(editorId){var mathML="";var node=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.GetSelectedNode(editorId);if(node&&node.nodeName=="IMG"&&node.className.indexOf("equation")>-1)if(node.attributes.getNamedItem("data-d2l-mathml")!==null){mathML=node.attributes.getNamedItem("data-d2l-mathml").value;var mathML=decodeURIComponent(mathML)}else if(node.attributes.getNamedItem("hack")!==null){var applet=node.attributes.getNamedItem("hack").value; var appletDecoded=decodeURIComponent(applet);var tempDiv=document.createElement("div");tempDiv.innerHTML=appletDecoded;var math="";if(tempDiv!==null&&tempDiv.firstChild!==null&&tempDiv.firstChild.childNodes.length>0){var params=tempDiv.firstChild.childNodes;for(var i=0;i<params.length;i++)if(params[i].attributes!==null){var paramNameAtt=params[i].attributes.getNamedItem("name");if(paramNameAtt!==null&¶mNameAtt.value==="eq"){var paramValueAtt=params[i].attributes.getNamedItem("value");math=paramValueAtt.value; mathML=D2L.LP.Web.UI.Html.Math.AnnotateMathML("webeq","",math,math);break}}}}return mathML}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.FormatAction={Initialize:function(name,commandName,listId){var plugin=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin;var selectList=D2L.LP.Web.UI.Common.Controls.SelectList;var values;return plugin.InitializeControl("SelectList",{"selectList":D2L.LP.Web.UI.Common.Controls.SelectList,"name":name,"commandName":commandName,"controlId":listId,"nodeChange":function(args){if(!values)values=selectList.GetValues(listId);var newValue= "";for(var i=0;i<values.length;i++)if(args.hasFormat(values[i])){newValue=values[i];break}var currentValue=selectList.GetSelectedValue(listId);if(newValue==currentValue)return;selectList.SetSelectedValue(listId,newValue)}})}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.FontFamilyAction={Plugin:function(isEnabled,fontFamilies,host){host.registerService("fra-html-editor-font-family","0.1",{get:function(){if(!isEnabled)return Promise.reject("disabled");var promise=new Promise(function(resolve){resolve(fontFamilies)});return promise},config:function(){return{isEnabled:isEnabled}}})}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.ChemistryEquationAction={Plugin:function(action,isEnabled,host){host.registerService("fra-html-editor-chemistry-equation","0.1",{click:function(mathML){if(!isEnabled)return Promise.reject("disabled");var promise=new Promise(function(resolve,reject){action(mathML,resolve,reject)});return promise},config:function(){return{isEnabled:isEnabled}}})},GetSelectedMathML:function(editorId){var parent=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.GraphicalEquationAction; return parent.GetSelectedMathML(editorId)},Insert:function(editorId,location,parameters,fraMathML,resolve,reject){var parent=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.GraphicalEquationAction;return parent.Insert(editorId,location,parameters,fraMathML,resolve,reject)},Initialize:function(buttonId){var parent=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.GraphicalEquationAction;D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.SetActionId("chemistry_graphical_editor",buttonId);var onNodeChange= function(element){var buttonNode=D2L.LP.Web.UI.Html.Dom.GetElementById(buttonId.GetValue());var htmlEditComp=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents,isEnabled=true,isActive=false;if(!element.node&&element.element)element.node=element.element;if(!element.isCollapsed&&element.node.nodeName==="IMG"&&element.node.className.indexOf("equation")>-1){var mathMLAttribute=element.node.getAttribute("data-d2l-mathml");isEnabled=mathMLAttribute.indexOf("wiris")>-1;isActive=mathMLAttribute.indexOf("wiris-chemistry")> -1;if(isActive)htmlEditComp.SplitButton.SetSelectedItemByNode(buttonNode)}htmlEditComp.Button.SetIsEnabledByNode(buttonNode,isEnabled);htmlEditComp.Button.SetIsActiveByNode(buttonNode,isActive)};var plugin=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.InitializeScript("Script",{"name":"d2l_chemistryequation","nodeChange":function(element){onNodeChange(element)},"onSetContent":function(obj){parent.OnBeforeSetContent(obj)},"onGetContent":function(obj){parent.OnPostProcess(obj)}}); return plugin}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.LatexEquationAction={Plugin:function(action,isEnabled,host){host.registerService("fra-html-editor-latex-equation","0.1",{click:function(mathML){if(!isEnabled)return Promise.reject("disabled");var promise=new Promise(function(resolve,reject){action(mathML,resolve,reject)});return promise},config:function(){return{isEnabled:isEnabled}}})},GetSelectedMathML:function(editorId){var mathML="";var node=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.GetSelectedNode(editorId);if(node&& node.nodeName==="IMG"&&node.className==="equation")if(node.attributes.getNamedItem("data-d2l-mathml")!=null){mathML=node.attributes.getNamedItem("data-d2l-mathml").value;var mathML=decodeURIComponent(mathML)}return mathML},Insert:function(editorId,location,parameters,fraMathML,resolve,reject){if(fraMathML)parameters.mathml=fraMathML;function opener(){return D2L.LP.Web.UI.Desktop.MasterPages.Dialog.OpenWithParam(editorId,location,parameters,null)}D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.InsertDelayed(editorId, opener,null,resolve,reject)},Initialize:function(buttonId){D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.SetActionId("latex_editor",buttonId);var buttonNode=D2L.LP.Web.UI.Html.Dom.GetElementById(buttonId.GetValue());var events={onNodeChange:function(e){var htmlEditComp=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents,isEnabled=true,isActive=false;if(!e.node&&e.element)e.node=e.element;if(!e.isCollapsed&&e.node.nodeName==="IMG"&&e.node.className.indexOf("equation")>-1){isEnabled=e.node.getAttribute("data-d2l-mathml").indexOf("latex")> -1;isActive=isEnabled;if(isEnabled)htmlEditComp.SplitButton.SetSelectedItemByNode(buttonNode)}htmlEditComp.Button.SetIsEnabledByNode(buttonNode,isEnabled);htmlEditComp.Button.SetIsActiveByNode(buttonNode,isActive)}};var plugin=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.InitializeScript("Script",{"name":"d2l_latexequation","actionId":"latex_editor","nodeChange":function(e){events.onNodeChange(e)}});return plugin}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.GraphicalEquationAction={Plugin:function(action,isEnabled,host){host.registerService("fra-html-editor-graphical-equation","0.1",{click:function(mathML){if(!isEnabled)return Promise.reject("disabled");var promise=new Promise(function(resolve,reject){action(mathML,resolve,reject)});return promise},config:function(){return{isEnabled:isEnabled}}})},GetSelectedMathML:function(editorId){var mathML="";var node=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.GetSelectedNode(editorId); if(node&&node.nodeName=="IMG"&&node.className=="equation")if(node.attributes.getNamedItem("data-d2l-mathml")!=null){mathML=node.attributes.getNamedItem("data-d2l-mathml").value;var mathML=decodeURIComponent(mathML)}else if(node.attributes.getNamedItem("hack")!=null){var applet=node.attributes.getNamedItem("hack").value;var appletDecoded=decodeURIComponent(applet);var tempDiv=document.createElement("div");tempDiv.innerHTML=appletDecoded;var math="";if(tempDiv!==null&&tempDiv.firstChild!==null&&tempDiv.firstChild.childNodes.length> 0){var params=tempDiv.firstChild.childNodes;for(var i=0;i<params.length;i++)if(params[i].attributes!==null){var paramNameAtt=params[i].attributes.getNamedItem("name");if(paramNameAtt!==null&¶mNameAtt.value==="eq"){var paramValueAtt=params[i].attributes.getNamedItem("value");math=paramValueAtt.value;mathML=D2L.LP.Web.UI.Html.Math.AnnotateMathML("webeq","",math,math);break}}}}return mathML},Insert:function(editorId,location,parameters,fraMathML,resolve,reject){if(fraMathML)parameters.mathml=fraMathML; function opener(){return D2L.LP.Web.UI.Desktop.MasterPages.Dialog.OpenWithParam(editorId,location,parameters,null)}D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.InsertDelayed(editorId,opener,null,resolve,reject)},Initialize:function(buttonId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.GraphicalEquationAction;D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.SetActionId("graphical_editor",buttonId);var onNodeChange=function(element){var buttonNode=D2L.LP.Web.UI.Html.Dom.GetElementById(buttonId.GetValue()); var htmlEditComp=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents,isEnabled=true,isActive=false;if(!element.node&&element.element)element.node=element.element;if(!element.isCollapsed&&element.node.nodeName==="IMG"&&element.node.className.indexOf("equation")>-1){var mathMLAttribute=element.node.getAttribute("data-d2l-mathml");isEnabled=mathMLAttribute.indexOf("wiris")>-1;isActive=mathMLAttribute.indexOf("wiris-chemistry")===-1;if(isActive)htmlEditComp.SplitButton.SetSelectedItemByNode(buttonNode)}htmlEditComp.Button.SetIsEnabledByNode(buttonNode, isEnabled);htmlEditComp.Button.SetIsActiveByNode(buttonNode,isActive)};var plugin=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.InitializeScript("Script",{"name":"d2l_graphicalequation","nodeChange":function(element){onNodeChange(element)},"onSetContent":function(obj){me.OnBeforeSetContent(obj)},"onGetContent":function(obj){me.OnPostProcess(obj)}});return plugin},OnPostProcess:function(obj){var convertToMath=function(obj){var func=function(match,sub1,sub2){var hackRegEx=/^<img[^>]*\s+data-d2l-mathml=\"([^\"]*)\"(.|\n|\r)*/i; var hackResult=hackRegEx.exec(match);var hack=decodeURIComponent(hackResult[1]);return hack};obj.content=obj.content.replace(/<img[^>]*\s+data-d2l-mathml=\"[^\"]*\"[^>]*>/gi,func)};if(obj.get)convertToMath(obj)},OnBeforeSetContent:function(obj){var convertToImages=function(obj){var func=function(match){var title=match.match(/title=(\"|\')([^\"]*)(\"|\')/i);if(title!=null&&title.length==4&&title[2]!=null)title=title[2];else title="";var annotationRegex=/<annotation encoding="([^"]*)">/gi;var annotationMatch= annotationRegex.exec(match);var removeAnnotation=false;var classString="equation";if(annotationMatch==null){classString+=" mathmlequation";removeAnnotation=true}else if(annotationMatch[1].indexOf("wiris")>-1)classString+=" graphicalequation";else if(annotationMatch[1]=="latex")classString+=" latexequation";else{classString+=" mathmlequation";removeAnnotation=true}var trimmedMml=match.replace(/>\s+</g,"><");if(removeAnnotation)trimmedMml=trimmedMml.replace(/<annotation[\s\S]*<\/annotation>/g,"");else trimmedMml= trimmedMml.replace(/;\s+&/g,";&");var encodedMml=encodeURIComponent(trimmedMml);var previewImageSrc="/wiris/editorservice.aspx/render.png?mml="+encodedMml;var placeholderImageSrc="'/d2l/img/LP/htmlEditor/equation_unavailable.png'";var placeholderImageTitle="'Preview image not available for this equation'";var imageHtml='<img class="'+classString+'" title="'+title+'" alt="'+title+'" src="'+previewImageSrc+'" style="vertical-align:middle;" hspace="5" vspace="5" onerror="if (this.src != '+placeholderImageSrc+ ") this.src = "+placeholderImageSrc+"; this.alt = "+placeholderImageTitle+"; this.title = "+placeholderImageTitle+'" data-d2l-mathml="'+encodedMml+'" />';return imageHtml};var appletFunc=function(match){var math=match.match(/<math[^>]*>(.|\n|\r)*<\/math>/gi);if(math!=null&&math.length>0)math=math[0];return func(D2L.LP.Web.UI.Html.Math.AnnotateMathML("wiris","",math,math))};obj.content=obj.content.replace(/<applet[^>]*>(.|\n|\r)*?(<math[^>]*>(.|\n|\r)*?<\/math>)(.|\n|\r)*?<\/applet>/gi,appletFunc); obj.content=obj.content.replace(/<math[^>]*>(.|\n|\r)*?<\/math>/gi,func)};convertToImages(obj)}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.MathMLEquationAction={Plugin:function(action,isEnabled,host){host.registerService("fra-html-editor-mml-equation","0.1",{click:function(mathML){if(!isEnabled)return Promise.reject("disabled");var promise=new Promise(function(resolve,reject){action(mathML,resolve,reject)});return promise},config:function(){return{isEnabled:isEnabled}}})},GetSelectedMathML:function(editorId){var mathML="";var node=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.GetSelectedNode(editorId); if(node&&node.nodeName==="IMG"&&node.className==="equation")if(node.attributes.getNamedItem("data-d2l-mathml")!==null){mathML=node.attributes.getNamedItem("data-d2l-mathml").value;var mathML=decodeURIComponent(mathML)}else if(node.attributes.getNamedItem("hack")!==null){var applet=node.attributes.getNamedItem("hack").value;var appletDecoded=decodeURIComponent(applet);var tempDiv=document.createElement("div");tempDiv.innerHTML=appletDecoded;var math="";if(tempDiv!==null&&tempDiv.firstChild!==null&& tempDiv.firstChild.childNodes.length>0){var params=tempDiv.firstChild.childNodes;for(var i=0;i<params.length;i++)if(params[i].attributes!==null){var paramNameAtt=params[i].attributes.getNamedItem("name");if(paramNameAtt!==null&¶mNameAtt.value==="eq"){var paramValueAtt=params[i].attributes.getNamedItem("value");math=paramValueAtt.value;mathML=D2L.LP.Web.UI.Html.Math.AnnotateMathML("webeq","",math,math);break}}}}return mathML},Insert:function(editorId,location,parameters,fraMathML,resolve,reject){if(fraMathML)parameters.mathml= fraMathML;function opener(){return D2L.LP.Web.UI.Desktop.MasterPages.Dialog.OpenWithParam(editorId,location,parameters,null)}D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.InsertDelayed(editorId,opener,null,resolve,reject)},Initialize:function(buttonId){D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.SetActionId("mathml_editor",buttonId);var buttonNode=D2L.LP.Web.UI.Html.Dom.GetElementById(buttonId.GetValue());var events={convertToMath:function(obj){var func=function(match,sub1,sub2){var hackRegEx=/^<img[^>]*\s+data-d2l-mathml=\"([^\"]*)\"(.|\n|\r)*/i; var hackResult=hackRegEx.exec(match);var hack=decodeURIComponent(hackResult[1]);return hack};obj.content=obj.content.replace(/<img[^>]*\s+data-d2l-mathml=\"[^\"]*\"[^>]*>/gi,func)},onNodeChange:function(e){var htmlEditComp=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents,isEnabled=true,isActive=false;if(!e.node&&e.element)e.node=e.element;if(!e.isCollapsed&&e.node.nodeName==="IMG"&&e.node.className.indexOf("equation")>-1){var mathml=e.node.getAttribute("data-d2l-mathml");isEnabled=mathml.indexOf("latex")=== -1&&mathml.indexOf("wiris")===-1;isActive=isEnabled;if(isEnabled)htmlEditComp.SplitButton.SetSelectedItemByNode(buttonNode)}htmlEditComp.Button.SetIsEnabledByNode(buttonNode,isEnabled);htmlEditComp.Button.SetIsActiveByNode(buttonNode,isActive)}};var plugin=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.InitializeScript("Script",{"name":"d2l_mathmlequation","actionId":"mathml_editor","nodeChange":function(e){events.onNodeChange(e)}});return plugin}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.FullscreenAction={IsFullscreen:function(editorId){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(editorId.GetValue());return node.d2l_isFullscreen===true},SetIsFullscreen:function(editorId,buttonId,isFullscreen){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.FullscreenAction;if(me.IsFullscreen(editorId)==isFullscreen)return;var button=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.Button;var node=D2L.LP.Web.UI.Html.Dom.GetElementById(editorId.GetValue()); var bodyNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-body");if(bodyNode==null)bodyNode=document.getElementById("d2l_body");if(node.d2l_fullscreenResize===undefined)node.d2l_fullscreenResize=function(){var tempViewPort=D2L.LP.Web.UI.Html.Dom.GetViewportSize();D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.SetSize(editorId,tempViewPort.height+"px",tempViewPort.width+"px")};if(isFullscreen){var boundingRect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(node);node.d2l_nomralSize={height:boundingRect.height, width:boundingRect.width};var viewPort=D2L.LP.Web.UI.Html.Dom.GetViewportSize();bodyNode.style.overflow="hidden";D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-htmleditor-fullscreen",node);D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.SetSize(editorId,viewPort.height+"px",viewPort.width+"px");D2L.LP.Web.UI.Events.OnResize.AddListener(node.d2l_fullscreenResize)}else{D2L.LP.Web.UI.Events.OnResize.RemoveListener(node.d2l_fullscreenResize);D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.SetSize(editorId,node.d2l_nomralSize.height+ "px",node.d2l_nomralSize.width+"px");D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-htmleditor-fullscreen",node);bodyNode.style.overflow="visible"}D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.SetIsResizeDisplayedByNode(node,!isFullscreen);button.SetIsActive(buttonId,isFullscreen);node.d2l_isFullscreen=isFullscreen},ToggleFullscreen:function(editorId,buttonId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.FullscreenAction;me.SetIsFullscreen(editorId,buttonId,!me.IsFullscreen(editorId))}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.HorizontalRuleAction={GetHorizontalRuleData:function(editorId){var node=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.GetSelectedNode(editorId);if(node===null||node.nodeName!=="HR")return null;var width=node.style.width;var widthType;if(width.indexOf("%")!==-1){width=width.replace("%","");widthType="%"}else if(width.indexOf("px")!==-1){width=width.replace("px","");widthType="px"}else return null;var height=node.style.height;if(height==="auto"||height.indexOf("px")=== -1)height=0;else height=height.replace("px","");var borderType="inset";if(node.style.borderStyle!=="inset")borderType="solid";return{width:width,widthType:widthType,height:height,borderType:borderType}},Initialize:function(buttonId){var button=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.Button;var plugin=button.Initialize("d2l_hr","hr",buttonId,{activatedDelegate:function(args){return args&&args.element.nodeName==="HR"},enabledDelegate:null,onClick:function(args){if(args.element.nodeName=== "HR")args.selectNode(args.element)}});return plugin}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.HorizontalRuleAction.View={GetHorizontalRule:function(id){var nodeId=id.GetValue();var node=D2L.LP.Web.UI.Html.Dom.GetElementById(nodeId);var getWidthType=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getWidthType");var widthType=getWidthType.call(getWidthType);if(widthType!="px")widthType="%";var getWidthValue=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getWidthValue");var widthValue=getWidthValue.call(getWidthValue);if(widthValue==null){widthValue= 100;widthType="%"}var getHeightValue=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getHeightValue");var heightValue=getHeightValue.call(getHeightValue);if(heightValue==null)heightValue="auto";else heightValue=heightValue+"px";var getShadow=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getShadow");var shadow=getShadow.call(getShadow);var borderStyle="solid";if(shadow)borderStyle="inset";var hr='<hr style="width: '+widthValue+widthType+"; "+"height: "+heightValue+"; "+"color: #ffffff; "+"border-style: "+ borderStyle+"; "+"border-width: 1px; "+'border-color: #cccccc;" />';return hr}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.ImageAction={Plugin:function(action,isEnabled,host){host.registerService("fra-html-editor-image","0.1",{click:function(){if(!isEnabled)return Promise.reject("disabled");var promise=new Promise(function(resolve,reject){action(resolve,reject)});return promise},config:function(){return{isEnabled:isEnabled}}})},Insert:function(editorId,openFunction,orgUnitPath,tempFilePath,resolve,reject){D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.PasteDelayed(editorId, openFunction,null,function(responseValues){var files=responseValues[0],isDecorative=responseValues[1],altText=responseValues[2];if(isDecorative)altText="";else altText=D2L.LP.Web.UI.Html.JavaScript.HtmlEncode(altText);var src;if(files[0].FileSystemType.toLowerCase()==="content"){src=files[0].FileId;if(src.substr(0,1)!="/")src=orgUnitPath+src;src=D2L.LP.Web.UI.Html.JavaScript.UrlEncodePath(src);src=src.replace("%2E",".")}else if(files[0].FileSystemType.toLowerCase()==="temp")src=tempFilePath.replace("%7b0%7d", files[0].FileId);else if(files[0].FileSystemType.toLowerCase()==="external")src=files[0].GetFileId();D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.TriggerFileAdded(editorId,new D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.FileData(files[0].FileSystemType,files[0].FileId,files[0].FileName,files[0].Size,src));var imgStyle=D2L.LP.Web.UI.Daylight.IsEnabled()?'style="max-width:100%;" data-d2l-editor-default-img-style="true"':"";var html='<img src="'+D2L.LP.Web.UI.Html.JavaScript.HtmlEncode(src)+'"'+' alt="'+ altText+'" title="'+altText+'" '+imgStyle+" />";return html},resolve,reject)}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.IndentOutdent={InitializeIndent:function(buttonId){var button=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.Button;return button.Initialize("d2l_indent","indent",buttonId,{activatedDelegate:null,enabledDelegate:null})},InitializeOutdent:function(buttonId){var button=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.Button;return button.Initialize("d2l_outdent","outdent",buttonId,{activatedDelegate:null,enabledDelegate:function(args){return args.getCommandState("outdent")}})}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.IsfAction={Plugin:function(action,isEnabled,isWindowModeOpaque,host){host.registerService("fra-html-editor-isf","0.1",{click:function(){if(!isEnabled)return Promise.reject("disabled");var promise=new Promise(function(resolve,reject){action(resolve,reject)});return promise},config:function(){return{isEnabled:isEnabled,isWindowModeOpaque:isWindowModeOpaque}}})},Initialize:function(isWindowModeOpaque){var events={onBeforeSetContent:function(o){this._convertToImages(o)}, onPostProcess:function(o){if(o.get){this._convertToElements(o);return}},_convertToImages:function(context){var plugin=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin;if(context.content!=null&&context.content.length>0&&context.content.search(/(<object|<embed|<iframe)/i)!=-1){var html=context.content;var sb=new D2L.Util.StringBuilder;var embedStartRe=new RegExp("(<embed)","i");var objectStartRe=new RegExp("(<object)","i");var iFrameStartRe=new RegExp("(<iframe)","i");var scriptStartRe= new RegExp("(<script|"+plugin.RegExp.OpenScript+")","i");var searchRe=new RegExp("(<object|<embed|<iframe|<script|"+plugin.RegExp.OpenScript+")","i");var toIndex=0;while(html.length>0){toIndex=html.search(searchRe);if(toIndex==0){embedStartRe.lastIndex=0;scriptStartRe.lastIndex=0;objectStartRe.lastIndex=0;iFrameStartRe.lastIndex=0;searchRe.lastIndex=toIndex;var match=searchRe.exec(html)[0];if(scriptStartRe.test(match)){var scriptEndIndex=html.indexOf(">",toIndex);if(html.substr(scriptEndIndex-1,1)== "/")toIndex=scriptEndIndex+1;else{var scriptEndRe=new RegExp("(<\/script>|"+plugin.RegExp.CloseScript+")","i");scriptEndIndex=html.search(scriptEndRe);if(scriptEndIndex!=-1)toIndex=html.indexOf(">",scriptEndIndex)+1;else toIndex=html.indexOf(">",toIndex)+1}sb.Append(html.substring(0,toIndex));html=html.substring(toIndex)}else if(objectStartRe.test(match)){var isValidObject=true;var objectHtml=html.substring(0).toLowerCase();var objectCount=1;var objectFromIndex=7;var objectStartIndex=0;var objectEndIndex= 0;while(objectCount>0){objectStartIndex=objectHtml.indexOf("<object",objectFromIndex);objectEndIndex=objectHtml.indexOf("</object>",objectFromIndex);if(objectStartIndex!=-1&&objectStartIndex<objectEndIndex){objectCount+=1;objectFromIndex=objectStartIndex+7}else if(objectEndIndex!=-1){objectCount-=1;objectFromIndex=objectEndIndex+9}if(objectEndIndex===-1){isValidObject=false;break}}if(isValidObject){sb.Append(events._createImage(html.substring(0,objectFromIndex)));html=html.substring(objectFromIndex)}else{sb.Append(html); html=""}}else if(embedStartRe.test(match)){var embedEndIndex=html.indexOf(">");if(html.substr(embedEndIndex-1,1)==="/")embedEndIndex=embedEndIndex+1;else{var embedEndRe=new RegExp("</embed>","i");embedEndIndex=html.search(embedEndRe);if(embedEndIndex!=-1)embedEndIndex=embedEndIndex+8;else embedEndIndex=html.indexOf(">")+1}sb.Append(events._createImage(html.substring(0,embedEndIndex)));html=html.substring(embedEndIndex)}else if(iFrameStartRe.test(match)){var iFrameEndIndex=html.indexOf(">");var iFrameHtml= html.substring(0,iFrameEndIndex+1);var iFrameSrcRe=new RegExp("src=('|\")[^>]*youtube[^'\">]*('|\")","i");iFrameHtml=iFrameHtml.replace(iFrameSrcRe,function(srcHtml){if(isWindowModeOpaque)if(srcHtml.indexOf("wmode")===-1)if(srcHtml.indexOf("?")===-1)return srcHtml.substring(0,srcHtml.length-1)+"?wmode=opaque"+srcHtml.substring(srcHtml.length-1);else return srcHtml.substring(0,srcHtml.length-1)+"&wmode=opaque"+srcHtml.substring(srcHtml.length-1);else return srcHtml.replace(/wmode=([^&#\'\"]*)/, "wmode=opaque");else if(srcHtml.indexOf("wmode")!==-1)return srcHtml=srcHtml.replace(/wmode=([^&#\'\"]*)/,"wmode=");else return srcHtml});sb.Append(iFrameHtml);html=html.substring(iFrameEndIndex+1)}}else if(toIndex===-1){sb.Append(html);break}else{sb.Append(html.substring(0,toIndex));html=html.substring(toIndex)}}context.content=sb.ToString()}if(D2L.LP.Web.UI.Daylight.IsEnabled())this._setDefaultImageStyle(context)},_createImage:function(html){var me=this;var width=me._getAttributeValue("width",html); if(width==null)width="100px";var height=me._getAttributeValue("height",html);if(height==null)height="100px";var classId=me._getAttributeValue("classid",html);if(classId==null)classId=me._getAttributeValue("type",html);return'<img src="/d2l/img/LP/htmlEditor/eq_trans.gif" '+'width="'+width+'" '+'height="'+height+'" '+'class="'+me._getImageClassName(classId)+'" '+'data-isf-content="'+encodeURIComponent(html)+'" />'},_setDefaultImageStyle:function(context){if(context.content===null||context.content.length<= 0)return;var node=(new DOMParser).parseFromString(context.content,"text/html");if(!node||!node.body||!node.body.firstElementChild)return;var img=node.body.firstElementChild;if(!img||img.nodeName.toUpperCase()!=="IMG"||img.hasAttribute("width")||img.hasAttribute("height")||img.style.width||img.style.height)return;img.style.maxWidth="100%";img.setAttribute("data-d2l-editor-default-img-style","true");context.content=img.outerHTML},_createElement:function(html,height,width){var plugin=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin; if(width===null)width="100px";if(height===null)height="100px";html=decodeURIComponent(html);html=html.replace(new RegExp(plugin.RegExp.HrefString,"g"),"");html=html.replace(new RegExp(plugin.RegExp.SrcString,"g"),"");html=html.replace(new RegExp("width=[\"']{1}[0-9px]+['\"]","gi"),'width="'+width+'"');html=html.replace(new RegExp("height=[\"']{1}[0-9px]+['\"]","gi"),'height="'+height+'"');html=html.replace(new RegExp("width=[0-9px]+","gi"),"width="+width);html=html.replace(new RegExp("height=[0-9px]+", "gi"),"height="+height);return html},_getImageClassName:function(classId){if(classId!=null){classId=classId.toLowerCase();var guidIndex=classId.indexOf(":");if(guidIndex!=-1&&classId.length>guidIndex+1)classId=classId.substring(guidIndex+1)}else classId="";switch(classId){case "d27cdb6e-ae6d-11cf-96b8-444553540000":case "application/x-shockwave-flash":case "d2l_flash":return"disf_flash";case "166b1bca-3f9c-11cf-8075-444553540000":return"disf_shockwave";case "6bf52a52-394a-11d3-b153-00c04f79faa6":case "22d6f312-b0f6-11d0-94ab-0080c74c7e95":case "05589fa1-c356-11ce-bf01-00aa0055595a":return"disf_windowsmedia"; case "02bf25d5-8c17-4b23-bc80-d3488abddc6b":case "d2l_qt":return"disf_quicktime";case "cfcdaa03-8be4-11cf-b84b-0020afbbccfa":return"disf_realmedia";default:return"disf_default"}},_getAttribute:function(attributeName,html){var attRe=new RegExp(attributeName+"=(\"[^<>\"]*\"|'[^<>']*'|w+)","i");var attMatch=attRe.exec(html);if(attMatch!=null&&attMatch.length>0)return attMatch[0];else return null},_getAttributeValue:function(attributeName,html){var attValue=null;var attRe=new RegExp(attributeName+"=(\"[^<>\"]*\"|'[^<>']*'|w+)", "i");var attMatch=attRe.exec(html);if(attMatch!=null&&attMatch.length>1)if(attMatch[1].length>1&&(attMatch[1].substr(0,1)=="'"||attMatch[1].substr(0,1)=='"'))attValue=attMatch[1].substring(1,attMatch[1].length-1);else attValue=attMatch[1];return attValue},_convertToElements:function(context){if(context.content!=null&&context.content.length>0&&context.content.search(/data-isf-content/i)!=-1){var html=context.content;var sb=new D2L.Util.StringBuilder;var toIndex=0;var imgStartRe=new RegExp("(<img)", "i");while(html.length>0){imgStartRe.lastIndex=0;toIndex=html.search(imgStartRe);if(toIndex==0){var imgEndIndex=html.indexOf(">");if(html.substr(imgEndIndex-1,1)==="/")imgEndIndex=imgEndIndex+1;else{var imgEndRe=new RegExp("</img>","i");imgEndIndex=html.search(imgEndRe);if(imgEndIndex!=-1)imgEndIndex=imgEndIndex+6;else imgEndIndex=html.indexOf(">")+1}var imgHtml=html.substring(0,imgEndIndex);if(imgHtml.indexOf("data-isf-content")!==-1)sb.Append(this._createElement(this._getAttributeValue("data-isf-content", imgHtml),this._getAttributeValue("height",imgHtml),this._getAttributeValue("width",imgHtml)));else sb.Append(imgHtml);html=html.substring(imgEndIndex)}else if(toIndex==-1){sb.Append(html);break}else{sb.Append(html.substring(0,toIndex));html=html.substring(toIndex)}}context.content=sb.ToString()}}};var plugin=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.InitializeScript("Script",{"name":"d2l_isf","onSetContent":function(obj){events.onBeforeSetContent(obj)},"onGetContent":function(obj){events.onPostProcess(obj)}}); return plugin}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.LinkAction={GetLinkData:function(editorId){var node=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.GetSelectedNode(editorId);if(node==null||node.nodeName!="A")return null;var href=node.getAttribute("href");var title=D2L.LP.Web.UI.Html.Dom.GetTextContent(node);var target=node.getAttribute("target");if(target==="_top")target=1;else if(target==="_blank")target=2;else target=0;return{href:href,target:target,title:title}},GetLinkSelectedText:function(editorId){var text;var selectedNode= D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.GetSelectedNode(editorId);if(selectedNode&&selectedNode.nodeName==="A")text=D2L.LP.Web.UI.Html.Dom.GetTextContent(selectedNode);else text=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.GetSelectionContent(editorId);if(text===undefined||text===null)text="";return text},Initialize:function(buttonId){var button=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.Button;var plugin=button.Initialize("d2l_link","link",buttonId,{activatedDelegate:function(args){return args&& args.element.nodeName==="A"},enabledDelegate:null,onClick:function(args){if(args.element.nodeName==="A")args.selectNode(args.element)}});return plugin},SelectLink:function(editorId){var htmlEditor=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var selectedNode=htmlEditor.GetSelectedNode(editorId);if(selectedNode==null)return;if(selectedNode.nodeName==="A")htmlEditor.SelectNode(editorId,selectedNode)}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.PreviewAction={Plugin:function(action,isEnabled,host){host.registerService("fra-html-editor-preview","0.1",{click:function(html){if(!isEnabled)return Promise.reject("disabled");var promise=new Promise(function(resolve,reject){action(html,resolve,reject)});return promise},config:function(){return{isEnabled:isEnabled}}})},Preview:function(editorId,location,parameters,html,resolve,reject){if(html)parameters.editor.m_html=html;var event=D2L.LP.Web.UI.Desktop.MasterPages.Dialog.OpenWithParam(editorId, location,parameters,null);if(resolve)event.AddListener(function(){resolve("closed")});if(reject)event.AddReleaseListener(function(){reject("cancelled")})}}; D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-htmleditor-preview",function(node){var dialogBody=D2L.LP.Web.UI.Html.Dom.GetParentElementByClassName("d2l-dialog-body",node);var resizeFrame=function(){setTimeout(function(){var rect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(dialogBody);node.style.width="100%";node.style.height=rect.height-8+"px"},50)};D2L.LP.Web.UI.Events.OnResize.AddListener(resizeFrame)}); D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.SpellcheckAction={Apply:function(editorId,openFunction){openFunction.call(openFunction).AddListener(function(responseValue){return D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.SetSpellcheckText(editorId,responseValue)})},GetText:function(editorId){return D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.GetSpellcheckText(editorId)}};D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.SymbolAction={}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.SymbolAction.View={GetEntityFromString:function(charValue){var entityExp=/&#[^;]*;/g;var result=entityExp.exec(charValue);if(result==null||result[0].length<4)return"";return result[0]},GetSelectedSymbol:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.SymbolAction.View;var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var editId=new D2L.LP.Web.UI.Html.AbsoluteHtmlId(node.getAttribute("data-d2l-editId"));var charValue= D2L.LP.Web.UI.Common.Controls.Edit.GetValue(editId);return me.GetEntityFromString(charValue)},SetSelectedSymbol:function(id,charValue){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.SymbolAction.View;var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());me.SetSelectedSymbolByNode(node,charValue)},SetSelectedSymbolByNode:function(node,charValue){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.SymbolAction.View;if(node.d2l_selectedCharacter==charValue)return;charValue= me.GetEntityFromString(charValue);if(node.d2l_charNodes===undefined)node.d2l_charNodes=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-htmleditor-symbol-char",node);var htmlCodeNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementChild(D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-symbol-htmlcode",node));htmlCodeNode.innerHTML=" ";for(var i=0;i<node.d2l_charNodes.length;i++){var charNode=node.d2l_charNodes[i];if(charNode.d2l_isSelected){charNode.d2l_isSelected=false;D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-htmleditor-symbol-char-selected", charNode)}if(charNode.getAttribute("data-d2l-numcode")==charValue){charNode.d2l_isSelected=true;D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-htmleditor-symbol-char-selected",charNode);htmlCodeNode.innerHTML=charNode.getAttribute("data-d2l-htmlcode").replace("&","&")}}node.d2l_selectedCharacter=charValue;var symbolNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-symbol-symbol",node);if(charValue.length==0)D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-htmleditor-symbol-symbol-invalid", symbolNode);else D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-htmleditor-symbol-symbol-invalid",symbolNode);D2L.LP.Web.UI.Html.Dom.GetFirstElementChild(symbolNode).innerHTML=node.d2l_selectedCharacter}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableAction={Initialize:function(buttonId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableAction;return me.InitializeEditAction("d2l_edittable","edittable",buttonId)},InitializeCellProperties:function(buttonId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableAction;return me.InitializeEditAction("d2l_cellproperties","cellproperties",buttonId)},InitializeRowProperties:function(buttonId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableAction; return me.InitializeEditAction("d2l_rowproperties","rowproperties",buttonId)},InitializeDelete:function(buttonId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableAction;return me.InitializeEditAction("d2l_delete","delete",buttonId)},InitializeDeleteColumn:function(buttonId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableAction;return me.InitializeEditAction("d2l_deletecolumn","deletecolumn",buttonId)},InitializeDeleteRow:function(buttonId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableAction; return me.InitializeEditAction("d2l_deleterow","deleterow",buttonId)},InitializeInsertColumnAfter:function(buttonId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableAction;return me.InitializeEditAction("d2l_insertcolumnafter","insertcolumnafter",buttonId)},InitializeInsertColumnBefore:function(buttonId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableAction;return me.InitializeEditAction("d2l_insertcolumnbefore","insertcolumnbefore",buttonId)},InitializeCopyRow:function(buttonId){var me= D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableAction;return me.InitializeEditAction("d2l_copyrow","copyrow",buttonId)},InitializeCutRow:function(buttonId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableAction;return me.InitializeEditAction("d2l_cutrow","cutrow",buttonId)},InitializeInsertRowAfter:function(buttonId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableAction;return me.InitializeEditAction("d2l_insertrowafter","insertrowafter",buttonId)},InitializeInsertRowBefore:function(buttonId){var me= D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableAction;return me.InitializeEditAction("d2l_insertrowbefore","insertrowbefore",buttonId)},InitializeMergeCells:function(buttonId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableAction;return me.InitializeEditAction("d2l_mergecells","mergecells",buttonId)},InitializePasteRowAfter:function(buttonId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableAction;return me.InitializeEditAction("d2l_pasterowafter","pasterowafter", buttonId)},InitializePasteRowBefore:function(buttonId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableAction;return me.InitializeEditAction("d2l_pasterowbefore","pasterowbefore",buttonId)},InitializeSplitCells:function(buttonId){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableAction;return me.InitializeEditAction("d2l_splitcells","splitcells",buttonId)},InitializeEditAction:function(name,commandName,buttonId){var button=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.Button; var plugin=button.Initialize(name,commandName,buttonId,{enabledDelegate:function(args){if(!args||!args.element)return false;return $(args.element).closest("td,th").length>0}});return plugin},GetSelectedRowCount:function(id){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid;return table.GetSelectedRows(wysiwyg.GetTextAreaId(id)).length},GetSelectedColumnCount:function(id){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor; var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid;return Object.keys(table.GetSelectedColumns(wysiwyg.GetTextAreaId(id))).length},GetRowBackgroundColor:function(id){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid;var color=table.GetRowBackgroundColor(wysiwyg.GetTextAreaId(id));if(!color)return"";return color},GetRowHeight:function(id){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor; var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid;var height=table.GetRowHeight(wysiwyg.GetTextAreaId(id));if(height===undefined)return"";return height},GetRowType:function(id){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid;var rowType=table.GetRowType(wysiwyg.GetTextAreaId(id));if(rowType===undefined)return"body";return rowType},GetRowHorizontalAlign:function(id){var wysiwyg= D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid;var alignment=table.GetRowHorizontalAlign(wysiwyg.GetTextAreaId(id));if(alignment===undefined)return"none";return alignment},GetRowVerticalAlign:function(id){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid;var alignment=table.GetRowVerticalAlign(wysiwyg.GetTextAreaId(id)); if(alignment===undefined)return"none";return alignment},GetHeight:function(id){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid;var height=table.GetTableProperties(wysiwyg.GetTextAreaId(id)).height;if(height===undefined)return"";return height},GetWidth:function(id){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid; var width=table.GetTableProperties(wysiwyg.GetTextAreaId(id)).width;if(width===undefined)return"";return width},GetAlignment:function(id){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid;var alignment=table.GetTableProperties(wysiwyg.GetTextAreaId(id)).alignment;if(alignment===undefined)return"";return alignment},GetCellHeight:function(id){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor; var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid;var height=table.GetCellHeight(wysiwyg.GetTextAreaId(id));if(height===undefined)return"";return height},GetCellWidth:function(id){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid;var width=table.GetCellWidth(wysiwyg.GetTextAreaId(id));if(width===undefined)return"";return width},GetCellHorizontalAlign:function(id){var wysiwyg= D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid;var alignment=table.GetCellHorizontalAlign(wysiwyg.GetTextAreaId(id));if(alignment===undefined)return"";return alignment},GetCellVerticalAlign:function(id){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid;var alignment=table.GetCellVerticalAlign(wysiwyg.GetTextAreaId(id)); if(alignment===undefined)return"";return alignment},GetCellBackgroundColor:function(id){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid;var color=table.GetCellBackgroundColor(wysiwyg.GetTextAreaId(id));if(!color)return"";return color},GetCellBorderColor:function(id){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid; var color=table.GetCellBorderColor(wysiwyg.GetTextAreaId(id));if(!color)return"";return color},GetCellBorderWidth:function(id){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid;var width=table.GetCellBorderWidth(wysiwyg.GetTextAreaId(id));if(width===undefined)return"";return width},GetCellType:function(id){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid; var cellType=table.GetCellType(wysiwyg.GetTextAreaId(id));if(cellType===undefined)return"";return cellType},GetCellPadding:function(id){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid;var cellPadding=table.GetTableProperties(wysiwyg.GetTextAreaId(id)).cellPadding;if(cellPadding===undefined)return"";return cellPadding},GetCellSpacing:function(id){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor; var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid;var cellSpacing=table.GetTableProperties(wysiwyg.GetTextAreaId(id)).cellSpacing;if(cellSpacing===undefined)return"";return cellSpacing},GetIncludeCaption:function(id){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid;return table.GetTableProperties(wysiwyg.GetTextAreaId(id)).includeCaption},GetBackgroundColor:function(id){var wysiwyg= D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid;var color=table.GetTableProperties(wysiwyg.GetTextAreaId(id)).backgroundColor;if(!color)return"";return color},GetBorderColor:function(id){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid;var color=table.GetTableProperties(wysiwyg.GetTextAreaId(id)).borderColor; if(!color)return"";return color},GetBorderWidth:function(id){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid;var width=table.GetTableProperties(wysiwyg.GetTextAreaId(id)).borderWidth;if(width===undefined)return"";return width},HandleBorderColorChange:function(color,width,widthInitializer){if(color&&color.length>0&&(!width||width===0))widthInitializer.call(widthInitializer)},UpdateRowProperties:function(id, rowPropertiesProvider){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid;var textAreaId=wysiwyg.GetTextAreaId(id);rowPropertiesProvider.call(rowPropertiesProvider).AddListener(function(rowProperties){table.UpdateRowProperties(textAreaId,rowProperties)})},UpdateCellProperties:function(id,cellPropertiesProvider){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid; var textAreaId=wysiwyg.GetTextAreaId(id);cellPropertiesProvider.call(cellPropertiesProvider).AddListener(function(cellProperties){table.UpdateCellProperties(textAreaId,cellProperties)})},UpdateTableProperties:function(id,tablePropertiesProvider){var wysiwyg=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var table=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.TableGrid;var textAreaId=wysiwyg.GetTextAreaId(id);tablePropertiesProvider.call(tablePropertiesProvider).AddListener(function(tableProperties){table.UpdateTableProperties(textAreaId, tableProperties)})}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableAction.CellPropertiesView={GetCellData:function(id){var nodeId=id.GetValue();var getWidthValue=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getWidthValue");var widthValue=getWidthValue.call(getWidthValue);if(widthValue&&/^[0-9]+$/.test(widthValue))widthValue+="px";var getHeightValue=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getHeightValue");var heightValue=getHeightValue.call(getHeightValue);if(heightValue&&/^[0-9]+$/.test(heightValue))heightValue+="px"; var getHorizontalAlignValue=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getHorizontalAlignValue");var horizontalAlignValue=getHorizontalAlignValue.call(getHorizontalAlignValue);var getVerticalAlignValue=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getVerticalAlignValue");var verticalAlignValue=getVerticalAlignValue.call(getVerticalAlignValue);var getCellTypeValue=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getCellTypeValue");var cellTypeValue=getCellTypeValue.call(getCellTypeValue);var getBackgroundColorValue= D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getBackgroundColorValue");var backgroundColorValue=getBackgroundColorValue.call(getBackgroundColorValue);var getBorderColorValue=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getBorderColorValue");var borderColorValue=getBorderColorValue.call(getBorderColorValue);var getBorderWidthValue=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getBorderWidthValue");var borderWidthValue=getBorderWidthValue.call(getBorderWidthValue);if(borderWidthValue&&/^[0-9]+$/.test(borderWidthValue))borderWidthValue+= "px";return{width:widthValue,height:heightValue,horizontalAlign:horizontalAlignValue,verticalAlign:verticalAlignValue,cellType:cellTypeValue,backgroundColor:backgroundColorValue,borderColor:borderColorValue,borderWidth:borderWidthValue}}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableAction.RowPropertiesView={GetRowData:function(id){var nodeId=id.GetValue();var getHeightValue=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getHeightValue");var heightValue=getHeightValue.call(getHeightValue);if(heightValue&&/^[0-9]+$/.test(heightValue))heightValue+="px";var getRowTypeValue=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getRowTypeValue");var rowTypeValue=getRowTypeValue.call(getRowTypeValue);var getBackgroundColorValue=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId, "getBackgroundColorValue");var backgroundColorValue=getBackgroundColorValue.call(getBackgroundColorValue);var getHorizontalAlignValue=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getHorizontalAlignValue");var horizontalAlignValue=getHorizontalAlignValue.call(getHorizontalAlignValue);var getVerticalAlignValue=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getVerticalAlignValue");var verticalAlignValue=getVerticalAlignValue.call(getVerticalAlignValue);return{horizontalAlign:horizontalAlignValue,verticalAlign:verticalAlignValue, height:heightValue,rowType:rowTypeValue,backgroundColor:backgroundColorValue}}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableAction.TablePropertiesView={GetTableData:function(id){var nodeId=id.GetValue();var getWidthValue=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getWidthValue");var widthValue=getWidthValue.call(getWidthValue);if(widthValue&&/^[0-9]+$/.test(widthValue))widthValue+="px";var getHeightValue=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getHeightValue");var heightValue=getHeightValue.call(getHeightValue);if(heightValue&&/^[0-9]+$/.test(heightValue))heightValue+= "px";var getCellSpacingValue=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getCellSpacingValue");var cellSpacingValue=getCellSpacingValue.call(getCellSpacingValue);if(cellSpacingValue&&/^[0-9]+$/.test(cellSpacingValue))cellSpacingValue+="px";var getCellPaddingValue=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getCellPaddingValue");var cellPaddingValue=getCellPaddingValue.call(getCellPaddingValue);if(cellPaddingValue&&/^[0-9]+$/.test(cellPaddingValue))cellPaddingValue+="px";var getIncludeCaptionValue= D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getIncludeCaptionValue");var includeCaptionValue=getIncludeCaptionValue.call(getIncludeCaptionValue);var getAlignmentValue=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getAlignmentValue");var alignmentValue=getAlignmentValue.call(getAlignmentValue);var getBackgroundColorValue=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getBackgroundColorValue");var backgroundColorValue=getBackgroundColorValue.call(getBackgroundColorValue);var getBorderColorValue=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId, "getBorderColorValue");var borderColorValue=getBorderColorValue.call(getBorderColorValue);var getBorderWidthValue=D2L.LP.Web.UI.ObjectRepository.TryGet(nodeId,"getBorderWidthValue");var borderWidthValue=getBorderWidthValue.call(getBorderWidthValue);if(borderWidthValue&&/^[0-9]+$/.test(borderWidthValue))borderWidthValue+="px";return{backgroundColor:backgroundColorValue,borderColor:borderColorValue,borderWidth:borderWidthValue,includeCaption:includeCaptionValue,cellSpacing:cellSpacingValue,cellPadding:cellPaddingValue, width:widthValue,height:heightValue,alignment:alignmentValue}}}; D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-table-builder",function(node){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableSizeSelector;var $node=$(node);var $tableSizes=$node.find(".d2l-table-builder-size");me.SetActiveDataNode($tableSizes.get(0),true);var onSelectSizeFunction=D2L.LP.Web.UI.ObjectRepository.TryGet($node.attr("id"),"OnSelectSizeFunction");$tableSizes.on("mouseenter",function(e){me.SetActiveDataNode(e.target)}).on("click",function(e){if(onSelectSizeFunction===null)return; onSelectSizeFunction.call(onSelectSizeFunction)})}); D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableSizeSelector={FormatColsRowsText:function(text,rows,cols){return text.replace("{cols}",cols).replace("{rows}",rows)},HandleKeyPress:function(id,keyCode){if(keyCode<37||keyCode>40)return;var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableSizeSelector;var $builder=$(D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue()));var $activeColumn=$builder.find(".d2l-table-builder-size-active");var $activeRow=$activeColumn.parent();var $rows= $builder.children(".d2l-table-builder-row");if(keyCode===40){if($activeRow.index()+1===$rows.length)return;me.SetActiveDataNode($($rows.get($activeRow.index()+1)).children().get($activeColumn.index()))}else if(keyCode===39){if($activeColumn.index()+1===$activeRow.children().length)return;me.SetActiveDataNode($activeRow.children().get($activeColumn.index()+1))}else if(keyCode===37){if($activeColumn.index()===0)return;me.SetActiveDataNode($activeRow.children().get($activeColumn.index()-1))}else if(keyCode=== 38){if($activeRow.index()===0)return;me.SetActiveDataNode($($rows.get($activeRow.index()-1)).children().get($activeColumn.index()))}},OnShow:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableSizeSelector;var $builder=$(D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue()));var $colsByRows=$builder.find(".d2l-table-builder-cols-by-rows");D2L.LP.Web.UI.Html.Aria.LogMessage(me.FormatColsRowsText($colsByRows.attr("data-cols-by-rows-text"),1,1));me.SetActiveData(id,1,1)},SetActiveData:function(id, row,column){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableSizeSelector;var $builder=$(D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue()));me.SetActiveDataNode($($builder.find(".d2l-table-builder-row").get(row-1)).children().get(column-1))},SetActiveDataNode:function(node,skipAriaMsg){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.TableSizeSelector;var $node=$(node);var $builder=$node.closest(".d2l-table-builder");$builder.find(".d2l-table-builder-size-active").removeClass("d2l-table-builder-size-active"); $node.addClass("d2l-table-builder-size-included d2l-table-builder-size-active");if($node.data("row")===undefined)$node.data("row",$(node.parentNode).index());if($node.data("column")===undefined)$node.data("column",$(node).index());var $rows=$builder.children(".d2l-table-builder-row");$rows.each(function(rowIndex){var $row=$(this);$row.children().each(function(columnIndex){var $column=$(this);if($column!==$node&&$column.hasClass("d2l-table-builder-size-included"))$column.removeClass("d2l-table-builder-size-included"); if(rowIndex>$node.data("row")||columnIndex>$node.data("column"))$column.removeClass("d2l-table-builder-size-included");else $column.addClass("d2l-table-builder-size-included")})});var $colsByRows=$builder.find(".d2l-table-builder-cols-by-rows");var colsRowsText=me.FormatColsRowsText($colsByRows.attr("data-cols-by-rows-text"),$node.data("row")+1,$node.data("column")+1);$colsByRows.text(colsRowsText);if(!skipAriaMsg)D2L.LP.Web.UI.Html.Aria.LogMessage($colsByRows.text())},InsertTable:function(editorId, builderId){var $builder=$(D2L.LP.Web.UI.Html.Dom.GetElementById(builderId.GetValue()));var $activeData=$builder.find(".d2l-table-builder-size-active");var cols=$activeData.data("column")+1;var rows=$activeData.data("row")+1;if(cols===null||cols===undefined||rows===null||rows===undefined||cols<=0||rows<=0)return;var y,x,html;html="<table><tbody>";for(y=0;y<rows;y++){html+="<tr>";for(x=0;x<cols;x++)html+="<td><br></td>";html+="</tr>"}html+="</tbody></table>";D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Paste(editorId, html)}};D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.UndoRedo={InitializeUndo:function(buttonId){var button=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.Button;return button.Initialize("d2l_undo","undo",buttonId,{activatedDelegate:null,enabledDelegate:function(args){return args.hasUndo()}})},InitializeRedo:function(buttonId){var button=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.Button;return button.Initialize("d2l_redo","redo",buttonId,{activatedDelegate:null,enabledDelegate:function(args){return args.hasRedo()}})}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.FullPageScript={Initialize:function(){return"d2l_fullpage"}}; D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.ReplaceStringScript={Initialize:function(replace){var events={decodeReplaceStrings:function(obj){D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.ReplaceStringScript.DecodeReplaceStrings(obj)},encodeReplaceStrings:function(obj){D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.ReplaceStringScript.EncodeReplaceStrings(obj,replace)},onBeforeSetContent:function(obj){this.encodeReplaceStrings(obj)},onPostProcess:function(obj){if(obj.get){this.decodeReplaceStrings(obj); return}}};var plugin=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.InitializeScript("Script",{"name":"d2l_replacestring","onSetContent":function(obj){events.encodeReplaceStrings(obj)},"onGetContent":function(obj){events.decodeReplaceStrings(obj)}});return plugin},EncodeReplaceStrings:function(obj,replace){var plugin=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin;var html=obj.content;if(html!=null&&html.length>0){var func=function(match){var tempNode=document.createElement("div"); tempNode.innerHTML=match;var img=tempNode.firstChild;if(!img)return match;var src=img.getAttribute(plugin.Attributes.Data);if(!src)src=img.getAttribute("src");if(!src)return match;var originalSrc=src;for(var key in replace){var regEx=new RegExp("{"+key+"}","i");src=src.replace(regEx,replace[key])}if(src!==originalSrc){img.setAttribute("src",src);img.setAttribute("data-d2l-src",encodeURIComponent(originalSrc));if(img.getAttribute(plugin.Attributes.Data)!==null)img.setAttribute(plugin.Attributes.Src, src);var temp=tempNode.innerHTML;temp=temp.replace(/<\/iframe>/gi,"");return temp}else return match};html=html.replace(/<(img|iframe)[^>]*\ssrc[\s]*=[\s]*(\'([^\']*)\'|\"([^\"]*)\"|([^>^\s^\/]*))[^>]*>/gi,func);obj.content=html}},DecodeReplaceStrings:function(obj){var plugin=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin;var html=obj.content;if(html!=null&&html.length>0){var func=function(match){var tempNode=document.createElement("div");tempNode.innerHTML=match;var img=tempNode.firstChild; var d2l_src=img.getAttribute("data-d2l-src");if(d2l_src!=""){img.setAttribute("src",decodeURIComponent(d2l_src));img.removeAttribute("data-d2l-src");if(img.getAttribute(plugin.Attributes.Data)!=null)img.setAttribute(plugin.Attributes.Data,decodeURIComponent(d2l_src));var temp=tempNode.innerHTML;temp=temp.replace(/<\/iframe>/gi,"");return temp}else return match};html=html.replace(/<(img|iframe)[^>]*\sdata-d2l-src[\s]*=[\s]*(\'([^\']*)\'|\"([^\"]*)\"|([^>^\s^\/]*))[^>]*>/gi,func);obj.content=html.replace(/(%7B(orgId|orgName|orgUnitId|OrgUnitName|OrgUnitCode|OrgUnitPath|UserId|UserName|OrgDefinedId|FirstName|LastName|ExternalEmail|InternalEmail|RoleId)%7D)/gi, "{$2}")}}}; D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-navigation-immersive",function(node){var iterator=node.querySelector("d2l-navigation-iterator");if(iterator===null)return;if(iterator.hasAttribute("data-on-previous-click"))iterator.addEventListener("previous-click",function(){var onPreviousClick=iterator.getAttribute("data-on-previous-click");eval(onPreviousClick)});if(iterator.hasAttribute("data-on-next-click"))iterator.addEventListener("next-click",function(){var onNextClick=iterator.getAttribute("data-on-next-click");eval(onNextClick)})}); D2L.LP.Web.UI.Desktop.Controls.ImmersiveNav={SetHref:function(id,href){var node=document.getElementById(id.GetValue());if(!node)return;node.setAttribute("href",href.GetUrl())},SetText:function(id,text){var node=document.getElementById(id.GetValue());if(!node)return;node.setAttribute("text",text)},SetIsVisible:function(id,isVisible){var node=document.getElementById(id.GetValue());if(!node)return;var immersiveNavElem=D2L.LP.Web.UI.Html.Dom.GetParentElementByClassName("d2l-navigation-immersive",node); if(immersiveNavElem)D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(immersiveNavElem,isVisible)}}; D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-iterator",function(node){var anchors=node.getElementsByTagName("a");for(var i=0;i<anchors.length;i++)D2L.LP.Web.UI.Html.Dom.AddEventListener("click",anchors[i],function(index){return function(){var isDisabled=D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-iterator-button-disabled",anchors[index]);if(isDisabled)return;for(var j=0;j<anchors.length;j++)D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-iterator-button-selected",anchors[j]);D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-iterator-button-selected", anchors[index])}}(i))}); D2L.LP.Web.UI.Desktop.Controls.InlineHelp={m_popupLocation:null,Init:function(popupLocation){var me=D2L.LP.Web.UI.Desktop.Controls.InlineHelp;me.m_popupLocation=popupLocation},SetText:function(id,text){var idVal=id.GetValue();var node=D2L.LP.Web.UI.Html.Dom.GetElementById(idVal);if(node===null)throw"InlineHelp not found: '"+idVal+"'.";node.innerHTML=text},PopupHelp:function(titleTerm,descriptionTerm){var me=D2L.LP.Web.UI.Desktop.Controls.InlineHelp;var loc=me.m_popupLocation;loc=loc.WithQueryString("titleTerm", titleTerm);loc=loc.WithQueryString("descriptionTerm",descriptionTerm);var name=titleTerm.toLowerCase().replace(".","_").replace("\\","_");D2L.LP.Web.UI.Html.Dom.OpenWindow("popupHelp_"+name,loc,600,400,false,false)}}; D2L.LP.Web.UI.Desktop.Controls.LoadMorePager={Pagers:[],Init:function(id,controlProvider,pageableControlId,showFunction,hideFunction,setLoadingTextFunction,setNormalTextFunction){var pager=D2L.LP.Web.UI.Html.Dom.GetElementById(id);if(pager===null)return;var me=D2L.LP.Web.UI.Desktop.Controls.LoadMorePager;var pageableControl=controlProvider.call(controlProvider);var info={ControlProvider:controlProvider,IsLoading:false,SetLoadingFunction:setLoadingTextFunction,PageableControl:pageableControl,PageableControlId:pageableControlId}; me.Pagers[id]=info;var setIsVisible=function(isVisible){if(isVisible)showFunction();else hideFunction()};var onLoadCompleteFunction=function(hasMoreItems){setIsVisible(hasMoreItems)};pageableControl.GetOnLoadCompletedEvent(pageableControlId).AddListener(onLoadCompleteFunction);var onLoadMoreCompleteFunction=function(hasMoreItems){me.Pagers[id].IsLoading=false;setNormalTextFunction();setIsVisible(hasMoreItems)};pageableControl.GetOnLoadMoreCompletedEvent(pageableControlId).AddListener(onLoadMoreCompleteFunction); pager.d2l_onLoadCompleteHandle=onLoadCompleteFunction;pager.d2l_onLoadMoreHandle=onLoadMoreCompleteFunction;pager.d2l_pageableControl=pageableControl;pager.d2l_pageableControlId=pageableControlId;setIsVisible(pageableControl.GetHasMoreItems(pageableControlId))},LoadMore:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.LoadMorePager;var info=me.Pagers[id];if(info===undefined||info.IsLoading)return;info.IsLoading=true;setTimeout(function(){if(info.IsLoading)info.SetLoadingFunction()},1E3);info.PageableControl.LoadMore(info.PageableControlId)}}; D2L.LP.Web.UI.Desktop.Controls.MenuFlyout=D2L.LP.Web.UI.Desktop.Controls.MenuFlyout||{};D2L.LP.Web.UI.Desktop.Controls.MenuFlyout.GetContentsKeyPressed=function(contentsId){var contentsNode=D2L.LP.Web.UI.Html.Dom.GetElementById(contentsId.GetValue());return contentsNode.d2l_lastKeyPressed}; D2L.LP.Web.UI.Desktop.Controls.MenuFlyout.Init=function(menuNode,contentsNode,openFunction,openFirstFunction,closeFunction){var contentsNodeId=contentsNode.getAttribute("id");if(contentsNodeId!==undefined){D2L.LP.Web.UI.Html.Dom.AddKeyDownEventListener(contentsNode,function(e){var keyCode=e.GetKey();if(keyCode>36&&keyCode<41)D2L.LP.Web.UI.Html.Dom.CancelEventDefaultBehaviour(e.GetEventObject())});D2L.LP.Web.UI.Html.Dom.AddKeyPressEventListener(contentsNode,function(e){var keyCode=e.GetKey();if(keyCode=== D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.Enter){var contentEnterFunction=D2L.LP.Web.UI.ObjectRepository.TryGet(contentsNodeId,"Flyout.OnEnterFunction");if(contentEnterFunction!==null)contentEnterFunction.call(contentEnterFunction)}var contentKeyPressFunction=D2L.LP.Web.UI.ObjectRepository.TryGet(contentsNodeId,"Flyout.OnKeyPressFunction");if(contentKeyPressFunction!==null){contentsNode.d2l_lastKeyPressed=e.GetKey();contentKeyPressFunction.call(contentKeyPressFunction)}})}if(closeFunction)contentsNode.addEventListener("d2l-dropdown-close", function(){closeFunction.call(closeFunction)});var loadFunction=function(){if(!contentsNode.opened)return;D2L.LP.Web.UI.Desktop.Controls.MenuFlyout.UpdatePosition(contentsNode,menuNode);if(openFunction)openFunction.call(openFunction)};var opener=D2L.LP.Web.UI.Html.Dom.GetElementById(menuNode.getAttribute("data-openerId"));opener.addEventListener("click",loadFunction);var loadFirstFunction=function(e){var keypress=e.type==="keypress"?true:false;if(keypress&&e.which!==13&&e.which!==32)return;opener.removeEventListener("mouseup", loadFirstFunction);opener.removeEventListener("keypress",loadFirstFunction);if(D2L.LP.Web.UI.Html.Dom.HasAttribute(menuNode,"data-has-upper-boundary"))contentsNode.setAttribute("boundary",JSON.stringify({"above":0}));var hasLoading=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-loading",contentsNode).length>0;var timeout=hasLoading?501:0;setTimeout(function(){contentsNode.close();contentsNode.open(keypress)},timeout);if(openFirstFunction)openFirstFunction.call(openFirstFunction)};opener.addEventListener("mouseup", loadFirstFunction);opener.addEventListener("keypress",loadFirstFunction)}; D2L.LP.Web.UI.Desktop.Controls.MenuFlyout.InitContextMenu=function(menuNode,openFunction,openFirstFunction,closeFunction){var loadFunction=function(){if(openFunction)openFunction.call(openFunction)};var opener=D2L.LP.Web.UI.Html.Dom.GetElementById(menuNode.getAttribute("data-openerId"));var loadFirstFunction=function(e){var keypress=e.type==="keypress"?true:false;if(keypress&&e.which!==13&&e.which!==32)return;opener.removeEventListener("mouseup",loadFirstFunction);opener.removeEventListener("keypress", loadFirstFunction);var contextMenuId=menuNode.getAttribute("data-contextMenuId");if(openFirstFunction)openFirstFunction.call(openFirstFunction);var contextMenuIdAbs=D2L.LP.Web.UI.Html.AbsoluteHtmlId.Create(contextMenuId);var openerId=D2L.LP.Web.UI.Html.AbsoluteHtmlId.Create(menuNode.id);D2L.LP.Web.UI.Desktop.Controls.ContextMenu.CreateDropdownMenu(menuNode,contextMenuIdAbs,openerId,null,keypress);setTimeout(function(){var templateContent=D2L.LP.Web.UI.Html.Dom.GetElementById(contextMenuId);var contentId= templateContent.getAttribute("data-dropdownContentId");contentsNode=D2L.LP.Web.UI.Html.Dom.GetElementById(contentId);if(closeFunction)contentsNode.addEventListener("d2l-dropdown-close",function(){closeFunction.call(closeFunction)});opener.addEventListener("click",loadFunction);loadFunction()})};opener.addEventListener("mouseup",loadFirstFunction);opener.addEventListener("keypress",loadFirstFunction)}; D2L.LP.Web.UI.Desktop.Controls.MenuFlyout.UpdatePosition=function(contentsNode,menuNode){var isRTL=D2L.LP.Globalization.Locale.GetTextFormatDescriptor().TextDirection==D2L.LP.Globalization.Formatting.Text.TextDirection.RightToLeft;var parent=D2L.LP.Web.UI.Html.Dom.GetParentElementByClassName("d2l-max-width",contentsNode)||document.body;var parentRect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(parent);var flyoutRect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(menuNode);var contentId=contentsNode.getAttribute("data-contentId"); var content=D2L.LP.Web.UI.Html.Dom.GetElementById(contentId);if(!D2L.LP.Web.UI.Html.Dom.HasAttribute(contentsNode,"data-has-min-width"))content.style.minWidth=flyoutRect.width+"px";var contentsRect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(content);var left=Math.max(flyoutRect.right-parentRect.left,0);var right=Math.max(parentRect.right-flyoutRect.left,0);var rightOverflow;if(isRTL)rightOverflow=left-contentsRect.width;else rightOverflow=right-contentsRect.width;var currentAlign=contentsNode.getAttribute("align"); if(rightOverflow>0){if(currentAlign!=="start"){contentsNode.setAttribute("align","start");contentsNode.close();contentsNode.open()}}else if((isRTL?right:left)-contentsRect.width>0)if(currentAlign!=="end"){contentsNode.setAttribute("align","end");contentsNode.close();contentsNode.open()}};D2L.LP.Web.UI.Desktop.Controls.MenuFlyout.Close=function(id){var flyout=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(!flyout)return;var content=flyout.getElementsByTagName("d2l-dropdown-content")[0];content.close()}; D2L.LP.Web.UI.Desktop.Controls.MenuFlyout.FocusOnOpener=function(id){setTimeout(function(){var flyout=id.$();if(flyout.length===0)return;var openerAnchor=$(".d2l-menuflyout-opener",flyout);D2L.LP.Web.UI.Html.Dom.FocusNode(openerAnchor)},250)};D2L.LP.Web.UI.Desktop.Controls.MenuFlyout.IsOpen=function(id){var flyout=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(!flyout)return;return D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-menuflyout-open",flyout)}; D2L.LP.Web.UI.Desktop.Controls.MenuFlyout.SetTitle=function(id,val){var flyout=id.$();if(flyout.length===0)return;var openerAnchor=$(".d2l-menuflyout-opener",flyout);openerAnchor.prop("title",val);$(".d2l-menuflyout-text",openerAnchor).text(val)}; D2L.LP.Web.UI.Common.Controls.MessageArea={IsVisible:false,PlaceholderId:null,ErrorLocation:null,Apply:function(delegate){var ma=D2L.LP.Web.UI.Html.Dom.GetElementById(D2L.LP.Web.UI.Common.Controls.MessageArea.PlaceholderId);if(ma!==null)delegate.call(delegate,ma)},CreateBalloon:function(inputId,message){var balloon=document.createElement("div");balloon.id="balloon_"+inputId;balloon.className="d2l-form-balloon vui-validation-bubble vui-validation-bubble-show";var balloonChildren=document.createElement("div"); balloonChildren.className="d2l-form-balloon-children vui-validation-bubble-content";var balloonTextSpan=document.createElement("span");balloonTextSpan.className="d2l-form-balloon-text";balloonTextSpan.appendChild(document.createTextNode(message));if(!D2L.LP.Web.UI.Daylight.IsEnabled()){var borderNode=document.createElement("div");borderNode.className="d2l-form-balloon-border";balloonChildren.appendChild(borderNode);var tipNode=document.createElement("div");tipNode.className="d2l-form-balloon-tip"; balloonChildren.appendChild(tipNode)}balloonChildren.appendChild(balloonTextSpan);balloon.appendChild(balloonChildren);return balloon},Init:function(placeholderId,errorLocation){var me=D2L.LP.Web.UI.Common.Controls.MessageArea;me.PlaceholderId=placeholderId;me.ErrorLocation=errorLocation},Reset:function(balloonContainer){D2L.LP.Web.UI.Common.Controls.MessageArea.SetIsVisible(false);var balloons=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-form-balloon",balloonContainer);for(var i=0;i<balloons.length;i++){if(balloons[i].d2l_input!== undefined){D2L.LP.Web.UI.Html.Aria.SetAttribute(balloons[i].d2l_input,"labelledby","");D2L.LP.Web.UI.Html.Aria.RemoveAttribute(balloons[i].d2l_input,"invalid");balloons[i].d2l_input.style.marginBottom=balloons[i].d2l_input_original_bottom_margin;balloons[i].d2l_input=null}balloons[i].parentNode.removeChild(balloons[i])}},RpcReceivePayloadProvider:function(data){var me=D2L.LP.Web.UI.Common.Controls.MessageArea;var count=0;var updateVisibility=function(){count++;if(data.Items.length===0||count===data.Items.length)me.Apply(function(node){node.innerHTML= data.Html;D2L.LP.Web.UI.Events.OnViewRender.Trigger(node);me.SetIsVisible(true);D2L.LP.Web.UI.Html.Dom.FocusNode(node)})};if(data.Items.length===0)updateVisibility();for(var i=0;i<data.Items.length;i++)(function(index){var inputId=data.Items[index].Key;var input=D2L.LP.Web.UI.Html.Dom.GetElementById(inputId);if(input===null){updateVisibility();return}var balloon=me.CreateBalloon(inputId,data.Items[i].Message);balloon.d2l_input=input;D2L.LP.Web.UI.Html.Aria.SetAttribute(input,"invalid","true");var balloonChildrenNode= balloon.firstChild;D2L.LP.Web.UI.Html.Dom.InsertElementAfter(balloon,input);D2L.LP.Web.UI.Html.Aria.SetAttribute(input,"labelledby",balloon.id);setTimeout(function(){var bottomMargin=D2L.LP.Web.UI.Html.Css.GetStyle(input,"margin-bottom");if(bottomMargin===undefined){bottomMargin=D2L.LP.Web.UI.Html.Css.GetStyle(input,"marginBottom");if(bottomMargin===undefined)bottomMargin="0px"}balloon.d2l_input_original_bottom_margin=bottomMargin;input.style.marginBottom=balloonChildrenNode.offsetHeight+10+"px"; balloon.style.marginTop=-balloonChildrenNode.offsetHeight+"px";balloon.style.height=balloonChildrenNode.offsetHeight+"px";updateVisibility()},0)})(i)},SetIsVisible:function(isVisible){D2L.LP.Web.UI.Common.Controls.MessageArea.Apply(function(ma){var me=D2L.LP.Web.UI.Common.Controls.MessageArea;if(me.IsVisible==isVisible)return;ma.style.display=isVisible?"block":"none";me.IsVisible=isVisible;D2L.LP.Web.UI.Events.OnContentHeightChange.Trigger()})},ShowErrors:function(errors){D2L.LP.Web.UI.Rpc.Connect(D2L.LP.Web.UI.Rpc.Verbs.POST, D2L.LP.Web.UI.Common.Controls.MessageArea.ErrorLocation,{errors:errors})}};D2L.LP.Web.UI.Desktop.Controls.SearchSimple=D2L.LP.Web.UI.Desktop.Controls.SearchSimple||{};D2L.LP.Web.UI.Desktop.Controls.SearchSimple.Clear=function(id){var elem=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());elem.value="";elem.search()};D2L.LP.Web.UI.Desktop.Controls.SearchSimple.Focus=function(id){var elem=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(elem)elem.focus()}; D2L.LP.Web.UI.Desktop.Controls.SearchSimple.GetValue=function(id,defaultValue){var elem=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(elem===null)return defaultValue;return elem.lastSearchValue};D2L.LP.Web.UI.Desktop.Controls.SearchSimple.GetInputValue=function(id){var elem=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());return elem.value}; D2L.LP.Web.UI.Desktop.Controls.SearchSimple.IsSearched=function(id){var elem=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());return elem.lastSearchValue.length>0};D2L.LP.Web.UI.Desktop.Controls.SearchSimple.Search=function(id){var elem=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());elem.search()};D2L.LP.Web.UI.Desktop.Controls.SearchSimple.SetValue=function(id,value){var elem=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());elem.value=value}; D2L.LP.Web.UI.Desktop.Controls.SearchSimple.InitWc=function(node){var search=node.querySelector("d2l-input-search");search.addEventListener("d2l-input-search-searched",function(e){if(e.detail.value.length===0){if(node.hasAttribute("data-on-clear")){var onClear=node.getAttribute("data-on-clear");eval(onClear)}}else if(node.hasAttribute("data-on-search")){var onSearch=node.getAttribute("data-on-search");eval(onSearch)}});search.addEventListener("input",function(){if(!node.hasAttribute("data-on-keypress")|| search.value.length<1)return;var onKeyPress=node.getAttribute("data-on-keypress");eval(onKeyPress)})}; D2L.LP.Web.UI.Desktop.Controls.Shim={m_shim:null,m_zIndex:1E3,Delete:function(handle){if(!handle)return;var ui=handle.rootWin?handle.rootWin.D2L.LP.Web.UI:D2L.LP.Web.UI;var me=ui.Desktop.Controls.Shim;var resetRoles=function(nodes){for(var i=0;i<nodes.length;i++){var node=nodes[i];if(node.setAttribute===undefined)continue;if(node.d2l_role===""){node.removeAttribute("role");node.d2l_role=undefined}else{D2L.LP.Web.UI.Html.Aria.SetRole(node,node.d2l_role);node.d2l_role=undefined}}};var resetAria=function(nodes){for(var i= 0;i<nodes.length;i++){var node=nodes[i];if(node.setAttribute===undefined)continue;if(node.d2l_aria_hidden===""){node.removeAttribute("aria-hidden");node.d2l_aria_hidden=undefined}else{D2L.LP.Web.UI.Html.Dom.SetAttribute(node,"aria-hidden",node.d2l_aria_hidden);node.d2l_aria_hidden=undefined}}};var shimInfo=handle.infos[handle.infos.length-1];resetRoles(shimInfo.hiddenNodes);resetAria(shimInfo.hiddenAriaNodes);var me=handle.rootWin.D2L.LP.Web.UI.Desktop.Controls.Shim;if(handle.infos.length>1){handle.infos.pop(); me.m_shim.shim.style.zIndex=handle.infos[handle.infos.length-1].zIndex;return}me.RemoveShim(handle);me.m_shim=null},GetZIndex:function(){D2L.LP.Web.UI.Desktop.Controls.Shim.m_zIndex++;return D2L.LP.Web.UI.Desktop.Controls.Shim.m_zIndex},AddShim:function(handle,w,node,isTransparent){var me=handle.rootWin.D2L.LP.Web.UI.Desktop.Controls.Shim;var shim=document.createElement("div");shim.className="d2l-shim";shim.style.zIndex=handle.infos[handle.infos.length-1].zIndex;handle.shim=shim;if(!isTransparent){shim.classList.add("d2l-shim-opaque"); document.body.classList.add("d2l-shim-body-overflow")}handle.rootWin.document.body.appendChild(shim)},RemoveShim:function(handle){var shim=handle.rootWin.D2L.LP.Web.UI.Desktop.Controls.Shim.m_shim.shim;if(shim.classList.contains("d2l-shim-opaque")){var removeNode=function(){shim.removeEventListener("transitionend",removeNode,false);D2L.LP.Web.UI.Html.Dom.RemoveElement(shim)};shim.addEventListener("transitionend",removeNode,false);shim.classList.remove("d2l-shim-opaque");document.body.classList.remove("d2l-shim-body-overflow"); setTimeout(function(){removeNode()},300)}else D2L.LP.Web.UI.Html.Dom.RemoveElement(shim)},HideAccessibleElements:function(handle){var shimInfo=handle.infos[handle.infos.length-1];var recurse=function(node){if(node==handle.dialog||node==shimInfo.node||node.setAttribute===undefined||node.nodeName===undefined||node.nodeName.toLowerCase()==="iframe")return;var oldRole=node.getAttribute("role");if(node.d2l_role===undefined){shimInfo.hiddenNodes.push(node);if(oldRole!=null)node.d2l_role=oldRole;else node.d2l_role= ""}D2L.LP.Web.UI.Html.Aria.SetRole(node,"presentation");if(node.nodeName==="FORM"||node.nodeName==="A"){var oldHidden=node.getAttribute("aria-hidden");if(node.d2l_aria_hidden===undefined){shimInfo.hiddenAriaNodes.push(node);if(oldHidden!=null)node.d2l_aria_hidden=oldHidden;else node.d2l_aria_hidden=""}D2L.LP.Web.UI.Html.Dom.SetAttribute(node,"aria-hidden","true")}for(var i=0;i<node.childNodes.length;i++)recurse(node.childNodes[i])};recurse(handle.rootWin.document.body)},Create:function(node,isTransparent){var rootWindow= null;var currWin=window;if(node.d2l_handle&&node.d2l_handle.rootWin)rootWindow=node.d2l_handle.rootWin;else while(currWin!==null&&currWin.D2L&&currWin.D2L.LP){if(currWin==rootWindow)break;rootWindow=currWin;try{var throwsIfXDomain=currWin.parent.D2L;currWin=currWin.parent}catch(xdomainErr){}}var me=rootWindow.D2L.LP.Web.UI.Desktop.Controls.Shim;var shimInfo={node:node,zIndex:me.GetZIndex(),hiddenNodes:[],hiddenAriaNodes:[]};if(me.m_shim===null){var handle={shim:null,onresize:null,node:node,infos:[shimInfo], win:window,rootWin:rootWindow};me.AddShim(handle,window,window.document,isTransparent);me.m_shim=handle}else{me.m_shim.infos.push(shimInfo);me.m_shim.shim.style.zIndex=shimInfo.zIndex}me.HideAccessibleElements(me.m_shim);node.style.zIndex=me.GetZIndex();return me.m_shim}}; D2L.LP.Web.UI.Desktop.Controls.Toggle={GetNodes:function(id){var node=document.getElementById(id.GetValue());return{node:node,activeNode:document.getElementById(node.getAttribute("data-active-id")),inactiveNode:document.getElementById(node.getAttribute("data-inactive-id"))}},SetIsActiveFunction:function(id,setActive){var nodes=D2L.LP.Web.UI.Desktop.Controls.Toggle.GetNodes(id);D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(nodes.activeNode,setActive);D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(nodes.inactiveNode, !setActive)},GetIsActiveFunction:function(id){var nodes=D2L.LP.Web.UI.Desktop.Controls.Toggle.GetNodes(id);var isActive=!D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-hidden",nodes.activeNode);return isActive},Focus:function(id){var nodes=D2L.LP.Web.UI.Desktop.Controls.Toggle.GetNodes(id);var isActive=D2L.LP.Web.UI.Desktop.Controls.Toggle.GetIsActiveFunction(id);D2L.LP.Web.UI.Html.Dom.FocusNode(isActive?nodes.activeNode:nodes.inactiveNode)},ToggleFunction:function(id){var me=D2L.LP.Web.UI.Desktop.Controls.Toggle; var isActive=me.GetIsActiveFunction(id);me.SetIsActiveFunction(id,!isActive)}}; D2L.LP.Web.UI.Desktop.Controls.UpDownVoteInput={GetValue:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var inputs=node.getElementsByTagName("input");var value="none";var originalValue="none";for(var i=0;i<inputs.length;i++)if(D2L.LP.Web.UI.Html.Dom.GetAttribute(inputs[i],"type")=="radio"&&inputs[i].checked)value=inputs[i].value;else if(D2L.LP.Web.UI.Html.Dom.GetAttribute(inputs[i],"type")=="hidden")originalValue=inputs[i].value;var param=new D2L.LP.Web.UI.Desktop.Controls.UpDownVoteInput.Param(value, originalValue);return param},InitHandle:function(node){var handle={node:node,labels:[],noneInput:null,votesNode:null,currentMessageNode:null,upMessageNode:null,downMessageNode:null,noneMessageNode:null,showToolTip:true,upVotes:0,downVotes:0};handle.labels=node.getElementsByTagName("label");var noneLabel=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-updownvote-none",node)[0];handle.noneInput=noneLabel.getElementsByTagName("input")[0];handle.votesNode=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-updownvote-votes", node)[0];handle.showToolTip=D2L.LP.Web.UI.Html.Dom.HasAttribute(handle.votesNode,"title");var messages=handle.votesNode.getElementsByTagName("span");for(var i=0;i<messages.length;i++)if(!D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-hidden",messages[i])){handle.currentMessageNode=messages[i];break}handle.upMessageNode=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-updownvote-msg-up",handle.votesNode)[0];handle.downMessageNode=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-updownvote-msg-down", handle.votesNode)[0];handle.noneMessageNode=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-updownvote-msg-none",handle.votesNode)[0];handle.upVotes=D2L.LP.Web.UI.Html.Dom.GetAttribute(node,"data-d2l-upvotes");handle.downVotes=D2L.LP.Web.UI.Html.Dom.GetAttribute(node,"data-d2l-downvotes");return handle},SetMessage:function(handle,messageNode){D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-hidden",handle.currentMessageNode);D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-hidden",messageNode);if(handle.showToolTip){var title= D2L.LP.Web.UI.Html.Dom.GetAttribute(messageNode,"data-d2l-title");D2L.LP.Web.UI.Html.Dom.SetAttribute(handle.votesNode,"title",title)}handle.currentMessageNode=messageNode},SetSelected:function(handle,index,clickLabel){var me=D2L.LP.Web.UI.Desktop.Controls.UpDownVoteInput;var label=handle.labels[index];var input=label.getElementsByTagName("input")[0];if(clickLabel)if(input.checked)handle.noneInput.checked=true;else input.checked=true;if(D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-updownvote-active", label)){D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-updownvote-active",label);if(index==0)handle.upVotes--;else if(index==1)handle.downVotes--;me.SetMessage(handle,handle.noneMessageNode)}else{var selectedNode=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-updownvote-active",handle.node)[0];D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-updownvote-active",selectedNode);D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-updownvote-active",label);if(index==0){handle.upVotes++;me.SetMessage(handle,handle.upMessageNode)}else if(index== 1){handle.downVotes++;me.SetMessage(handle,handle.downMessageNode)}}var onChange=D2L.LP.Web.UI.ObjectRepository.TryGet(handle.node.id);if(onChange!==null)onChange()}}; D2L.LP.Web.UI.Desktop.Controls.UpDownVoteInput.Param=D2L.Class.Create({Construct:function(value,originalValue){if(value===undefined){value="";originalValue=""}this.m_value=value;this.m_originalValue=originalValue},_serialize:function(serializer){serializer.AddMember("value",this.m_value);serializer.AddMember("originalValue",this.m_originalValue)},GetValue:function(){return this.m_value},GetOriginalValue:function(){return this.m_originalValue}}); D2L.LP.QuickLinks={Web:{Desktop:{Controls:{},Dialog:{},HtmlEditor:{},AddLinkButton:{}}}}; D2L.LP.QuickLinks.Web.Desktop.HtmlEditor.QuickLinksDialogComponent={Plugin:function(action,isEnabled,host){host.registerService("fra-html-editor-link","0.1",{click:function(quickLinkData){if(!isEnabled)return Promise.reject("disabled");var promise=new Promise(function(resolve,reject){var locationOverrides={selectedText:quickLinkData.selectedText};if(quickLinkData.itemData)locationOverrides.itemData=new D2L.LP.QuickLinks.Web.Desktop.Controls.QuickLinkSelector.ItemData("",null,quickLinkData.itemData.href, quickLinkData.itemData.title,quickLinkData.itemData.properties,quickLinkData.itemData.outputFormat,quickLinkData.itemData.urlShowTarget,quickLinkData.itemData.urlShowCancelButtonInline);action(locationOverrides,resolve,reject)});return promise},config:function(){return{isEnabled:isEnabled}}})},GetQuickLinkItems:function(editorId){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(editorId.GetValue());if(node.d2l_quicklinks!==undefined)return node.d2l_quicklinks;return[]},GetQuickLinkData:function(editorId){var node= D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.GetSelectedNode(editorId);if(node==null||node.nodeName!="A")return null;var href=node.getAttribute("href");var title=D2L.LP.Web.UI.Html.Dom.GetTextContent(node);var target=node.getAttribute("target");if(target=="_top")target="WholeWindow";else if(target=="_blank")target="NewWindow";else target="SameFrame";var properties=[];properties.push({name:"target",value:target});return new D2L.LP.QuickLinks.Web.Desktop.Controls.QuickLinkSelector.ItemData("",null,href, title,properties,"html")},GetQuickLinkSelectedText:function(editorId){var text;var selectedNode=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.GetSelectedNode(editorId);if(selectedNode&&selectedNode.nodeName==="A")text=D2L.LP.Web.UI.Html.Dom.GetTextContent(selectedNode);else text=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.GetSelectionContent(editorId);if(text===undefined||text===null)text="";return text},Insert:function(editorId,openerId,dialogUrl,quicklinksProvider,selectionProvider,locationOverrides, resolve,reject){if(locationOverrides){dialogUrl.RemoveQueryString("selectedText");dialogUrl.RemoveQueryString("itemData");dialogUrl=dialogUrl.WithQueryString("selectedText",locationOverrides.selectedText);dialogUrl=dialogUrl.WithQueryString("itemData",locationOverrides.itemData)}function opener(){return D2L.LP.Web.UI.Desktop.MasterPages.Dialog.Open(openerId,dialogUrl)}D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.PasteDelayed(editorId,opener,selectionProvider,function(quicklinkItems){var evt=new D2L.LP.Web.UI.Events.Event; var node=D2L.LP.Web.UI.Html.Dom.GetElementById(editorId.GetValue());node.d2l_quicklinks=quicklinkItems;quicklinksProvider.call(quicklinksProvider).AddListener(function(quicklinks){if(quicklinks==null||quicklinks.length==0){evt.Trigger("");return}var quicklinksHtml="";for(var i=0;i<quicklinks.length;i++)quicklinksHtml+=quicklinks[i].html;evt.Trigger(quicklinksHtml)});return evt},resolve,reject)},SelectLink:function(editorId){var htmlEditor=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var selectedNode= htmlEditor.GetSelectedNode(editorId);if(selectedNode==null)return;if(selectedNode.nodeName=="A")htmlEditor.SelectNode(editorId,selectedNode)}}; D2L.LP.QuickLinks.Web.Desktop.Controls.QuickLinkSelector={ClearSelection:function(id){var controlId=id.GetValue();var node=D2L.LP.Web.UI.Html.Dom.GetElementById(controlId);node.d2l_selectedItems=[];var onSelectionChanged=D2L.LP.Web.UI.ObjectRepository.TryGet(controlId,"onSelectionChanged");if(onSelectionChanged!=null)onSelectionChanged.call(onSelectionChanged)},GetOutputFormat:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var outputFormat=node.getAttribute("data-d2l-outputformat"); if(outputFormat===undefined||outputFormat===null)return"";else return outputFormat},GetSelectedItem:function(id){var me=D2L.LP.QuickLinks.Web.Desktop.Controls.QuickLinkSelector;var items=me.GetSelectedItems(id);if(items.length==0)return null;return items[items.length-1]},GetSelectedItems:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(node.d2l_selectedItems!=null)return node.d2l_selectedItems;return[]},OnSelectItem:function(id,typeKey,itemId,itemTitle,itemProperties){if(itemId== null)return;if(itemTitle==null)itemTitle="";var me=D2L.LP.QuickLinks.Web.Desktop.Controls.QuickLinkSelector;me.OnSelectItemHelper(id,new me.ItemData(typeKey,itemId,null,itemTitle,itemProperties,me.GetOutputFormat(id)))},OnSelectPublicItem:function(id,typeKey,itemUrl,itemTitle,itemProperties){if(itemUrl==null)return;if(itemTitle==null)itemTitle="";var me=D2L.LP.QuickLinks.Web.Desktop.Controls.QuickLinkSelector;me.OnSelectItemHelper(id,new me.ItemData(typeKey,null,itemUrl,itemTitle,itemProperties,me.GetOutputFormat(id)))}, OnSelectItemHelper:function(id,item){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(node.d2l_selectedItems===undefined)node.d2l_selectedItems=[];node.d2l_selectedItems.push(item);var onSelect=D2L.LP.Web.UI.ObjectRepository.TryGet(id.GetValue(),"onSelect");if(onSelect!=null)onSelect.call(onSelect);var onSelectionChanged=D2L.LP.Web.UI.ObjectRepository.TryGet(id.GetValue(),"onSelectionChanged");if(onSelectionChanged!=null)onSelectionChanged.call(onSelectionChanged)},TriggerOnManage:function(id){setTimeout(function(){var onManage= D2L.LP.Web.UI.ObjectRepository.TryGet(id.GetValue(),"onManage");if(onManage!=null)onManage.call(onManage)},0)},SetDialogButtonVisibility:function(show){var dialogButtons=document.getElementsByClassName("d2l-dialog-buttons")[0];if(dialogButtons)if(!show)dialogButtons.style.display="none";else dialogButtons.style.display="block"}}; D2L.LP.QuickLinks.Web.Desktop.Controls.QuickLinkSelector.ItemData=D2L.Class.Create({Construct:function(typeKey,id,url,title,properties,outputFormat){this.m_typeKey=typeKey;if(id==null)id="";this.m_id=id;if(url==null)url="";this.m_url=url;this.m_title=title;if(properties==null)properties=[];this.m_properties=properties;if(outputFormat==null)outputFormat="";this.m_outputFormat=outputFormat},_serialize:function(serializer){serializer.AddMember("typeKey",this.m_typeKey);serializer.AddMember("id",this.m_id); serializer.AddMember("url",this.m_url);serializer.AddMember("title",this.m_title);serializer.AddMember("outputFormat",this.m_outputFormat);var properties=this.m_properties;for(var i=0;i<properties.length;i++)serializer.AddMember(properties[i].name,properties[i].value)}});D2L.LP.Web.UI.Events.OnClick=new D2L.LP.Web.UI.Events.Event; D2L.LP.Web.UI.Events.OnContentHeightChange=new D2L.LP.Web.UI.Events.Event(function(){var body=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-dialog-body");if(body===null)body=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-body");var height=Math.max(body.scrollHeight,body.offsetHeight);return[height]});D2L.LP.Web.UI.Events.OnFraUserEvent=new D2L.LP.Web.UI.Events.Event;D2L.LP.Web.UI.Events.OnKeyPress=new D2L.LP.Web.UI.Events.Event;D2L.LP.Web.UI.Events.OnMouseMove=new D2L.LP.Web.UI.Events.Event; D2L.LP.Web.UI.Events.OnMouseUp=new D2L.LP.Web.UI.Events.Event;D2L.LP.Web.UI.Events.OnResize=new D2L.LP.Web.UI.Events.Event;D2L.LP.Web.UI.Events.OnSizingFinished=new D2L.LP.Web.UI.Events.Event;D2L.LP.Web.UI.Events.OnStorage=new D2L.LP.Web.UI.Events.Event;D2L.LP.Web.UI.Events.OnViewRender=new D2L.LP.Web.UI.Events.Event;D2L.LP.Web.UI.Events.OnVisibilityChange=new D2L.LP.Web.UI.Events.Event;D2L.LP.Web.UI.Events.OnLoad=D2L.LP.Web.UI.Events.OnLoad||new D2L.LP.Web.UI.Events.Event; D2L.LP.Web.UI.Events.OnProcessingBegin=new D2L.LP.Web.UI.Events.Event;D2L.LP.Web.UI.Events.OnProcessingEnd=new D2L.LP.Web.UI.Events.Event; D2L.LP.Web.UI.Events.VisibilityManager={AddListener:function(node,callback){D2L.LP.Web.UI.Events.VisibilityManager.Listeners.push({node:node,callback:callback})},Initialize:function(){D2L.LP.Web.UI.Events.OnVisibilityChange.AddListener(function(node,isDisplayed){var listeners=D2L.LP.Web.UI.Events.VisibilityManager.Listeners;for(var i=0;i<listeners.length;i++)if(D2L.LP.Web.UI.Html.Dom.IsAncestor(node,listeners[i].node))if(D2L.LP.Web.UI.Html.Css.GetStyle(listeners[i].node,"display")!="none")listeners[i].callback.call(listeners[i].callback, isDisplayed)})},Listeners:[]};D2L.LP.Web.UI.Events.VisibilityManager.Initialize();D2L.LP.Web.UI.Events.OnLoad.AddListener(function(){D2L.LP.Web.UI.Events.OnViewRender.Trigger(document)}); D2L.LP.Web.UI.Html.LastPage={StorageKey:"LastPage",TrackingPage:true,Set:function(url,title){var me=D2L.LP.Web.UI.Html.LastPage;var documentHref=document.location.href;var isQuicklinkRedirect=documentHref.indexOf("quicklink")>-1;var isInnerIframe=window.top!==window;if(me.TrackingPage&&!isQuicklinkRedirect&&!isInnerIframe){var data={url:url||documentHref,title:title||document.title};var json=JSON.stringify(data);D2L.LP.Web.UI.Html.Dom.Storage.Session.Set(me.StorageKey,json,false)}},Get:function(){var me= D2L.LP.Web.UI.Html.LastPage;var json=D2L.LP.Web.UI.Html.Dom.Storage.Session.Get(me.StorageKey);if(json===undefined||json===null)return null;var data=D2L.LP.Web.Serialization.Json.Deserialize(json);return data},DoNotTrackPage:function(){var me=D2L.LP.Web.UI.Html.LastPage;me.TrackingPage=false}};D2L.LP.Web.UI.Html.Dom.AddEventListener("unload",window,function(){D2L.LP.Web.UI.Html.LastPage.Set()}); D2L.LP.Web.UI.Events.OnViewRender.AddListener(function(node){if(node.nodeType!=9&&node.nodeType!=1)return;D2L.LP.Web.UI.Html.Dom.ApplyClassFunctions(D2L.LP.Web.UI.Html.Dom.ClassInitializers,node)});D2L.LP.Web.UI.Events.OnViewRender.AddListener(function(sourceNode){if(sourceNode===document)return;D2L.LP.Web.UI.Html.Math.UpdateNode(sourceNode)});D2L.LP.Web.UI.Common.Controls.HtmlBlock.OnAfterRender.AddListener(function(node){D2L.LP.Web.UI.Html.Math.UpdateNode(node)}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-token-receiver",function(node){var scope=node.getAttribute("data-token-receiver-scope");if(!scope)return;function tokenGetter(){return D2L.LP.Web.Authentication.OAuth2.GetToken(scope)}node.token=tokenGetter});D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-dialog-close",function(node){D2L.LP.Web.UI.Desktop.MasterPages.Dialog.InitClose(node,window)}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-dialog-title",function(node){D2L.LP.Web.UI.Desktop.MasterPages.Dialog.InitTitle(node,window)});D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-dialog-resize",function(node){D2L.LP.Web.UI.Desktop.MasterPages.Dialog.InitResize(node,window)});D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-page-buttons",function(node){D2L.LP.Web.UI.Desktop.Controls.PageButtons.Init(node)}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("dba",function(node){var isBottom=$(node).is(".dba_b");if(!isBottom)return;setTimeout(function(){D2L.LP.Web.UI.Desktop.Controls.PageButtons.Init(node)},300)}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-flash-message",function(node){var over=false;var fadedOut=false;var $node=$(node);$node.attr("role","alert");var $pageMessage=$node.closest(".d2l-page-message");if($pageMessage===undefined)return;var pageMessageId=$pageMessage.attr("id");if(pageMessageId===undefined)return;pageMessageId=new D2L.LP.Web.UI.Html.AbsoluteHtmlId(pageMessageId);var autoHide=$(node).data("d2l-autohide")!==undefined;var FadeOut=function(){if(over)return;D2L.LP.Web.UI.Desktop.MasterPages.PageMessage.Close(pageMessageId); setTimeout(function(){fadedOut=true},2E3)};if(autoHide){setTimeout(FadeOut,4E3);$pageMessage.on("mouseover",function(){if(fadedOut)return;over=true;D2L.LP.Web.UI.Desktop.MasterPages.PageMessage.Open(pageMessageId)}).on("mouseout",function(){over=false;setTimeout(FadeOut,4E3)})}setTimeout(function(){var $messageNode=$node.find(".d2l-flash-message-text");var text=$("<p></p>").text($messageNode.attr("data-message-text")).html();$messageNode.append(text);$node.css("visibility","hidden");$node.css("visibility", "visible");D2L.LP.Web.UI.Desktop.MasterPages.PageMessage.Open(pageMessageId)},100)});D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-button",function(node){D2L.LP.Web.UI.Common.Controls.Button.Init(node)});D2L.LP.Web.UI.Html.PartialRendering.AddClassNameToFocusIncludeList("d2l-button");D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-edit-required",function(node){D2L.LP.Web.UI.Html.Aria.SetAttribute(node,"required","true")}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-edit",function(node){D2L.LP.Web.UI.Html.ChangeTracking.Trackable.StartTracking(node);if(!D2L.LP.Web.UI.ObjectRepository.HasKey(node.id))return;var prevNodeVal=node.value;var onKeyPress=function(kpArgs){if(D2L.LP.Web.UI.ObjectRepository.HasKeys(node.id,"key")){var onKeyPressFunction=D2L.LP.Web.UI.ObjectRepository.Get(node.id,"key");setTimeout(function(){onKeyPressFunction.call(onKeyPressFunction)},0)}if(kpArgs.GetKey()==D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.Enter&& D2L.LP.Web.UI.ObjectRepository.HasKeys(node.id,"enter")){var onEnterFunction=D2L.LP.Web.UI.ObjectRepository.Get(node.id,"enter");onEnterFunction.call(onEnterFunction)}if(kpArgs.GetKey()==D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.Enter&&D2L.LP.Web.UI.ObjectRepository.HasKeys(node.id,"change")){var dispatchOnChange=function(){if(prevNodeVal!==node.value){node.value=node.value;D2L.LP.Web.UI.Html.Dom.DispatchEvent("change",node)}};setTimeout(dispatchOnChange)}};D2L.LP.Web.UI.Html.Dom.AddKeyPressEventListener(node, function(kpArgs){onKeyPress(kpArgs)});if(D2L.LP.Web.UI.ObjectRepository.HasKeys(node.id,"change")){var onChangeFunction=D2L.LP.Web.UI.ObjectRepository.Get(node.id,"change");D2L.LP.Web.UI.Html.Dom.AddEventListener("change",node,function(){prevNodeVal=node.value;onChangeFunction.call(onChangeFunction)})}if(D2L.LP.Web.UI.ObjectRepository.HasKeys(node.id,"input")){var onInputFunction=D2L.LP.Web.UI.ObjectRepository.Get(node.id,"input");D2L.LP.Web.UI.Html.Dom.AddEventListener("input",node,function(){prevNodeVal= node.value;onInputFunction.call(onInputFunction)})}});D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-edit-suppress-form-submission",function(node){var onKeyPress=function(kpArgs){if(kpArgs.GetKey()===D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.Enter){var event=kpArgs.GetEventObject();event.preventDefault()}};D2L.LP.Web.UI.Html.Dom.AddKeyPressEventListener(node,onKeyPress)});D2L.LP.Web.UI.Html.Dom.AddClassInitializer("vui-field-row",function(node){D2L.LP.Web.UI.Html.ChangeTracking.Tracker.TrackChanges(node)}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("vui-change-tracker",function(node){D2L.LP.Web.UI.Html.ChangeTracking.Tracker.TrackChanges(node)}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-form",function(form){var $form=$(form);var submitFormOnEnterBuster=document.createElement("input");submitFormOnEnterBuster.type="text";submitFormOnEnterBuster.className="d2l-hidden";submitFormOnEnterBuster.setAttribute("aria-label","ignore");form.appendChild(submitFormOnEnterBuster);var trackChanges=D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-form-track-changes",form)&&D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-dialog-body",document)==null&& D2L.LP.Web.UI.Html.Dom.GetParentElementByClassName("d2l-form-track-changes",form)==null;if(trackChanges)D2L.LP.Web.UI.Html.ChangeTracking.Tracker.TrackChanges(form,false);$form.on("vui-change",function(evt){var onChangeFunc=D2L.LP.Web.UI.ObjectRepository.TryGet(form.id,"change");if(onChangeFunc!==null&&D2L.LP.Web.UI.Html.Dom.IsAncestor(form,evt.target))onChangeFunc.call(onChangeFunc)});if(!trackChanges)return;form.m_stopChangeTrackingPrompt=false;window.onbeforeunload=function(){if(form.m_stopChangeTrackingPrompt)return; if(D2L.LP.Web.UI.Common.Controls.Form.HasChangedNode(form))return"Unsaved Changes"}});D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-clickable",function(node){D2L.LP.Web.UI.Common.Controls.Link.InstallClickable(node)});D2L.LP.Web.UI.Html.PartialRendering.AddClassNameToFocusIncludeList("d2l-clickable"); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-htmlblock-deferred",function(node){var replaceTemplate=function(template){var clone=document.importNode(template.content,true);node.replaceChild(clone,template);if(node.querySelector("math")){var nodes=node.getElementsByTagName("math");if(!nodes||nodes.length===0)node.innerHTML=node.innerHTML}D2L.LP.Web.UI.Common.Controls.HtmlBlock.OnAfterRender.Trigger(node,clone)};var stamp=function(){var template=node.querySelector("template");if(!template)return; if(!template.content)setTimeout(function(){replaceTemplate(template)},0);else replaceTemplate(template)};D2L.WebComponentsReady.then(stamp)}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-iframe",function(iframe){var onClick=D2L.LP.Web.UI.Events.OnClick;var $iframe=$(iframe);var loadingIcon=$iframe.prev(".d2l-iframe-loading-container");if(!loadingIcon.length)loadingIcon=$iframe.parent().prev(".d2l-iframe-loading-container");var showContent=function(){loadingIcon.hide();$iframe.removeClass("d2l-iframe-offscreen")};D2L.LP.Web.UI.Common.Controls.IFrame.AddOnLoadHandler(iframe,showContent);var loadHandler=function(){var handleClick=function(evt){onClick.Trigger(evt)}; try{D2L.LP.Web.UI.Html.Dom.AddEventListener("click",iframe.contentWindow.document,handleClick)}catch(e){}try{var mathJaxMessageNode=D2L.LP.Web.UI.Html.Dom.GetElementById("MathJax_MSIE_Frame",iframe.contentWindow.document);if(mathJaxMessageNode&&mathJaxMessageNode.parentNode&&mathJaxMessageNode.parentNode.parentNode)mathJaxMessageNode.parentNode.parentNode.removeChild(mathJaxMessageNode.parentNode)}catch(e){}};D2L.LP.Web.UI.Common.Controls.IFrame.AddOnLoadHandler(iframe,loadHandler)}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-iframe-fullscreen",function(iframe){document.body.style.overflow="hidden";var pagePadding=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-page-main-padding",document);if(pagePadding!==null&&pagePadding!==undefined)pagePadding.style.paddingBottom=0;var dialogBody=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-dialog-body",document);if(dialogBody===null)dialogBody=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-popup-body",document); var resize=function(){var viewportHeight;if(dialogBody===null)viewportHeight=D2L.LP.Web.UI.Html.Dom.GetViewportSize().height;else viewportHeight=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(dialogBody).height;var height=viewportHeight;if(dialogBody===null){var rect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(iframe);height-=rect.top}else height-=5;if($(iframe).parent().hasClass("d2l-fileviewer-text"))try{var iframeBody=$(iframe).contents();iframeBody.find("body pre").css("white-space","pre-wrap");iframeBody.find("body").css("word-wrap", "break-word")}catch(e){}iframe.style.height=height+"px"};D2L.WebComponentsReady.then(resize);D2L.LP.Web.UI.Common.Controls.IFrame.AddOnLoadHandler(iframe,resize);setTimeout(function(){D2L.LP.Web.UI.Events.OnResize.AddListener(function(){resize()})})}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-iframe-fit",function(iframe){var resize=function(){try{var body=iframe.contentWindow.document.body;if(body){if($(iframe).parent().hasClass("d2l-fileviewer-text"))try{var iframeBody=$(iframe).contents();iframeBody.find("body pre").css("white-space","pre-wrap")}catch(e){}var scrollHeight=body.scrollHeight;if(iframe.contentWindow.document.documentElement){var documentElementHeight=iframe.contentWindow.document.documentElement.scrollHeight;if(documentElementHeight> 0&&scrollHeight>0)scrollHeight=Math.min(documentElementHeight,scrollHeight);else scrollHeight=Math.max(documentElementHeight,scrollHeight)}body.style.overflowY="hidden";iframe.style.height=scrollHeight+"px"}}catch(e){}setTimeout(function(){resize()},500)};D2L.LP.Web.UI.Common.Controls.IFrame.AddOnLoadHandler(iframe,resize)}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-iframe-fit-user-content",function(iframe){var id=D2L.LP.Web.UI.Common.Controls.IFrame.GetNextGeneratedId();var doResize=function(lastHtml,lastDocWidth,lastDocHeight,lastLocation){var height,body,innerLorFrame=null;var currentHtml,currentDocWidth;var pollingInterval=500;try{if(iframe.contentWindow.document.getElementsByTagName("frameset").length>0)throw"cannot determine size with legacy framesets";body=iframe.contentWindow.document.body;var innerIframe= iframe.contentWindow.document.getElementsByTagName("iframe")[0];var innerIframeName=innerIframe&&innerIframe.attributes["name"];if(innerIframeName&&innerIframeName.value==="frmContentObject"){innerLorFrame=innerIframe;body=innerLorFrame.contentWindow.document.body||innerLorFrame.document.body}body.style.overflowY="hidden";currentHtml=body.outerHTML;currentDocWidth=window.innerWidth||document.documentElement.clientWidth;var doRecalculate=!(currentHtml==lastHtml)||!(currentDocWidth==lastDocWidth);if(!doRecalculate){setTimeout(function(){doResize(currentHtml, currentDocWidth,lastDocHeight,lastLocation)},pollingInterval);return}iframe.style.height="auto";if(innerLorFrame){innerLorFrame.style.height="auto";innerLorFrame.style.overflowY="hidden";if(innerLorFrame.contentWindow.document.getElementsByTagName("frameset").length>0)throw"cannot determine size with legacy framesets";var lorContentType=innerLorFrame.attributes["data-contenttype"].value;switch(lorContentType){case "html":break;case "image":innerLorFrame.contentWindow.document.getElementsByTagName("img")[0].style.maxWidth= "100%";break;default:throw"cannot determine size with unknown content type";}}height=Math.max(body.scrollHeight,body.offsetHeight,body.clientHeight);var heightSourceIframe=innerLorFrame||iframe;var docElement=heightSourceIframe.contentWindow.document.documentElement;if(docElement)height=Math.max(height,docElement.scrollHeight,docElement.offsetHeight,docElement.clientHeight);if(heightSourceIframe.contentWindow.innerHeight)height=Math.max(height,heightSourceIframe.contentWindow.innerHeight);iframe.style.height= getSafeHeight(height);if(docElement){height=Math.max(height,docElement.scrollHeight);iframe.style.height=getSafeHeight(height)}if(innerLorFrame)innerLorFrame.style.height=iframe.style.height;iframe.parentElement.style.minHeight=iframe.style.height}catch(e){iframe.style.height=getSafeHeight();if(body)body.style.overflowY="auto";if(innerLorFrame){innerLorFrame.style.height=iframe.style.height;innerLorFrame.style.overflowY="auto"}}var location;if(innerLorFrame)location=innerLorFrame.contentWindow.location.href; else location=iframe.contentWindow.location.href;if(location!==lastLocation&&height!==lastDocHeight)window.parent.scroll(0,0);setTimeout(function(){doResize(currentHtml,currentDocWidth,height,location)},pollingInterval)};var resize=function(){try{var body=iframe.contentWindow.document.body;doResize()}catch(e){window.addEventListener("message",listenForCrossDomainSizeChanges,false);requestIframeSize()}};var requestIframeSize=function(){iframe.contentWindow.postMessage(JSON.stringify({handler:"d2l.iframe.client", id:id}),"*")};var listenForCrossDomainSizeChanges=function(event){try{var data=JSON.parse(event.data);if(!(data.handler==="d2l.iframe.host")||data.id&&!(data.id===id))return;iframe.style.overflowY="hidden";iframe.style.height=getSafeHeight(data.height)}catch(e){D2L.LP.Web.UI.Html.JavaScript.Console.Warn("iframe resize: not handling unexpected message posted by another window: ",event.data)}};var getSafeHeight=function(height){if(!height||height<200)height=$(iframe).attr("data-default-height");return height+ "px"};D2L.LP.Web.UI.Common.Controls.IFrame.AddOnLoadHandler(iframe,resize)});D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-image",function(node){if(node.alt!=="")node.title=node.alt}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-imagelink",function(node){var me=D2L.LP.Web.UI.Common.Controls.ImageLink;var isDisabled=!me.IsEnabledNode(node);if(isDisabled)D2L.LP.Web.UI.Html.Aria.SetAttribute(node,"disabled","true");var hasOnClick=D2L.LP.Web.UI.Html.Dom.HasAttribute(node,"data-onclick");if(hasOnClick){D2L.LP.Web.UI.Html.Aria.SetRole(node,"button");var onClick=D2L.LP.Web.UI.Html.Dom.GetAttribute(node,"data-onclick");D2L.LP.Web.UI.Html.Dom.RemoveAttribute(node,"data-onclick");if(onClick)D2L.LP.Web.UI.Html.Dom.AddEventListener("click", node,function(){if(D2L.LP.Web.UI.Common.Controls.ImageLink.IsEnabledNode(node))eval(onClick)})}});D2L.LP.Web.UI.Html.PartialRendering.AddClassNameToFocusIncludeList("d2l-imagelink");D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-select",function(node){D2L.LP.Web.UI.Html.ChangeTracking.Trackable.StartTracking(node)}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-select-optgroup",function(node){for(var i=0;i<node.childNodes.length;i++){var option=node.childNodes[i];if(option.nodeType==1)option.title=node.label}});D2L.LP.Web.UI.Html.PartialRendering.AddClassNameToFocusIncludeList("d2l-select");D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-button-menu-dropdown",function(node){D2L.LP.Web.UI.Desktop.Controls.ButtonMenu.Init(node)});D2L.LP.Web.UI.Html.PartialRendering.AddClassNameToFocusIncludeList("d2l-button-menu-dropdown"); D2L.LP.Web.UI.Html.PartialRendering.AddClassNameToFocusIncludeList("d2l-button-subtle"); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-calendar-mini",function(node){var navMatrix=new Array;var prevMonthArrow=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-calendar-mini-prevmonth",node);var nextMonthArrow=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-calendar-mini-nextmonth",node);var navLocation={col:0,row:0,daysPerWeek:7};var isRTL=D2L.LP.Globalization.Locale.GetTextFormatDescriptor().TextDirection==D2L.LP.Globalization.Formatting.Text.TextDirection.RightToLeft;var handleOnClickDayFocus= function(days,i,j){var day=days[i+j];navFocusDay(day.firstChild.nodeValue)};var setOnClick=function(onclick,days,i,j){days[i+j].onclick=function(event){if(node.editNode!=null&&node.editNode.closeMiniCalendar)node.editNode.closeMiniCalendar();handleOnClickDayFocus(days,i,j);onclick(event)};days[i+j].onkeypress=function(kpEvent){var keyCodeEvent=kpEvent||window.event;var keyCode=keyCodeEvent.keyCode;if(keyCode==D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.Enter||keyCode==D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.Space){if(node.editNode!= null&&node.editNode.closeMiniCalendar)node.editNode.closeMiniCalendar();handleOnClickDayFocus(days,i,j);onclick(kpEvent)}}};var monthChangeAdditionalOnClick=function(){setTimeout(function(){if(node.editNode!=null&&node.editNode.onMiniCalendarChange)node.editNode.onMiniCalendarChange()},200)};var initNavMatrix=function(){D2L.LP.Web.UI.Common.Controls.ImageLink.AddOnClick(new D2L.LP.Web.UI.Html.AbsoluteHtmlId(prevMonthArrow.id),monthChangeAdditionalOnClick);D2L.LP.Web.UI.Common.Controls.ImageLink.AddOnClick(new D2L.LP.Web.UI.Html.AbsoluteHtmlId(nextMonthArrow.id), monthChangeAdditionalOnClick);var days=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-calendar-mini-day",node);for(var i=0;i<days.length;i+=7){navMatrix.push(new Array);for(var j=0;j<7;j++){setOnClick(days[i+j].onclick,days,i,j);navMatrix[navMatrix.length-1].push(days[i+j]);days[i+j].tabIndex=0}}};var navMatrixBoundaryCheck=function(){return navLocation.row>=0&&navLocation.row<navMatrix.length&&navLocation.col>=0&&navLocation.col<navLocation.daysPerWeek};var navFocusSelectedDay=function(){var day= 1;var selectedDay=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-calendar-mini-selected",node);if(selectedDay!==undefined&&selectedDay!==null)if(!D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-calendar-mini-other",selectedDay))day=D2L.LP.Web.UI.Html.Dom.GetAttribute(selectedDay,"data-date");navFocusDay(day)};var navRestoreColumnFocus=function(col,startFromBottom){var row=startFromBottom?navMatrix.length-1:0;var day=navMatrix[row][col];while(D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-calendar-mini-other", day)){row=startFromBottom?row-1:row+1;day=navMatrix[row][col];if(row<0||row>navMatrix.length)return}navLocation.col=col;navLocation.row=row;day.focus()};var navFocusDay=function(day){if(day===undefined||day===null)day=1;var days=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-calendar-mini-day",node);var firstDayOffset=0;for(var i=0;i<days.length;i++)if(D2L.LP.Web.UI.Html.Dom.GetAttribute(days[i],"data-date")==="1"){firstDayOffset=i;break}day=day-0;firstDayOffset=firstDayOffset-0;var row=Math.floor(day/ navLocation.daysPerWeek);if(day%navLocation.daysPerWeek==0)row=row-1;var col=day%navLocation.daysPerWeek;if(col==0)col=navLocation.daysPerWeek;col=col+firstDayOffset;if(col>navLocation.daysPerWeek){row=row+1;col=col%navLocation.daysPerWeek}if(row!=null&&row!=undefined&&col!=null&&col!=undefined)navFocusNode(row,col-1)};var navFocusNode=function(optRow,optCol){if(optRow!=null&&optRow!=undefined&&optCol!=null&&optCol!=undefined){navLocation.row=optRow;navLocation.col=optCol;preserveDate(optCol,optRow)}if(navMatrixBoundaryCheck())if(navMatrix[navLocation.row][navLocation.col]!== null)navMatrix[navLocation.row][navLocation.col].focus()};var changeMonth=function(changeMonthEvent){changeMonthEvent.click(changeMonthEvent)};var preserveColumn=function(col,startFromBottom){if(col!==undefined&&col!==null&&node.parentNode&&node.parentNode.parentNode){var placeHolder=D2L.LP.Web.UI.Html.Dom.GetParentElementByClassName("d2l-placeholder",node);D2L.LP.Web.UI.Html.Dom.SetAttribute(placeHolder,"data-restoreColumn",col);D2L.LP.Web.UI.Html.Dom.SetAttribute(placeHolder,"data-startFromBottom", startFromBottom)}};var preserveDate=function(col,row){if(col===undefined||col===null||row===undefined||row===null)return;var placeHolder=D2L.LP.Web.UI.Html.Dom.GetParentElementByClassName("d2l-placeholder",node);if(placeHolder===undefined||placeHolder===null)return;if(navMatrix.length>row&&navMatrix[row].length>col){var day=navMatrix[row][col];if(day!==null&&D2L.LP.Web.UI.Html.Dom.HasAttribute(day,"data-date")){var dayStr=D2L.LP.Web.UI.Html.Dom.GetAttribute(day,"data-date");D2L.LP.Web.UI.Html.Dom.SetAttribute(placeHolder, "data-restoreDate",dayStr)}}};var navArrowHandler=function(col,row){navLocation.col+=col*(isRTL?-1:1);navLocation.row+=row;var rowMax=navMatrix.length-1;if(navLocation.row<0){preserveColumn(navLocation.col,true);changeMonth(prevMonthArrow);return}else if(navLocation.row>rowMax){preserveColumn(navLocation.col,false);changeMonth(nextMonthArrow);return}else if(navLocation.col<0&&navLocation.row==0){preserveColumn(6,true);changeMonth(prevMonthArrow);return}else if(navLocation.col>=navLocation.daysPerWeek&& navLocation.row==rowMax){preserveColumn(0,false);changeMonth(nextMonthArrow);return}else if(navLocation.col<0){navLocation.row=navLocation.row-1;navLocation.col=navLocation.daysPerWeek-1}else if(navLocation.col>navLocation.daysPerWeek-1){navLocation.row=navLocation.row+1;navLocation.col=0}else{var day=navMatrix[navLocation.row][navLocation.col];if(D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-calendar-mini-other",day)){preserveDate(navLocation.col,navLocation.row);navLocation.row==0?changeMonth(prevMonthArrow): changeMonth(nextMonthArrow);return}}navFocusNode()};var navOnKeyPress=function(kpArgs){var result=false;var e=kpArgs.GetEventObject();if(!D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.IsControlPressed)if(kpArgs.GetKey()==D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.ArrowUp){navArrowHandler(0,-1);result=true}else if(kpArgs.GetKey()==D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.ArrowDown){navArrowHandler(0,1);result=true}else if(kpArgs.GetKey()==D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.ArrowLeft){navArrowHandler(-1, 0);result=true}else if(kpArgs.GetKey()==D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.ArrowRight){navArrowHandler(1,0);result=true}else{if(kpArgs.GetKey()==D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.Escape||kpArgs.GetKey()==D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.Tab)if(node.editNode!=null&&node.editNode.closeMiniCalendar)node.editNode.closeMiniCalendar()}else if(kpArgs.GetKey()==D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.ArrowLeft){changeMonth(prevMonthArrow);result=true}else if(kpArgs.GetKey()== D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.ArrowRight){changeMonth(nextMonthArrow);result=true}return result};D2L.LP.Web.UI.Html.Dom.AddKeyPressEventListener(node,function(kpArgs){var result=navOnKeyPress(kpArgs);if(result){var event=kpArgs.GetEventObject();D2L.LP.Web.UI.Html.Dom.CancelEventDefaultBehaviour(event)}});initNavMatrix();node.navLocation=navLocation;node.navFocusNode=navFocusNode;node.navFocusDay=navFocusDay;node.navRestoreColumnFocus=navRestoreColumnFocus;node.navFocusSelectedDay=navFocusSelectedDay; var miniCalPlaceholder=D2L.LP.Web.UI.Html.Dom.GetParentElementByClassName("d2l-placeholder",node);if(D2L.LP.Web.UI.Html.Dom.HasAttribute(miniCalPlaceholder,"data-restoreDate")){var restoreDay=D2L.LP.Web.UI.Html.Dom.GetAttribute(miniCalPlaceholder,"data-restoreDate");D2L.LP.Web.UI.Html.Dom.RemoveAttribute(miniCalPlaceholder,"data-restoreDate");node.navFocusDay(restoreDay)}}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-collapsible-section",function(node){var toggle=node.querySelector(".d2l-collapsible-section-toggle");var target=document.getElementById(toggle.getAttribute("aria-controls"));toggle.addEventListener("click",function(){var isCollapsed=toggle.getAttribute("aria-expanded")==="false";var scroll=function(){toggle.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})};if(isCollapsed){D2L.Dom.ExpandCollapse.expand(target).then(scroll);toggle.setAttribute("aria-expanded", "true")}else{D2L.Dom.ExpandCollapse.collapse(target);toggle.setAttribute("aria-expanded","false")}});var $target=$(target);D2L.LP.Web.UI.Html.ChangeTracking.Tracker.TrackChanges(target);$target.on("vui-change vui-restore",function(){if(D2L.LP.Web.UI.Html.ChangeTracking.Tracker.ContainsChanges(this))toggle.classList.add("d2l-collapsible-section-changed");else toggle.classList.remove("d2l-collapsible-section-changed")})}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-contextmenu-ph-dropdown",function(node){if(!node.hasAttribute("data-contextMenuId")||!node.hasAttribute("data-openerId"))return;var contextMenuId=D2L.LP.Web.UI.Html.AbsoluteHtmlId.Create(node.getAttribute("data-contextMenuId"));var isOnDemand=D2L.LP.Web.UI.ObjectRepository.HasKeys(contextMenuId.GetValue(),"LoadHandler");var placeholderKey=node.getAttribute("data-placeholderKey");var dataOpenerId=node.getAttribute("data-openerId");var opener=node.querySelector("#"+ dataOpenerId);var loadFunction=function(e){if(node.disabled||!isOnDemand&&!D2L.LP.Web.UI.Html.Dom.GetElementById(contextMenuId.GetValue()))return;if(D2L.LP.Web.UI.Desktop.Controls.ContextMenu.IsOpen(contextMenuId)){D2L.LP.Web.UI.Desktop.Controls.ContextMenu.Close(contextMenuId);return}var keypress=e.type==="keypress"?true:false;if(keypress&&e.which!==13&&e.which!==32)return;var openerId=D2L.LP.Web.UI.Html.AbsoluteHtmlId.Create(dataOpenerId);if(isOnDemand&&!D2L.LP.Web.UI.Desktop.Controls.ContextMenuOnDemand.IsLoaded(contextMenuId))D2L.LP.Web.UI.Desktop.Controls.ContextMenu.OpenOnDemand(node, contextMenuId,openerId,placeholderKey,keypress);else D2L.LP.Web.UI.Desktop.Controls.ContextMenu.CreateDropdownMenu(node,contextMenuId,openerId,placeholderKey,keypress)};opener.addEventListener("mouseup",loadFunction);opener.addEventListener("keypress",loadFunction);var closeFunction=function(){var dropdownMenuContent=node.querySelector("d2l-dropdown-menu");if(dropdownMenuContent)node.removeChild(dropdownMenuContent)};node.addEventListener("d2l-dropdown-close",closeFunction)});D2L.LP.Web.UI.Html.PartialRendering.AddClassNameToFocusIncludeList("d2l-contextmenu"); D2L.LP.Web.UI.Html.PartialRendering.AddClassNameToFocusIncludeList("d2l-contextmenu-ph-dropdown"); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-datalist",function(node){var me=D2L.LP.Web.UI.Desktop.Controls.DataList;var dataListId=node.parentNode.getAttribute("id");if(dataListId!=null){var id=new D2L.LP.Web.UI.Html.AbsoluteHtmlId(dataListId);var totalItemCount;if(D2L.LP.Web.UI.ObjectRepository.HasKeys(dataListId,2))totalItemCount=D2L.LP.Web.UI.ObjectRepository.Get(dataListId,2);var pageNumber;if(D2L.LP.Web.UI.ObjectRepository.HasKeys(dataListId,3))pageNumber=D2L.LP.Web.UI.ObjectRepository.Get(dataListId, 3);var itemNodes=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-datalist-item",node);me.SetIsNewItems(itemNodes);setTimeout(function(){var hasMoreItems=me.GetHasMoreItems(id);if(!hasMoreItems&&totalItemCount!==undefined&&itemNodes.length<totalItemCount)hasMoreItems=true;me.GetOnLoadCompletedEvent(id).Trigger(hasMoreItems,itemNodes,totalItemCount,pageNumber)})}D2L.LP.Web.UI.Desktop.Controls.DataList.AdjustLastVisibleChild(node)}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-datalist-checkboxitem",function(node){D2L.LP.Web.UI.Desktop.Controls.DataList.CheckboxItems.InitializeCheckboxItem(node)});D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-datalist-radioitem",function(node){D2L.LP.Web.UI.Desktop.Controls.DataList.RadioItems.InitializeRadioItem(node)}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-datalist-placeholder",function(node){var dataListNode=node.parentNode;D2L.LP.Web.UI.Html.PartialRendering.OnAfter.AddListener(function(id){if(id.GetValue()==node.id)D2L.LP.Web.UI.Desktop.Controls.DataList.AdjustLastVisibleChild(dataListNode)})}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-datalist-item-actionable",function(node){var dataList=D2L.LP.Web.UI.Desktop.Controls.DataList;var contentNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-datalist-item-content",node);var actionNode;var actionControlId=node.getAttribute("data-d2l-actionId");if(actionControlId!=null){actionNode=D2L.LP.Web.UI.Html.Dom.GetElementById(actionControlId);D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-datalist-item-actioncontrol",actionNode);D2L.LP.Web.UI.Html.Dom.RemoveClassName("vui-outline", actionNode)}var getActionFunction=function(){if(actionControlId!==null)return D2L.LP.Web.UI.ObjectRepository.TryGet(actionControlId);else return null};if(actionNode){D2L.LP.Web.UI.Html.Dom.AddEventListener("focus",actionNode,function(){D2L.LP.Web.UI.Html.Dom.AddClassName("vui-active",node)});D2L.LP.Web.UI.Html.Dom.AddEventListener("blur",actionNode,function(){D2L.LP.Web.UI.Html.Dom.RemoveClassName("vui-active",node)});D2L.LP.Web.UI.Html.Dom.AddEventListener("click",actionNode,function(){var action= getActionFunction();if(action)action.call(action)})}D2L.LP.Web.UI.Html.Dom.AddEventListener("mouseover",contentNode,function(){D2L.LP.Web.UI.Html.Dom.AddClassName("vui-active",node)});D2L.LP.Web.UI.Html.Dom.AddEventListener("mouseout",contentNode,function(){D2L.LP.Web.UI.Html.Dom.RemoveClassName("vui-active",node)});D2L.LP.Web.UI.Html.Dom.AddEventListener("click",contentNode,function(e){var eventTarget=D2L.LP.Web.UI.Html.Dom.GetEventTargetElement(e);while(eventTarget!==contentNode&&eventTarget!== null){var onClickRule=dataList.CaptureOnClickRules[eventTarget.nodeName.toUpperCase()];if(onClickRule!==undefined&&onClickRule===true)return;eventTarget=eventTarget.parentNode}var href=actionNode.getAttribute("href");actionNode.removeAttribute("href");var action=getActionFunction();if(action)action.call(action);actionNode.href=href;if(href!==null&&href!=="javascript:void(0);")D2L.LP.Web.UI.Html.Dom.Navigate(new D2L.LP.Web.Http.UrlLocation(href))})});D2L.LP.Web.UI.Html.PartialRendering.AddClassNameToFocusIncludeList("d2l-datalist-item-actionable"); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-datetime-selector",function(node){var me=D2L.LP.Web.UI.Desktop.Controls.DateTimeSelector;var edit=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-datetime-selector-date-input",node);var id=new D2L.LP.Web.UI.Html.AbsoluteHtmlId(edit.id);var nodes=me.GetNodes(id);var phid=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-placeholder",nodes.floatingContainer).id;$(nodes.container).on("d2l-datetime-selector-change",function(){var onChangeFunction= D2L.LP.Web.UI.ObjectRepository.TryGet(nodes.edit.id,"OnDateTimeChangeFunction");if(onChangeFunction)onChangeFunction.call(onChangeFunction)});edit.d2l_lastGoodDate=me.GetSelectedDateTimeNodes(nodes);var dateTimeParser=null;var getDateTimeParser=function(){if(dateTimeParser===null)dateTimeParser=D2L.LP.Globalization.Locale.GetDateTimeParser();return dateTimeParser};var closing=false;var onMiniCalendarChange=function(){nodes=me.GetNodes(id,phid);if(nodes.floatingContainer!=null&&nodes.floatingContainer!= undefined)nodes.floatingContainer.tabIndex=-1;if(nodes.miniCalendar!=null&&nodes.miniCalendar!=undefined)nodes.miniCalendar.editNode=nodes.edit};var isMiniCalendarOpen=function(){return D2L.LP.Web.UI.Desktop.Controls.FloatingContainer.IsOpenNode(nodes.floatingContainer)};var openMiniCalendarFunc=D2L.LP.Web.UI.ObjectRepository.Get(nodes.edit.id,"OpenMiniCalendar");var openMiniCalendar=function(){if(closing||nodes.floatingContainer==null||isMiniCalendarOpen())return;openMiniCalendarFunc.call(openMiniCalendarFunc); onMiniCalendarChange()};var closeMiniCalendar=function(){closing=true;if(nodes.floatingContainer!=null&&isMiniCalendarOpen())D2L.LP.Web.UI.Desktop.Controls.FloatingContainer.CloseNode(nodes.floatingContainer);setTimeout(function(){closing=false},200)};var onChange=function(){var dateTime=edit.d2l_lastGoodDate;try{var parsedDate=getDateTimeParser().TryParseInputDate(edit.value);var time=D2L.LP.Web.UI.Desktop.Controls.TimeSelector.GetTimeNodes(nodes.timeNodes);if(parsedDate!==null){dateTime=parsedDate; dateTime.m_hour=time.m_hour;dateTime.m_minute=time.m_minute}}catch(e){}me.SetSelectedDateTimeByNode(nodes,dateTime)};var navOnKeyPress=function(kpArgs){var result=false;if(kpArgs.GetKey()==D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.ArrowDown){openMiniCalendar();if(nodes.miniCalendar!=null&&nodes.miniCalendar.navFocusDay)nodes.miniCalendar.navFocusSelectedDay();result=true}else if(kpArgs.GetKey()==D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.Tab||kpArgs.GetKey()==D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.Escape)closeMiniCalendar(); return result};var onFocus=function(e){openMiniCalendar()};D2L.LP.Web.UI.Html.Dom.AddKeyPressEventListener(nodes.edit,function(kpArgs){var result=navOnKeyPress(kpArgs);if(result){var event=kpArgs.GetEventObject();D2L.LP.Web.UI.Html.Dom.CancelEventDefaultBehaviour(event)}});D2L.LP.Web.UI.Html.Dom.AddEventListener("focus",nodes.edit,onFocus);D2L.LP.Web.UI.Html.Dom.AddEventListener("change",nodes.edit,onChange);D2L.LP.Web.UI.Html.Dom.AddEventListener("click",nodes.edit,openMiniCalendar);nodes.edit.closeMiniCalendar= closeMiniCalendar;nodes.edit.onMiniCalendarChange=onMiniCalendarChange});D2L.LP.Web.UI.Html.PartialRendering.AddClassNameToFocusIncludeList("d2l-datetime-selector"); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-editable",function(node){if(!D2L.LP.Web.UI.ObjectRepository.HasKey(node.id))return;var anchor=D2L.LP.Web.UI.Html.Dom.GetPreviousElementSibling(node);D2L.LP.Web.UI.Html.Dom.SetAttribute(anchor,"href","javascript:void(0);");var autoResize=D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-editable-autosize",node);D2L.LP.Web.UI.Html.Dom.AddEventListener("click",node,function(){D2L.LP.Web.UI.Desktop.Controls.EditInPlace.ClickHelper(node,autoResize)});D2L.LP.Web.UI.Html.Dom.AddEventListener("click", anchor,function(e){var target=e.srcElement||e.target;if(target.isEqualNode(node)){D2L.LP.Web.UI.Html.Dom.CancelEventBubble(e);return false}D2L.LP.Web.UI.Html.Dom.DispatchEvent("click",node)});D2L.LP.Web.UI.Html.Dom.AddEventListener("focus",anchor,function(){D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-editable-focus",node)});D2L.LP.Web.UI.Html.Dom.AddEventListener("blur",anchor,function(){D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-editable-focus",node)});D2L.LP.Web.UI.Desktop.Controls.EditInPlace.ModifyAnchors(node)}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-editable-target-edit",function(node){var isRequired=D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-editable-target-edit-required",node);var input=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-edit",node);var finish2=function(hasChanged,isEmpty){input.d2l_value=null;D2L.LP.Web.UI.Desktop.Controls.EditInPlace.FinishHelper(node,hasChanged,isEmpty)};var finish=function(bypassType){if(input.d2l_value===null)return;var value=input.value.trim();var isEmpty= value.length===0;var bypassValidation=true;if(bypassType===1)input.value=input.d2l_value;else if(bypassType===2&&isEmpty&&isRequired)input.value=input.d2l_value;else{input.value=value;bypassValidation=false}value=input.value;isEmpty=value.length===0;var hasChanged=input.d2l_value.trim()!==value;if(!bypassValidation&&isRequired){if(!isEmpty)finish2(hasChanged,isEmpty)}else finish2(hasChanged,isEmpty)};var handleKeyPress=function(kpArgs){var key=kpArgs.GetKey();if(key==D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.Enter)finish(0); else if(key==D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.Escape)finish(1)};D2L.LP.Web.UI.Html.Dom.AddEventListener("blur",input,function(){finish(2)});D2L.LP.Web.UI.Html.Dom.AddKeyPressEventListener(input,handleKeyPress)}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-editable-target-longedit",function(node){var input=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-longedit",node);var finish=function(bypassType){if(input.d2l_value===null)return;var value=input.value.trim();if(bypassType==1)value=input.d2l_value;var hasChanged=input.d2l_value!==value;var isEmpty=value.length===0;input.value=value;input.d2l_value=null;D2L.LP.Web.UI.Desktop.Controls.EditInPlace.FinishHelper(node,hasChanged,isEmpty)};var handleKeyPress= function(kpArgs){var key=kpArgs.GetKey();if(key==D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.Escape)finish(1)};D2L.LP.Web.UI.Html.Dom.AddEventListener("blur",input,finish);D2L.LP.Web.UI.Html.Dom.AddKeyPressEventListener(input,handleKeyPress)});D2L.LP.Web.UI.Html.PartialRendering.AddClassNameToFocusIncludeList("d2l-editable"); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-floating-container",function(elem){D2L.LP.Web.UI.Html.Dom.AddKeyPressEventListener(elem,function(kpArgs){if(kpArgs.GetKey()==D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key.Escape)D2L.LP.Web.UI.Desktop.Controls.FloatingContainer.CloseNode(elem,true)})}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-htmleditor-toolbar",function(node){var toolbarLabel=node.getAttribute("data-d2l-toolbar-label");if(toolbarLabel!=null)D2L.LP.Web.UI.Html.Aria.SetAttribute(node,"label",toolbarLabel);D2L.LP.Web.UI.Html.Aria.SetRole(node,"toolbar")}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-htmleditor-fraeditor",function(node){node.d2l_control=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.FraEditor;if(!node.d2l_initialized){node.d2l_initialized=true;node.d2l_isDirty=false;node.d2l_files=[];node.d2l_files_queued=0}}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-htmleditor-wysiwyg",function(node){if(tinyMCE.majorVersion&&tinyMCE.majorVersion>=4&&node.d2l_initialized)return;var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var htmlEditor=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor;var core=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core;var id=node.getAttribute("id");var textAreaId=me.GetTextAreaId(node);var isInline=htmlEditor.IsInlineByNode(node);var allowSpellChecker=htmlEditor.AllowSpellCheckerByNode(node); var pluginInitializers=D2L.LP.Web.UI.ObjectRepository.TryGet(id,"pluginInitializers");var contentCss=node.getAttribute("data-d2l-editor-content-css");node.d2l_control=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var isRTL=D2L.LP.Globalization.Locale.GetTextFormatDescriptor().TextDirection==D2L.LP.Globalization.Formatting.Text.TextDirection.RightToLeft;if(tinyMCE.majorVersion&&tinyMCE.majorVersion>=4&&!node.d2l_initialized)core.CleanUp(textAreaId);if(!node.d2l_initialized){node.d2l_files= [];node.d2l_files_queued=0;node.d2l_onContentFocus=new D2L.LP.Web.UI.Events.Event}core.Initialize({"allowSpellChecker":allowSpellChecker,"contentCss":contentCss,"editorId":id,"fullPage":{"fontSize":node.getAttribute("data-d2l-editor-fullpage-fontsize"),"fontFamily":node.getAttribute("data-d2l-editor-fullpage-fontface")},"initializeCallback":function(){D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.InitializeCallback(textAreaId)},"initializers":pluginInitializers,"isInline":isInline,"isRTL":isRTL, "langTermsLocation":node.getAttribute("data-d2l-langterms-location"),"layoutCallback":D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.InitializeLayout,"textAreaId":textAreaId});if(!node.d2l_initialized){node.d2l_initialized=true;core.Add(textAreaId)}node.d2l_onBeforeSubmitHandle=function(form){htmlEditor.UpdateFilesNodeByNode(node);me.UpdateTextArea(textAreaId)};D2L.LP.Web.UI.Common.Controls.Form.OnBeforeSubmit.AddListener(node.d2l_onBeforeSubmitHandle);var skipToolbarsNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-skiptoolbars", node);var onClickSkipToolbars=skipToolbarsNode.getAttribute("data-onclick");D2L.LP.Web.UI.Html.Dom.AddEventListener("focus",skipToolbarsNode,function(){setTimeout(function(){skipToolbarsNode.d2l_onClickHandle=function(){eval(onClickSkipToolbars)};D2L.LP.Web.UI.Html.Dom.AddEventListener("click",skipToolbarsNode,skipToolbarsNode.d2l_onClickHandle)},0)});D2L.LP.Web.UI.Html.Dom.AddEventListener("blur",skipToolbarsNode,function(){D2L.LP.Web.UI.Html.Dom.RemoveEventListener("click",skipToolbarsNode,skipToolbarsNode.d2l_onClickHandle)}); D2L.LP.Web.UI.Html.Dom.AddEventListener("focus",node,function(e){node.d2l_hasFocus=true;D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-htmleditor-frosted",node)},true);D2L.LP.Web.UI.Html.Dom.AddEventListener("blur",node,function(e){node.d2l_hasFocus=false;setTimeout(function(){if(!node.d2l_hasFocus)D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-htmleditor-frosted",node)},0)},true);var focus=function(){D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.FocusByNode(node)};node.focus=focus;D2L.LP.Web.UI.Events.VisibilityManager.AddListener(node, function(isDisplayed){if(isDisplayed)htmlEditor.UpdateComponentVisibilityByNode(node)})}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-htmleditor-texteditor",function(node){node.d2l_control=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.TextEditor;if(!node.d2l_initialized){node.d2l_initialized=true;node.d2l_isDirty=false;node.d2l_files=[];node.d2l_files_queued=0}var controlWidth=node.getAttribute("data-d2l-width");var controlHeight=node.getAttribute("data-d2l-height");var footerNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-footer",node);var textAreaNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-textarea", node);var setSize=function(height,width){node.style.width=width;node.style.height=height;var controlRect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(node);var footerRect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(footerNode);textAreaNode.style.height=controlRect.height-footerRect.height-10+"px"};setSize(controlHeight,controlWidth);var resizeHandle=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-resize",node);var resizeSettings={Handle:resizeHandle,DisplayType:"hidden",GhostType:D2L.LP.Web.UI.Html.DragDrop.GhostType.OriginalShadow}; var onResize=D2L.LP.Web.UI.Html.DragDrop.MakeResizeableNode(node,resizeSettings,window,window);onResize.AddListener(function(size){setSize(size.height+"px",size.width+"px")});D2L.LP.Web.UI.Html.ChangeTracking.Trackable.StartTracking(textAreaNode);D2L.LP.Web.UI.Html.Dom.AddEventListener("change",textAreaNode,function(){node.d2l_isDirty=true})}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-htmleditor-noeditor",function(node){node.d2l_control=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.NoEditor;if(!node.d2l_initialized){node.d2l_initialized=true;node.d2l_files=[];node.d2l_files_queued=0}});D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-htmleditor-button",function(node){D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.Button.InitializeByNode(node)});D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-htmleditor-buttonmenuitem",function(node){D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.Button.InitializeByNode(node)}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-htmleditor-color-button",function(node){D2L.LP.Web.UI.Html.Aria.SetRole(node,"button");var title=D2L.LP.Web.UI.Html.Dom.GetAttribute(node,"title");if(title!=null&&title.length>0)D2L.LP.Web.UI.Html.Aria.SetAttribute(node,"label",title);D2L.LP.Web.UI.Common.Controls.Link.InstallClickable(node)}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-htmleditor-split-button",function(node){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.SplitButton;D2L.LP.Web.UI.Html.Aria.SetRole(node,"button");var title=D2L.LP.Web.UI.Html.Dom.GetAttribute(node,"title");if(title!=null&&title.length>0)D2L.LP.Web.UI.Html.Aria.SetAttribute(node,"label",title);D2L.LP.Web.UI.Common.Controls.Link.InstallClickable(node);var onClick=D2L.LP.Web.UI.Html.Dom.GetAttribute(node,"data-onclick");D2L.LP.Web.UI.Html.Dom.RemoveAttribute(node, "data-onclick");D2L.LP.Web.UI.Html.Dom.AddEventListener("click",node,function(){eval(onClick)});var iconNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-split-button-icon",node);var menuContainer=D2L.LP.Web.UI.Html.Dom.GetNextElementSibling(node);var menuItems=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-htmleditor-buttonmenuitem",menuContainer);var activeKey=null;var itemsData={};var registerMenuItemEvents=function(menuItemNode){var menuItemKey=menuItemNode.getAttribute("data-d2l-key"); menuItemNode.d2l_activeHandler=function(isActive){if(menuItemKey===node.getAttribute("data-d2l-key"))me.SetIsActiveByNode(node,isActive)};D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.Button.GetOnActiveChangeByNode(menuItemNode).AddListener(menuItemNode.d2l_activeHandler);menuItem.d2l_enabledHandler=function(isEnabled){if(menuItemKey===node.getAttribute("data-d2l-key"))me.SetIsEnabledByNode(node,isEnabled)};D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.Button.GetOnEnabledChangeByNode(menuItemNode).AddListener(menuItem.d2l_enabledHandler)}; for(var i=0;i<menuItems.length;i++){var menuItem=menuItems[i];var key=menuItem.getAttribute("data-d2l-key");var txtNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-buttonmenuitem-text",menuItem);var imgNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-buttonmenuitem-icon",menuItem);if(key!==undefined&&key!=null){itemsData[key]={className:imgNode.className.replace("d2l-htmleditor-buttonmenuitem-icon",""),key:key,src:imgNode.src,title:D2L.LP.Web.UI.Html.Dom.GetTextContent(txtNode)}; if(activeKey===null)activeKey=key}registerMenuItemEvents(menuItem)}node.d2l_itemsData=itemsData;if(activeKey===null)return;D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.SplitButton.UpdateByNode(node,activeKey)}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-htmleditor-symbol",function(node){var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditorComponents.SymbolAction.View;var listNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-symbol-list",node);var charNodes=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-htmleditor-symbol-char",listNode);var editId=new D2L.LP.Web.UI.Html.AbsoluteHtmlId(node.getAttribute("data-d2l-editId"));var installOnClick=function(charNode){D2L.LP.Web.UI.Common.Controls.Link.InstallClickable(charNode); D2L.LP.Web.UI.Html.Dom.AddEventListener("click",charNode,function(){var numCode=charNode.getAttribute("data-d2l-numcode");D2L.LP.Web.UI.Common.Controls.Edit.SetValue(editId,numCode);me.SetSelectedSymbolByNode(node,numCode)})};for(var i=0;i<charNodes.length;i++){var charNode=charNodes[i];installOnClick(charNode)}D2L.LP.Web.UI.Html.Dom.DispatchEvent("click",charNodes[0])}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-newwindow",function(node){var hasHref=D2L.LP.Web.UI.Html.Dom.HasAttribute(node,"href");if(!hasHref)return;node.target="_blank"}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-menuflyout-dropdown",function(node){var openFunction=D2L.LP.Web.UI.ObjectRepository.TryGet(node.id,"MenuFlyout.OpenFunction");var openFirstFunction=D2L.LP.Web.UI.ObjectRepository.TryGet(node.id,"MenuFlyout.OpenFirstFunction");var closeFunction=D2L.LP.Web.UI.ObjectRepository.TryGet(node.id,"MenuFlyout.CloseFunction");var contentsNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-menuflyout-dropdown-contents",node);if(contentsNode===null&&node.getAttribute("data-contextMenuId")!== null)D2L.LP.Web.UI.Desktop.Controls.MenuFlyout.InitContextMenu(node,openFunction,openFirstFunction,closeFunction);if(contentsNode!=null)D2L.LP.Web.UI.Desktop.Controls.MenuFlyout.Init(node,contentsNode,openFunction,openFirstFunction,closeFunction)});D2L.LP.Web.UI.Html.PartialRendering.AddClassNameToFocusIncludeList("d2l-menuflyout-link");D2L.LP.Web.UI.Html.PartialRendering.AddClassNameToFocusIncludeList("d2l-menuflyout");D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-search-simple-wc",function(node){D2L.LP.Web.UI.Desktop.Controls.SearchSimple.InitWc(node)}); D2L.LP.Web.UI.Html.PartialRendering.AddClassNameToFocusIncludeList("d2l-search-simple-wc-input"); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-time-selector",function(node){var me=D2L.LP.Web.UI.Desktop.Controls.TimeSelector;var timeSelectorData=$(node).data();var edit=D2L.LP.Web.UI.Html.Dom.GetFirstElementChild(node);var id=new D2L.LP.Web.UI.Html.AbsoluteHtmlId(edit.id);id.$().data(timeSelectorData);var data=id.$().data();var nodes=me.GetNodesByNode(edit);var useEditValue=true;$(nodes.container).on("d2l-time-selector-change",function(){var onChangeFunction=D2L.LP.Web.UI.ObjectRepository.TryGet(nodes.edit.id, "OnDateTimeChangeFunction");if(onChangeFunction)onChangeFunction.call(onChangeFunction)});var dateTimeParser=null;var getDateTimeParser=function(){if(dateTimeParser===null)dateTimeParser=D2L.LP.Globalization.Locale.GetDateTimeParser();return dateTimeParser};var closing=false;var selectedIndex=0;var lastGoodTime=me.GetTimeNodes(nodes);var refreshSelectedIndex=function(){var interval=data.timeinterval;if(interval===null||interval===undefined||interval<5||interval>60){data.timeinterval=30;interval=30}var time= getDateTimeParser().TryParseTime(nodes.edit.value);if(time===null||time===undefined)time=lastGoodTime;var hour=time.GetHour();var minute=time.GetMinute();if(data.enforcetimeintervals){var remainder=minute%interval;if(minute>0&&minute<interval)minute=interval;else if(remainder>0)minute+=interval-remainder;while(minute>=60){minute-=60;++hour}hour=Math.min(23,hour);time=new D2L.LocalTime(hour,minute,0)}lastGoodTime=time;me.SetTimeNodes(nodes,time);var index=hour*60/interval;index+=minute/interval;selectedIndex= Math.floor(index)};var selectSelectedItem=function(){var item=nodes.list.childNodes[selectedIndex];me.SetTimeNodes(nodes,item.d2l_time,false)};var updateSelectedItem=function(applyOffset){var selectedItem=null;for(var i=0;i<nodes.list.childNodes.length;i++){var item=nodes.list.childNodes[i];if(i===selectedIndex){item.className="d2l-time-selector-listitem-selected";selectedItem=item;D2L.LP.Web.UI.Html.Dom.SetAttribute(nodes.edit,"aria-activedescendant",item.id);D2L.LP.Web.UI.Html.Dom.SetAttribute(nodes.floatingContainer, "aria-activedescendant",item.id)}else item.className=""}if(selectedItem===null){D2L.LP.Web.UI.Html.Dom.SetAttribute(nodes.edit,"aria-activedescendant","");D2L.LP.Web.UI.Html.Dom.SetAttribute(nodes.floatingContainer,"aria-activedescendant","");return}var divBox=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(nodes.floatingContainer);var itemBox=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(selectedItem);var offset=applyOffset?(divBox.height-itemBox.height)/2:0;if(itemBox.bottom>divBox.bottom)nodes.floatingContainer.scrollTop+= itemBox.bottom-divBox.bottom+offset;else if(itemBox.top<divBox.top)nodes.floatingContainer.scrollTop-=divBox.top-itemBox.top-offset};var close=function(doDelay,ignoreFocus){closing=true;setTimeout(function(){D2L.LP.Web.UI.Desktop.Controls.FloatingContainer.CloseNode(nodes.floatingContainer,ignoreFocus);setTimeout(function(){closing=false},0);D2L.LP.Web.UI.Html.Dom.SetAttribute(nodes.edit,"aria-expanded","false");D2L.LP.Web.UI.Html.Dom.SetAttribute(nodes.floatingContainer,"aria-hidden","true")},doDelay? 200:0)};var open=function(){if(isOpen()||closing)return;me.BuildSelectList(nodes,data.timeinterval);refreshSelectedIndex();D2L.LP.Web.UI.Desktop.Controls.FloatingContainer.OpenNode(nodes.floatingContainer,id,{AttachToBody:true,AutoCloseExclusions:[edit],FocusOnOpen:false,Position:D2L.LP.Web.UI.Html.Style.OverlayPosition.Bottom,TabIndex:-1});updateSelectedItem(true);nodes.edit.focus();D2L.LP.Web.UI.Html.Dom.SetAttribute(nodes.edit,"aria-expanded","true");D2L.LP.Web.UI.Html.Dom.SetAttribute(nodes.floatingContainer, "aria-hidden","false")};var isOpen=function(){return D2L.LP.Web.UI.Desktop.Controls.FloatingContainer.IsOpenNode(nodes.floatingContainer)};D2L.LP.Web.UI.Html.Dom.AddEventListener("focus",nodes.edit,open);D2L.LP.Web.UI.Html.Dom.AddEventListener("blur",nodes.edit,function(){refreshSelectedIndex();D2L.LP.Web.UI.Html.Dom.SetAttribute(nodes.edit,"aria-expanded","false");D2L.LP.Web.UI.Html.Dom.SetAttribute(nodes.floatingContainer,"aria-hidden","true")});D2L.LP.Web.UI.Html.Dom.AddEventListener("click",nodes.edit, open);D2L.LP.Web.UI.Html.Dom.AddEventListener("click",nodes.floatingContainer,function(e){var eventTarget=D2L.LP.Web.UI.Html.Dom.GetEventTargetElement(e);if(eventTarget&&eventTarget.tagName.toLowerCase()=="li"){selectedIndex=eventTarget.d2l_index;selectSelectedItem();close(false,false)}});var keys=D2L.LP.Web.UI.Html.Dom.KeyPressEventArgs.Key;D2L.LP.Web.UI.Html.Dom.AddKeyPressEventListener(nodes.edit,function(kpArgs){var key=kpArgs.GetKey();if(key==keys.ArrowUp||key==keys.ArrowDown){if(!isOpen())open(); else{var maxIndex=60/data.timeinterval*24-1;if(key==keys.ArrowUp){--selectedIndex;if(selectedIndex==-1)selectedIndex=maxIndex}else{++selectedIndex;if(selectedIndex==maxIndex+1)selectedIndex=0}updateSelectedItem(false)}useEditValue=false;D2L.LP.Web.UI.Html.Dom.CancelEventDefaultBehaviour(kpArgs.GetEventObject())}else if(key==keys.Enter){useEditValue?refreshSelectedIndex():selectSelectedItem();D2L.LP.Web.UI.Html.Dom.CancelEventDefaultBehaviour(kpArgs.GetEventObject());close(false,false)}else if(key== keys.Escape||key==keys.Tab){close(false,true);nodes.edit.focus()}else if(key!=keys.Shift&&key!=keys.Control&&key!=keys.PageUp&&key!=keys.PageDown&&key!=keys.End&&key!=keys.Home&&key!=keys.ArrowLeft&&key!=keys.ArrowRight){close(false,false);useEditValue=true}});D2L.LP.Web.UI.Html.Dom.SetAttribute(nodes.edit,"aria-haspopup","true");D2L.LP.Web.UI.Html.Dom.SetAttribute(nodes.edit,"aria-owns",nodes.floatingContainer.id);D2L.LP.Web.UI.Html.Dom.SetAttribute(nodes.edit,"role","combobox");D2L.LP.Web.UI.Html.Dom.SetAttribute(nodes.edit, "aria-autocomplete","list");D2L.LP.Web.UI.Html.Dom.SetAttribute(nodes.edit,"aria-expanded","false");D2L.LP.Web.UI.Html.Dom.SetAttribute(nodes.edit,"tabindex","0");D2L.LP.Web.UI.Html.Dom.SetAttribute(nodes.floatingContainer,"aria-hidden","true")});D2L.LP.Web.UI.Html.PartialRendering.AddClassNameToFocusIncludeList("d2l-time-selector"); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-updownvote-input",function(node){var me=D2L.LP.Web.UI.Desktop.Controls.UpDownVoteInput;var handle=me.InitHandle(node);for(var i=0;i<handle.labels.length;i++){var label=handle.labels[i];var input=label.getElementsByTagName("input")[0];D2L.LP.Web.UI.Html.Dom.AddEventListener("click",label,function(index){return function(e){D2L.LP.Web.UI.Html.Dom.CancelEventBubble(e);D2L.LP.Web.UI.Html.Dom.CancelEventDefaultBehaviour(e);me.SetSelected(handle,index,true)}}(i)); D2L.LP.Web.UI.Html.Dom.AddEventListener("click",input,function(index){return function(e){D2L.LP.Web.UI.Html.Dom.CancelEventBubble(e);me.SetSelected(handle,index,false)}}(i))}});D2L.LP.Web.UI.Html.PartialRendering.AddClassNameToFocusIncludeList("d2l-updownvote-input"); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-tool-areas",function(node){var isRtl=D2L.LP.Globalization.Locale.GetTextFormatDescriptor().TextDirection==D2L.LP.Globalization.Formatting.Text.TextDirection.RightToLeft;var selected=null;var bar=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-tool-areas-bar",node);var applyBar=function(link,first){var item=link.parentNode;var prev=D2L.LP.Web.UI.Html.Dom.GetPreviousElementSibling(item);var pos=item.offsetLeft;var itemWidth=$(item).width();var width= itemWidth-(prev!==null?30:15);var properties={"width":width+"px"};if(isRtl)properties.right=$(item.offsetParent).width()-(pos+itemWidth)+(prev!==null?15:0);else properties.left=pos+(prev!==null?15:0);if(!first)$(bar).animate(properties,100);else $(bar).css(properties).show()};var over=false;var newSelection=false;var onOver=function(){if(newSelection)return;over=true;applyBar(this,false)};var onOut=function(){if(newSelection)return;over=false;setTimeout(function(){if(!over)applyBar(selected,false)}, 300)};$(node).find(".d2l-tool-areas-link").each(function(index,item){if($(item).parent().hasClass("d2l-tool-areas-item-selected")){selected=item;applyBar(selected,true);if(D2L.LP.Web.UI.Daylight.IsEnabled()){var offset=selected.offsetLeft-($(node).width()/2-$(item).width()/2);if(isRtl)offset=-offset;node.scrollDistance&&node.scrollDistance(offset)}}$(item).hover(onOver,onOut).focus(onOver).blur(onOut).click(function(){newSelection=true})})});D2L.LP.Web.UI.Html.Dom.AddClassDestructor("d2l-edit",function(node){D2L.LP.Web.UI.Html.ChangeTracking.Trackable.StopTracking(node)}); D2L.LP.Web.UI.Html.Dom.AddClassDestructor("d2l-select",function(node){D2L.LP.Web.UI.Html.ChangeTracking.Trackable.StopTracking(node)}); D2L.LP.Web.UI.Html.Dom.AddClassDestructor("d2l-htmleditor-wysiwyg",function(node){if(node.d2l_onBeforeSubmitHandle!==undefined)D2L.LP.Web.UI.Common.Controls.Form.OnBeforeSubmit.RemoveListener(node.d2l_onBeforeSubmitHandle);var me=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor;var textAreaId=me.GetTextAreaId(node);var core=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core;core.CleanUp(textAreaId)}); D2L.LP.Web.UI.Html.Dom.AddClassDestructor("d2l-htmleditor-texteditor",function(node){var textAreaNode=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-htmleditor-textarea",node);D2L.LP.Web.UI.Html.ChangeTracking.Trackable.StopTracking(textAreaNode)});D2L.LP.Web.UI.Html.DragDrop={}; D2L.LP.Web.UI.Html.DragDrop={Install:function(id,ddType,draggableSettings,droppableSettings){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());D2L.LP.Web.UI.Html.DragDrop.InstallNode(node,ddType,draggableSettings,droppableSettings)},InstallNode:function(node,ddType,draggableSettings,droppableSettings){if(ddType==D2L.LP.Web.UI.Html.DragDrop.DragDropType.Draggable||ddType==D2L.LP.Web.UI.Html.DragDrop.DragDropType.DraggableDroppable)D2L.LP.Web.UI.Html.DragDrop.MakeDraggableNode(node,draggableSettings); if(ddType==D2L.LP.Web.UI.Html.DragDrop.DragDropType.Droppable||ddType==D2L.LP.Web.UI.Html.DragDrop.DragDropType.DraggableDroppable)D2L.LP.Web.UI.Html.DragDrop.MakeDroppableNode(node,droppableSettings)},CreateGhost:function(ghostType,node,initialPos,win){var ghost;if(ghostType==D2L.LP.Web.UI.Html.DragDrop.GhostType.OriginalShadow){ghost=win.document.createElement("div");ghost.className="d2l-dragdrop-shadow"}else if(ghostType==D2L.LP.Web.UI.Html.DragDrop.GhostType.CloneShadow){var clearFloat=win.document.createElement("div"); clearFloat.className="d2l-clear";var ghostWrapper=win.document.createElement("div");var clonedNode=node.cloneNode(true);clonedNode.style.margin=0;ghostWrapper.appendChild(clonedNode);ghostWrapper.appendChild(clearFloat);D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-dragdrop-clone-shadow",ghostWrapper);ghost=ghostWrapper}ghost.style.left=initialPos.left+"px";ghost.style.top=initialPos.top+"px";ghost.style.width=initialPos.width+1+"px";ghost.style.height=initialPos.height+1+"px";ghost.style.zIndex=win.D2L.LP.Web.UI.Desktop.Controls.Shim.GetZIndex(); win.document.body.appendChild(ghost);return ghost},RemoveDrag:function(dragObject){D2L.LP.Web.UI.Html.Dom.RemoveElement(dragObject.GetDragNode())}};D2L.LP.Web.UI.Html.DragDrop.DragDropEffect={None:0,Move:1};D2L.LP.Web.UI.Html.DragDrop.DragObject=D2L.Class.Create({Construct:function(dragNode,draggableSettings){this.m_dragNode=dragNode;this.m_draggableSettings=draggableSettings},GetDragNode:function(){return this.m_dragNode},GetDraggableSettings:function(){return this.m_draggableSettings}}); D2L.LP.Web.UI.Html.DragDrop.DropEffect={None:0,Move:1,Swap:2}; D2L.LP.Web.UI.Html.DragDrop.DragDropManager={RefreshDroppables:function(){var nodes=D2L.LP.Web.UI.Html.DragDrop.DragDropManager.m_droppableNodes;for(var i=0;i<nodes.length;i++)D2L.LP.Web.UI.Html.DragDrop.DragDropManager.RefreshDroppable(nodes[i])},RefreshDroppable:function(node){node.m_rect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(node)},AddDroppable:function(node){D2L.LP.Web.UI.Html.DragDrop.DragDropManager.m_droppableNodes.push(node)},SetDrag:function(dragObject){D2L.LP.Web.UI.Html.DragDrop.DragDropManager.SetIsDragging(true); D2L.LP.Web.UI.Html.DragDrop.DragDropManager.m_drag=dragObject},GetDrag:function(){return D2L.LP.Web.UI.Html.DragDrop.DragDropManager.m_drag},GetDragParam:function(){return D2L.LP.Web.UI.Html.DragDrop.DragDropManager.m_drag.GetDraggableSettings().GetParam()},GetDragKey:function(){return D2L.LP.Web.UI.Html.DragDrop.DragDropManager.m_drag.GetDraggableSettings().GetKey()},IsDragging:function(){return D2L.LP.Web.UI.Html.DragDrop.DragDropManager.m_isDragging},SetIsDragging:function(isDragging){D2L.LP.Web.UI.Html.DragDrop.DragDropManager.m_isDragging= isDragging}};D2L.LP.Web.UI.Html.DragDrop.DragDropManager.m_drag=null;D2L.LP.Web.UI.Html.DragDrop.DragDropManager.m_isDragging=false;D2L.LP.Web.UI.Html.DragDrop.DragDropManager.m_droppableNodes=[];D2L.LP.Web.UI.Html.DragDrop.DragDropType={Draggable:0,Droppable:1,DraggableDroppable:2}; D2L.LP.Web.UI.Html.DragDrop.DraggableSettings=D2L.Class.Create({Construct:function(){this.m_key=null;this.m_handleNode=null;this.m_handleExceptions=[];this.m_ghostType=D2L.LP.Web.UI.Html.DragDrop.GhostType.CloneShadow;this.m_param=null;this.m_isDelayed=true;this.m_isAutoScroll=true;this.m_dragDropEffect=D2L.LP.Web.UI.Html.DragDrop.DragDropEffect.None;this.m_dragStartEvent=new D2L.LP.Web.UI.Events.Event;this.m_dragEndEvent=new D2L.LP.Web.UI.Events.Event;this.m_dragGroup=null},_deserialize:function(deserializer){this.m_key= deserializer.GetMember("Key");this.m_param=deserializer.GetMember("Param");this.m_dragGroup=deserializer.GetMember("DragGroup");var dragStartFunction=deserializer.GetMember("OnDragStartFunction");if(dragStartFunction!=null)this.GetDragStartEvent().AddListener(dragStartFunction)},AddHandleException:function(node){this.m_handleExceptions.push(node)},GetIsAutoScroll:function(){return this.m_isAutoScroll},GetDragDropEffect:function(){return this.m_dragDropEffect},GetDragGroup:function(){return this.m_dragGroup}, GetDragStartEvent:function(){return this.m_dragStartEvent},GetDragEndEvent:function(){return this.m_dragEndEvent},GetGhostType:function(){return this.m_ghostType},GetHandle:function(){return this.m_handleNode},GetHandleExceptions:function(){return this.m_handleExceptions},GetKey:function(){return this.m_key},GetParam:function(){return this.m_param},IsDelayed:function(){return this.m_isDelayed},SetIsDelayed:function(isDelayed){this.m_isDelayed=isDelayed},SetHandle:function(node){this.m_handleNode= node},SetDragGroup:function(groupName){this.m_dragGroup=groupName},SetGhostType:function(ghostType){this.m_ghostType=ghostType},SetIsAutoScroll:function(autoScroll){this.m_isAutoScroll=autoScroll},SetDragDropEffect:function(dragDropEffect){this.m_dragDropEffect=dragDropEffect},SetKey:function(key){this.m_key=key},SetParam:function(param){this.m_param=param}}); D2L.LP.Web.UI.Html.DragDrop.DroppableSettings=D2L.Class.Create({Construct:function(){this.m_dropEvent=new D2L.LP.Web.UI.Events.Event;this.m_dragInEvent=new D2L.LP.Web.UI.Events.Event;this.m_dragOutEvent=new D2L.LP.Web.UI.Events.Event;this.m_dragOverEvent=new D2L.LP.Web.UI.Events.Event;this.m_dropEffect=D2L.LP.Web.UI.Html.DragDrop.DropEffect.None;this.m_eventPropagation=true;this.m_padding={top:0,left:0,right:0,bottom:0};this.m_acceptableDragGroups=[]},_deserialize:function(deserializer){var dropFunction= deserializer.GetMember("OnDropFunction");if(dropFunction!=null)this.GetDropEvent().AddListener(dropFunction);var dragInFunction=deserializer.GetMember("OnDragInFunction");if(dragInFunction!=null)this.GetDragInEvent().AddListener(dragInFunction);var dragOutFunction=deserializer.GetMember("OnDragOutFunction");if(dragOutFunction!=null)this.GetDragOutEvent().AddListener(dragOutFunction);this.m_dropEffect=deserializer.GetMember("DropEffect");this.m_eventPropagation=deserializer.GetMember("EventPropagation")}, AddAcceptableDragGroup:function(groupName){this.m_acceptableDragGroups.push(groupName)},GetAcceptableDragGroups:function(){return this.m_acceptableDragGroups},GetDropEvent:function(){return this.m_dropEvent},GetDragInEvent:function(){return this.m_dragInEvent},GetDragOutEvent:function(){return this.m_dragOutEvent},GetDragOverEvent:function(){return this.m_dragOverEvent},GetPadding:function(){return this.m_padding},GetDropEffect:function(){return this.m_dropEffect},GetEventPropagation:function(){return this.m_eventPropagation}, SetAcceptableDragGroups:function(acceptableDragGroups){this.m_acceptableDragGroups=acceptableDragGroups},SetDropEffect:function(dropEffect){this.m_dropEffect=dropEffect},SetPadding:function(padding){this.m_padding=padding},SetEventPropagation:function(propagate){this.m_eventPropagation=propagate}});D2L.LP.Web.UI.Html.DragDrop.GhostType={OriginalShadow:1,CloneShadow:2}; D2L.LP.Web.UI.Html.DragDrop.MakeDraggableNode=function(node,draggableSettings,nodeWin,outerWin){if(draggableSettings===undefined)draggableSettings=new D2L.LP.Web.UI.Html.DragDrop.DraggableSettings;nodeWin=nodeWin||window;outerWin=outerWin||window;var handle=draggableSettings.GetHandle()||node;D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-dragdrop-draggable",handle);var initialCursorPos=null;var initialPos=null;var newPos=null;var shadow=null;var scrollTopTimeout;var scrollTopInstalled;var scrollBottomTimeout; var scrollBottomInstalled;var scrollLeftTimeout;var scrollLeftInstalled;var scrollRightTimeout;var scrollRightInstalled;var scrollSpeed=10;var scrollInterval=50;var scrollZone=40;var clearHorizontalAutoScroll=function(){scrollLeftInstalled=false;scrollRightInstalled=false;clearTimeout(scrollLeftTimeout);clearTimeout(scrollRightTimeout)};var clearVerticalAutoScroll=function(){scrollTopInstalled=false;scrollBottomInstalled=false;clearTimeout(scrollTopTimeout);clearTimeout(scrollBottomTimeout)};var clearAutoScroll= function(){clearHorizontalAutoScroll();clearVerticalAutoScroll()};var MouseMove=function(evt){D2L.LP.Web.UI.Html.Dom.CancelEventDefaultBehaviour(evt);if(initialCursorPos===null||initialPos===null||shadow===null)return;var newCursorPos=D2L.LP.Web.UI.Html.Dom.GetMousePosition(outerWin,evt);newPos={x:initialPos.left+newCursorPos.x-initialCursorPos.x,y:initialPos.top+newCursorPos.y-initialCursorPos.y};var pageSize=D2L.LP.Web.UI.Html.Dom.GetPageSize(outerWin);var viewport=D2L.LP.Web.UI.Html.Dom.GetViewportSize(outerWin); var dialogBox=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(shadow);var scroll=D2L.LP.Web.UI.Html.Dom.GetScrollPosition(outerWin);if(newPos.x+dialogBox.width>pageSize.width)newPos.x=pageSize.width-dialogBox.width;if(newPos.y+dialogBox.height>viewport.height+scroll.top)newPos.y=viewport.height+scroll.top-dialogBox.height;if(newPos.x<0)newPos.x=0;if(newPos.y<scroll.top)newPos.y=scroll.top;shadow.style.left=newPos.x+"px";shadow.style.top=newPos.y+"px";if(draggableSettings.GetIsAutoScroll()){var viewPortSize= D2L.LP.Web.UI.Html.Dom.GetViewportSize();var scrollPosition=D2L.LP.Web.UI.Html.Dom.GetScrollPosition();var topDelta=newCursorPos.y-scrollPosition.top;var bottomDelta=scrollPosition.top+viewPortSize.height-newCursorPos.y;if(topDelta<scrollZone){var scrollTop=function(){if(D2L.LP.Web.UI.Html.Dom.GetScrollPosition().top>0){scrollTopInstalled=true;scrollTopTimeout=setTimeout(function(){scrollBy(0,-scrollSpeed);shadow.style.top=shadow.offsetTop-scrollSpeed+"px";scrollTop()},scrollInterval)}};if(!scrollTopInstalled)scrollTop()}else if(bottomDelta< scrollZone){var scrollBottom=function(){scrollBottomInstalled=true;scrollBottomTimeout=setTimeout(function(){scrollBy(0,scrollSpeed);shadow.style.top=shadow.offsetTop+scrollSpeed+"px";scrollBottom()},scrollInterval)};if(!scrollBottomInstalled)scrollBottom()}else clearVerticalAutoScroll();var leftDelta=newCursorPos.x-scrollPosition.left;var rightDelta=scrollPosition.left+viewPortSize.width-newCursorPos.x;if(leftDelta<scrollZone){var scrollLeft=function(){if(D2L.LP.Web.UI.Html.Dom.GetScrollPosition().left> 0){scrollLeftInstalled=true;scrollLeftTimeout=setTimeout(function(){scrollBy(-scrollSpeed,0);shadow.style.left=shadow.offsetLeft-scrollSpeed+"px";scrollLeft()},scrollInterval)}};if(!scrollLeftInstalled)scrollLeft()}else if(rightDelta<scrollZone){var scrollRight=function(){scrollRightInstalled=true;scrollRightTimeout=setTimeout(function(){scrollBy(scrollSpeed,0);shadow.style.left=shadow.offsetLeft+scrollSpeed+"px";scrollRight()},scrollInterval)};if(!scrollRightInstalled)scrollRight()}else clearHorizontalAutoScroll()}}; var Finish=function(e){D2L.LP.Web.UI.Html.Dom.CancelEventDefaultBehaviour(e);outerWin.D2L.LP.Web.UI.Events.OnMouseMove.RemoveListener(MouseMove);outerWin.D2L.LP.Web.UI.Events.OnMouseUp.RemoveListener(Finish);shadow.parentNode.removeChild(shadow);if(draggableSettings.GetDragDropEffect()==D2L.LP.Web.UI.Html.DragDrop.DragDropEffect.Move){node.style.left=newPos.x+"px";node.style.top=newPos.y+"px";node.style.display="block"}D2L.LP.Web.UI.Html.DragDrop.DragDropManager.SetIsDragging(false);clearAutoScroll(); draggableSettings.GetDragEndEvent().Trigger(e)};var Start=function(evt){D2L.LP.Web.UI.Html.Dom.CancelEventDefaultBehaviour(evt);var target=D2L.LP.Web.UI.Html.Dom.GetEventTargetElement(evt);var handleExceptions=draggableSettings.GetHandleExceptions();for(var i=0;i<handleExceptions.length;i++)if(handleExceptions[i]==target||$.contains(handleExceptions[i],target))return;var dragObject=new D2L.LP.Web.UI.Html.DragDrop.DragObject(node,draggableSettings);D2L.LP.Web.UI.Html.DragDrop.DragDropManager.SetDrag(dragObject); D2L.LP.Web.UI.Html.Dom.CancelEventDefaultBehaviour(evt);initialPos=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(node);newPos={x:initialPos.left,y:initialPos.top};initialCursorPos=D2L.LP.Web.UI.Html.Dom.GetMousePosition(nodeWin,evt);initialCursorPos={x:initialCursorPos.x+(nodeWin!=outerWin?initialPos.left:0),y:initialCursorPos.y+(nodeWin!=outerWin?initialPos.top:0)};shadow=D2L.LP.Web.UI.Html.DragDrop.CreateGhost(draggableSettings.GetGhostType(),node,initialPos,outerWin);if(draggableSettings.GetGhostType()== D2L.LP.Web.UI.Html.DragDrop.GhostType.OriginalShadow)node.style.display="none";setTimeout(function(){D2L.LP.Web.UI.Html.DragDrop.DragDropManager.RefreshDroppables()});outerWin.D2L.LP.Web.UI.Events.OnMouseMove.AddListener(MouseMove);outerWin.D2L.LP.Web.UI.Events.OnMouseUp.AddListener(Finish);draggableSettings.GetDragStartEvent().Trigger(evt)};var BeforeStart=function(clickEvt){var cancelDrag=false;D2L.LP.Web.UI.Html.Dom.CancelEventDefaultBehaviour(clickEvt);var onDownCursorPos=D2L.LP.Web.UI.Html.Dom.GetMousePosition(window, clickEvt);if(draggableSettings.IsDelayed()){var moveThreshold=3;var moved=false;var MoveTimer=function(e){var onMoveCursorPos=D2L.LP.Web.UI.Html.Dom.GetMousePosition(window,e);if(Math.abs(onMoveCursorPos.y-onDownCursorPos.y)>moveThreshold||Math.abs(onMoveCursorPos.x-onDownCursorPos.x)>moveThreshold){outerWin.D2L.LP.Web.UI.Events.OnMouseMove.RemoveListener(MoveTimer);outerWin.D2L.LP.Web.UI.Events.OnMouseUp.RemoveListener(UpTimer);if(!cancelDrag)Start(clickEvt);moved=true}};var UpTimer=function(e){D2L.LP.Web.UI.Events.OnMouseMove.RemoveListener(MoveTimer); D2L.LP.Web.UI.Events.OnMouseUp.RemoveListener(UpTimer);cancelDrag=true;if(!moved)if(clickEvt.changedTouches!==undefined||clickEvt.targetTouches!==undefined)D2L.LP.Web.UI.Html.Dom.DispatchEvent("click",D2L.LP.Web.UI.Html.Dom.GetEventTargetElement(clickEvt));return false};outerWin.D2L.LP.Web.UI.Events.OnMouseMove.AddListener(MoveTimer);outerWin.D2L.LP.Web.UI.Events.OnMouseUp.AddListener(UpTimer)}else Start(clickEvt)};var BeforeStartTouch=function(touchEvt){var isDragEvent=true;var touchMoveTimer=function(){isDragEvent= false};var touchUpTimer=function(){isDragEvent=false};setTimeout(function(){D2L.LP.Web.UI.Events.OnMouseMove.RemoveListener(touchMoveTimer);D2L.LP.Web.UI.Events.OnMouseUp.RemoveListener(touchUpTimer);if(isDragEvent)BeforeStart(touchEvt)},50);outerWin.D2L.LP.Web.UI.Events.OnMouseMove.AddListener(touchMoveTimer);outerWin.D2L.LP.Web.UI.Events.OnMouseUp.AddListener(touchUpTimer)};if(handle.m_dragInstalled)return;D2L.LP.Web.UI.Html.Dom.AddEventListener("touchstart",handle,BeforeStartTouch);D2L.LP.Web.UI.Html.Dom.AddEventListener("mousedown", handle,BeforeStart);handle.m_dragInstalled=true}; D2L.LP.Web.UI.Html.DragDrop.MakeDroppableNode=function(node,droppableSettings){if(droppableSettings===undefined)droppableSettings=new D2L.LP.Web.UI.Html.DragDrop.DroppableSettings;var isDragIn=false;D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-dragdrop-droppable",node);var IsOverNode=function(targetDroppableNode,targetEvent,forgivenessPadding){var cursorPos=D2L.LP.Web.UI.Html.Dom.GetMousePosition(window,targetEvent);return cursorPos.x>=targetDroppableNode.m_rect.left-forgivenessPadding.left&&cursorPos.x<= targetDroppableNode.m_rect.right+forgivenessPadding.right&&cursorPos.y>=targetDroppableNode.m_rect.top-forgivenessPadding.top&&cursorPos.y<=targetDroppableNode.m_rect.bottom+forgivenessPadding.bottom};var IsOver=function(evt){if(node.m_rect===undefined||!D2L.LP.Web.UI.Html.DragDrop.DragDropManager.IsDragging())return false;var forgivenessPadding=droppableSettings.GetPadding();var acceptableDragGroups=droppableSettings.GetAcceptableDragGroups();var dragObject=D2L.LP.Web.UI.Html.DragDrop.DragDropManager.GetDrag(); var dragGroup=dragObject.GetDraggableSettings().GetDragGroup();if(acceptableDragGroups.length>0){if(dragGroup==null)return false;var containsGroup=false;for(var i=0;i<acceptableDragGroups.length;i++)if(acceptableDragGroups[i]===dragGroup)containsGroup=true;if(!containsGroup)return false}var propagateEvent=droppableSettings.GetEventPropagation();if(!propagateEvent){var descendantDroppables=D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-dragdrop-droppable",node);for(var i=0;i<descendantDroppables.length;i++)if(IsOverNode(descendantDroppables[i], evt,forgivenessPadding))return false}var cursorPos=D2L.LP.Web.UI.Html.Dom.GetMousePosition(window,evt);var isOverResult=IsOverNode(node,evt,forgivenessPadding);if(isOverResult){var mouseDelta={topDelta:cursorPos.y-node.m_rect.top,rightDelta:node.m_rect.right-cursorPos.x,bottomDelta:node.m_rect.bottom-cursorPos.y,leftDelta:cursorPos.x-node.m_rect.left,nodeHeight:node.m_rect.height};droppableSettings.GetDragOverEvent().Trigger(dragObject,mouseDelta)}return isOverResult};var MouseUp=function(evt){if(isDragIn){var dragObject= D2L.LP.Web.UI.Html.DragDrop.DragDropManager.GetDrag();if(droppableSettings.GetDropEffect()==D2L.LP.Web.UI.Html.DragDrop.DropEffect.Move)node.appendChild(dragObject.GetDragNode());else if(droppableSettings.GetDropEffect()==D2L.LP.Web.UI.Html.DragDrop.DropEffect.Swap)D2L.LP.Web.UI.Html.Dom.SwapElements(node,dragObject.GetDragNode());droppableSettings.GetDropEvent().Trigger(dragObject)}};var MouseOut=function(evt){var dragObject=D2L.LP.Web.UI.Html.DragDrop.DragDropManager.GetDrag();isDragIn=false;droppableSettings.GetDragOutEvent().Trigger(dragObject)}; var MouseIn=function(evt){var dragObject=D2L.LP.Web.UI.Html.DragDrop.DragDropManager.GetDrag();isDragIn=true;droppableSettings.GetDragInEvent().Trigger(dragObject)};D2L.LP.Web.UI.Events.OnMouseUp.AddListener(MouseUp);if(node.m_dropInstalled)return;var mouseIn=false;var BeforeMouseMove=function(evt){if(IsOver(evt)){if(!mouseIn){mouseIn=true;MouseIn(evt)}}else if(mouseIn){mouseIn=false;MouseOut(evt)}};D2L.LP.Web.UI.Html.DragDrop.DragDropManager.AddDroppable(node);D2L.LP.Web.UI.Events.OnMouseMove.AddListener(BeforeMouseMove); node.m_dropInstalled=true}; D2L.LP.Web.UI.Html.DragDrop.MakeResizeableNode=function(node,settings,nodeWin,outerWin){var ghost;var initialPos;var initialMousePos;var newWidth=200;var newHeight=200;var maxWidth=500;var maxHeight=500;var resizeEvent=new D2L.LP.Web.UI.Events.Event;var MouseMove=function(evt){D2L.LP.Web.UI.Html.Dom.CancelEventDefaultBehaviour(evt);var newMousePos=D2L.LP.Web.UI.Html.Dom.GetMousePosition(outerWin,evt);newWidth=Math.min(Math.max(initialPos.width+newMousePos.x-initialMousePos.x,200),maxWidth);newHeight= Math.min(Math.max(initialPos.height+newMousePos.y-initialMousePos.y,200),maxHeight);ghost.style.width=newWidth+"px";ghost.style.height=newHeight+"px"};var Finish=function(){outerWin.D2L.LP.Web.UI.Events.OnMouseMove.RemoveListener(MouseMove);outerWin.D2L.LP.Web.UI.Events.OnMouseUp.RemoveListener(Finish);ghost.parentNode.removeChild(ghost);if(settings.DisplayType=="none")node.style.display="";else{node.style.visibility="";settings.Handle.style.visibility=""}resizeEvent.Trigger({width:newWidth,height:newHeight}); node.style.display="block"};var Start=function(evt){D2L.LP.Web.UI.Html.Dom.CancelEventDefaultBehaviour(evt);initialPos=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(node);newWidth=initialPos.width;newHeight=initialPos.height;initialMousePos=D2L.LP.Web.UI.Html.Dom.GetMousePosition(nodeWin,evt);initialMousePos={x:initialMousePos.x+(outerWin!=nodeWin?initialPos.left:0),y:initialMousePos.y+(outerWin!=nodeWin?initialPos.top:0)};var scroll=D2L.LP.Web.UI.Html.Dom.GetScrollPosition(outerWin);var viewport=D2L.LP.Web.UI.Html.Dom.GetViewportSize(outerWin); maxWidth=scroll.left+viewport.width-initialPos.left-20;maxHeight=scroll.top+viewport.height-initialPos.top-20;ghost=D2L.LP.Web.UI.Html.DragDrop.CreateGhost(D2L.LP.Web.UI.Html.DragDrop.GhostType.OriginalShadow,node,initialPos,outerWin);ghost.style.cursor="nw-resize";if(settings.DisplayType=="none")node.style.display="none";else{node.style.visibility="hidden";settings.Handle.style.visibility="hidden"}outerWin.D2L.LP.Web.UI.Events.OnMouseMove.AddListener(MouseMove);outerWin.D2L.LP.Web.UI.Events.OnMouseUp.AddListener(Finish)}; if(settings.Handle.m_resizeInstalled)return;D2L.LP.Web.UI.Html.Dom.AddEventListener("mousedown",settings.Handle,Start);D2L.LP.Web.UI.Html.Dom.AddEventListener("touchstart",settings.Handle,Start);settings.Handle.m_resizeInstalled=true;return resizeEvent};D2L.LP.Web.UI.Files={}; D2L.LP.Web.UI.Files.File=D2L.Class.Create({Construct:function(id,fileSystemType,name,size,previewUrl){this.m_id=id;this.m_fileSystemType=fileSystemType;this.m_name=name;this.m_size=size;this.m_previewUrl=previewUrl||""},_deserialize:function(deserializer){},_serialize:function(serializer){serializer.AddMember("FileSystemType",this.m_fileSystemType);serializer.AddMember("Id",this.m_id)},GetFileSystemType:function(){return this.m_fileSystemType},GetId:function(){return this.m_id},GetName:function(){return this.m_name}, GetSize:function(){return this.m_size},GetPreviewUrl:function(){return this.m_previewUrl}});D2L.LP.Web.UI.Html.Files={}; D2L.LP.Web.UI.Html.Files.FileUpload={Upload:function(uploadLocation,files,params){var me=D2L.LP.Web.UI.Html.Files.FileUpload;var uploadStatus=D2L.LP.Web.UI.Html.Files.FileUpload.Status;var errorsNode;var progressNode;var progressFileNode;var progressFileNodes;if(params.IsStatusEnabled){if(progressNode===undefined||errorsNode===undefined){errorsNode=uploadStatus.GetErrorsContainerNode();progressNode=uploadStatus.GetProgressContainerNode()}uploadStatus.RemoveErrorMessages(errorsNode)}var isUploading= false;var uploadHandle=null;var fileNumber=0;var raiseError=function(errorNumber){if(params.IsStatusEnabled)uploadStatus.AddErrorMessage(errorsNode,params.ErrorMessages[errorNumber-1]);params.OnError.call(params.OnError,errorNumber)};var removeAllProgressFiles=function(){if(params.IsStatusEnabled){for(var k=0;k<progressFileNodes.length;k++)uploadStatus.RemoveFile(progressFileNodes[k]);uploadStatus.SetIsProgressContainerVisible(progressNode,false)}};var resetUpload=function(){isUploading=false;uploadHandle= null};if(!params.IsMultipleAllowed&&files.length>1){raiseError(1);return}for(var i=0;i<files.length;i++){if(files[i].name.length>params.MaxFileNameLength){raiseError(7);return}if(!me.IsExtensionValid(files[i].name,params.Extensions,params.RestrictedExtensions)){raiseError(2);return}if(params.MaxFileSize>0&&files[i].size>params.MaxFileSize){raiseError(3);return}if(!me.IsFileNameValid(files[i].name)){raiseError(5);return}if(files[i].size===0){raiseError(6);return}}var requestParams={BytesPerSlice:params.BytesPerSlice, OnFileStarted:function(fileName){if(params.IsStatusEnabled){progressFileNode=progressFileNodes[fileNumber];fileNumber+=1}},OnProgress:function(progress){if(params.IsStatusEnabled)uploadStatus.UpdateFile(progressFileNode,progress.GetFileName(),progress.GetFilePercent());params.OnProgress.call(params.OnProgress,progress)},OnFileComplete:function(tempFile){if(params.IsStatusEnabled)uploadStatus.SetIsFileCompleted(progressFileNode,tempFile.FileName);var file=new D2L.LP.Web.UI.Files.File(tempFile.FileId, "Temp",tempFile.FileName,tempFile.Size,"");params.OnFileComplete.call(params.OnFileComplete,file)},OnFilesComplete:function(){if(params.IsStatusEnabled)uploadStatus.SetIsProgressContainerVisible(progressNode,false);params.OnFilesComplete.call(params.OnFilesComplete);resetUpload()},OnAbort:function(){removeAllProgressFiles();params.OnAbort.call(params.OnAbort);resetUpload();params.OnProgress.call(params.OnProgress,new D2L.LP.Web.UI.Html.Files.FileUpload.FileUploadProgress("",0,0,0,0))},OnError:function(){resetUpload(); raiseError(4)},UploadLocation:uploadLocation};params.OnProgress.call(params.OnProgress,new D2L.LP.Web.UI.Html.Files.FileUpload.FileUploadProgress("",0,0,0,0));isUploading=true;params.OnFilesStarted.call(params.OnFilesStarted);if(params.IsStatusEnabled){progressFileNodes=[];for(var j=0;j<files.length;j++)progressFileNodes.push(uploadStatus.AddFile(progressNode,files[j].name));setTimeout(function(){if(isUploading)uploadStatus.SetIsProgressContainerVisible(progressNode,true)},500)}uploadHandle=D2L.LP.Web.UI.Html.Files.FileUpload.XmlHttpRequest.UploadFiles(files, requestParams);return uploadHandle},GetFileExtension:function(fileName){var extStart=fileName.lastIndexOf(".");if(extStart<0)return null;return fileName.substr(extStart+1).toLowerCase()},IsFileNameValid:function(fileName){var filenameRegex=/^([^\\\\/:\*\?\"<>\|]{0,127}[^\\\./:\*\?\"<>\|])\.*[^\\\./:\*\?\"<>\|]*$/;var match=filenameRegex.exec(fileName);return match!==null},IsExtensionValid:function(fileName,extensions,restrictedExtensions){var me=D2L.LP.Web.UI.Html.Files.FileUpload;var extension=me.GetFileExtension(fileName); if(extension!==null){if(D2L.LP.Web.UI.Html.Dom.IndexOf(restrictedExtensions,extension)!==-1)return false;if(D2L.LP.Web.UI.Html.Dom.IndexOf(extensions,"*.*")===-1&&D2L.LP.Web.UI.Html.Dom.IndexOf(extensions,extension)===-1)return false}else return false;return true}}; D2L.LP.Web.UI.Html.Files.FileUpload.IFrameRequest={CallbackNumber:0,ERRCODE_MAXFILESIZE:"1000",ERRCODE_TOTALFILESIZE:"1001",ERRCODE_RESTRICTEDFILEEXT:"1002",Upload:function(openerId,uploadLocation,fileNode,params){var me=D2L.LP.Web.UI.Html.Files.FileUpload.IFrameRequest;var fileUpload=D2L.LP.Web.UI.Html.Files.FileUpload;var uploadStatus=D2L.LP.Web.UI.Html.Files.FileUpload.Status;var errorsNode;var progressNode;var progressFileNode;if(params.IsStatusEnabled){if(progressNode===undefined||errorsNode=== undefined){errorsNode=uploadStatus.GetErrorsContainerNode();progressNode=uploadStatus.GetProgressContainerNode()}uploadStatus.RemoveErrorMessages(errorsNode)}var raiseError=function(errorNumber){if(params.IsStatusEnabled)uploadStatus.AddErrorMessage(errorsNode,params.ErrorMessages[errorNumber-1]);params.OnError.call(params.OnError,errorNumber)};if(!fileUpload.IsExtensionValid(fileNode.value,params.Extensions,params.RestrictedExtensions)){raiseError(2);return}var iFrameId=openerId.GetValue()+"_iframe_"+ me.CallbackNumber;var iFrameNode=D2L.LP.Web.UI.Html.Dom.GetElementById(iFrameId);if(iFrameNode==null){iFrameNode=document.createElement("IFRAME");D2L.LP.Web.UI.Html.Dom.SetAttribute(iFrameNode,"id",iFrameId);D2L.LP.Web.UI.Html.Dom.SetAttribute(iFrameNode,"name",iFrameId);D2L.LP.Web.UI.Html.Dom.SetAttribute(iFrameNode,"src","/d2l/tools/blank.html");D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-offscreen",iFrameNode);D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-hidden",iFrameNode);D2L.LP.Web.UI.Html.Dom.InsertElementAfter(iFrameNode, fileNode)}D2L.LP.Web.UI.Html.Dom.SetAttribute(fileNode,"name","uploadFile");var uploadHandle={Abort:function(){if(this.IsUploading){if(params.IsStatusEnabled){uploadStatus.SetIsFileCompleted(progressFileNode);uploadStatus.SetIsProgressContainerVisible(progressNode,false)}if(params.OnAbort!=null)params.OnAbort.call(params.OnAbort)}},IsUploading:false};var uploadCallback=function(fileData){uploadHandle.IsUploading=false;var json=fileData;var response=D2L.LP.Web.Serialization.Json.Deserialize(json); var failCode=response.ResponseCode;var failReason=response.Message;if(failCode!="0"||response.File==null){if(failCode==me.ERRCODE_MAXFILESIZE||failCode==me.ERRCODE_TOTALFILESIZE)raiseError(3);else if(failCode==me.ERRCODE_RESTRICTEDFILEEXT)raiseError(2);if(params.IsStatusEnabled){uploadStatus.SetIsFileCompleted(progressFileNode);uploadStatus.SetIsProgressContainerVisible(progressNode,false)}return}var file=new D2L.LP.Web.UI.Files.File(response.File.FileId,response.File.FileSystemType,response.File.FileName, response.File.Size);if(params.IsStatusEnabled){uploadStatus.SetIsFileCompleted(progressFileNode,response.File.FileName);uploadStatus.SetIsProgressContainerVisible(progressNode,false)}params.OnFileComplete.call(params.OnFileComplete,file);params.OnFilesComplete.call(params.OnFilesComplete)};var callbackId=me.GetUniqueCallbackId(iFrameId);window[callbackId]=uploadCallback;var fileName=me.StripFilePath(fileNode.value);var location=uploadLocation.WithQueryString("cb",callbackId).WithQueryString("fileName", fileName).WithQueryString("iframe",true).GetUrl();var formNode=document.createElement("FORM");D2L.LP.Web.UI.Html.Dom.SetAttribute(formNode,"action",location);D2L.LP.Web.UI.Html.Dom.SetAttribute(formNode,"id",openerId.GetValue()+"_form");D2L.LP.Web.UI.Html.Dom.SetAttribute(formNode,"method","post");D2L.LP.Web.UI.Html.Dom.SetAttribute(formNode,"enctype","multipart/form-data");D2L.LP.Web.UI.Html.Dom.SetAttribute(formNode,"encoding","multipart/form-data");formNode.appendChild(D2L.LP.Web.Authentication.Xsrf.CreateXsrfHidden()); formNode.target=iFrameId;formNode.onsubmit="return false;";fileNode.parentNode.removeChild(fileNode);formNode.appendChild(fileNode);var doLoad=true;D2L.LP.Web.UI.Html.Dom.AddEventListener("load",iFrameNode,function(){if(doLoad){doLoad=false;uploadHandle.IsUploading=true;params.OnFilesStarted.call(params.OnFilesStarted);params.OnProgress.call(params.OnProgress.call,new D2L.LP.Web.UI.Html.Files.FileUpload.FileUploadProgress(fileName));if(params.IsStatusEnabled){progressFileNode=uploadStatus.AddFile(progressNode, fileName);uploadStatus.UpdateFile(progressFileNode,fileName);setTimeout(function(){if(uploadHandle.IsUploading)uploadStatus.SetIsProgressContainerVisible(progressNode,true)},500)}var iFrameBodyNode=iFrameNode.contentDocument.body;iFrameBodyNode.appendChild(formNode);formNode.submit()}else if(uploadHandle.IsUploading){uploadHandle.IsUploading=false;raiseError(3)}});return uploadHandle},GetUniqueCallbackId:function(iFrameId){var me=D2L.LP.Web.UI.Html.Files.FileUpload.IFrameRequest;var date=new Date; var time=date.getTime();me.CallbackNumber+=1;return iFrameId+"_cb_"+time+"_"+me.CallbackNumber},StripFilePath:function(fileName){var index=fileName.lastIndexOf("\\");return fileName.substring(index+1)}}; D2L.LP.Web.UI.Html.Files.FileUpload.FileUploadProgress=D2L.Class.Create({Construct:function(fileName,fileSentBytes,fileSizeBytes,totalSentBytes,totalSizeBytes){this.m_fileName=fileName;this.m_fileSentBytes=fileSentBytes;this.m_fileSizeBytes=fileSizeBytes;this.m_totalSentBytes=totalSentBytes;this.m_totalSizeBytes=totalSizeBytes},_deserialize:function(deserializer){},_serialize:function(serializer){serializer.AddMember("FileName",this.m_fileName);serializer.AddMember("FileSentBytes",this.m_fileSentBytes); serializer.AddMember("FileSizeBytes",this.m_fileSizeBytes);serializer.AddMember("TotalSentBytes",this.m_totalSentBytes);serializer.AddMember("TotalSizeBytes",this.m_totalSizeBytes)},GetFileName:function(){return this.m_fileName},GetFileSentBytes:function(){return this.m_fileSentBytes},GetFileSizeBytes:function(){return this.m_fileSizeBytes},GetFilePercent:function(){if(this.m_fileSizeBytes===0)return 0;else{if(this.m_fileSentBytes>this.m_fileSizeBytes)this.m_fileSentBytes=this.m_fileSizeBytes;return Math.round(this.m_fileSentBytes* 100/this.m_fileSizeBytes)}},GetTotalSentBytes:function(){return this.m_totalSentBytes},GetTotalSizeBytes:function(){return this.m_totalSizeBytes},GetTotalPercent:function(){if(this.m_totalSizeBytes===0)return 0;else return Math.round(this.m_totalSentBytes*100/this.m_totalSizeBytes)}}); D2L.LP.Web.UI.Html.Files.FileUpload.Status={AddFile:function(node,fileName){var fileNode=document.createElement("li");fileNode.className="d2l-filedrop-status-file";fileNode.innerHTML=fileName;fileNode.d2l_isComplete=false;return node.childNodes[0].appendChild(fileNode)},AddErrorMessage:function(node,message){node.childNodes[1].innerHTML=message;if(D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-filedrop-status-errors-hidden",node))D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-filedrop-status-errors-hidden", node);if(D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-filedrop-status-container-hidden",node.parentNode))D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-filedrop-status-container-hidden",node.parentNode)},GetContainerNode:function(){var node=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-filedrop-status-container");if(node!=null)return node;node=document.createElement("div");node.className="d2l-filedrop-status-container";var errorNode=document.createElement("div");errorNode.className="d2l-filedrop-status-errors d2l-filedrop-status-errors-hidden"; node.appendChild(errorNode);var errorCloseNode=document.createElement("span");errorCloseNode.className="d2l-filedrop-status-errors-close";D2L.LP.Web.UI.Html.Dom.AddEventListener("click",errorCloseNode,function(){D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-filedrop-status-errors-hidden",errorNode);D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-filedrop-status-container-hidden",node)});errorNode.appendChild(errorCloseNode);var errorTextNode=document.createElement("span");errorNode.appendChild(errorTextNode); var progressNode=document.createElement("div");progressNode.className="d2l-filedrop-status-progress d2l-filedrop-status-progress-hidden";node.appendChild(progressNode);var filesNode=document.createElement("ul");filesNode.className="d2l-filedrop-status-files";progressNode.appendChild(filesNode);return document.body.appendChild(node)},GetErrorsContainerNode:function(){var me=D2L.LP.Web.UI.Html.Files.FileUpload.Status;return me.GetContainerNode().childNodes[0]},GetProgressContainerNode:function(){var me= D2L.LP.Web.UI.Html.Files.FileUpload.Status;return me.GetContainerNode().childNodes[1]},SetIsProgressContainerVisible:function(node,isVisible){if(isVisible){if(D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-filedrop-status-progress-hidden",node)){var fileCount=node.childNodes[0].childNodes.length;for(var i=0;i<fileCount;i++){var fileNode=node.childNodes[0].childNodes[i];if(fileNode.d2l_isComplete)D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-hidden",fileNode)}D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-filedrop-status-progress-hidden", node);D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-filedrop-status-container-hidden",node.parentNode)}}else{var fileCount=node.childNodes[0].childNodes.length;for(var i=0;i<fileCount;i++){var fileNode=node.childNodes[0].childNodes[i];if(!fileNode.d2l_isComplete)return}D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-filedrop-status-progress-hidden",node);D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-filedrop-status-container-hidden",node.parentNode)}},SetIsFileCompleted:function(node,fileName){node.d2l_isComplete= true;this.UpdateFile(node,fileName,100)},RemoveErrorMessages:function(node){D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-filedrop-status-errors-hidden",node);node.childNodes[1].innerHTML=""},RemoveFile:function(node){node.d2l_isComplete=true;D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-filedrop-status-file-hidden",node)},UpdateFile:function(node,fileName,percent){if(node==null)return;if(percent!==undefined)node.innerHTML=fileName+" - "+percent+"%";else node.innerHTML=fileName+" - "+"Uploading"}}; D2L.LP.Web.UI.Html.Files.FileUpload.XmlHttpRequest={UploadFiles:function(files,params){var me=D2L.LP.Web.UI.Html.Files.FileUpload.XmlHttpRequest;if(files===undefined||files.length==0)return;var fileNumber=0;var fileCount=files.length;var fileUploadHandle;var handle={Abort:function(){if(fileUploadHandle!=null)fileUploadHandle.Abort()}};var totalLoaded=0;var totalFileSize=0;for(var i=0;i<files.length;i++)totalFileSize+=files[i].size;var onProgress=params.OnProgress;params.OnProgress=function(progress){if(onProgress== null)return;progress=new D2L.LP.Web.UI.Html.Files.FileUpload.FileUploadProgress(progress.GetFileName(),progress.GetFileSentBytes(),progress.GetFileSizeBytes(),totalLoaded+progress.GetFileSentBytes(),totalFileSize);onProgress.call(onProgress,progress)};var onFileComplete=params.OnFileComplete;params.OnFileComplete=function(file){totalLoaded+=files[fileNumber].size;onFileComplete.call(onFileComplete,file);fileUploadHandle=null;fileNumber+=1;if(fileNumber<fileCount)fileUploadHandle=me.UploadFile(files[fileNumber], params);else if(params.OnFilesComplete!=null)params.OnFilesComplete.call(params.OnFilesComplete)};onProgress.call(onProgress,new D2L.LP.Web.UI.Html.Files.FileUpload.FileUploadProgress("",0,1,0,1));fileUploadHandle=me.UploadFile(files[fileNumber],params);return handle},UploadFile:function(file,params){if(file===undefined)return;var fileSize=file.size;var xhr;var handle={Abort:function(){if(this.IsUploading&&xhr!=null)xhr.abort()},IsUploading:false};var bytesLoaded=0;var onProgress=function(evt){if(params.OnProgress== null)return;if(evt.lengthComputable){var progress=new D2L.LP.Web.UI.Html.Files.FileUpload.FileUploadProgress(file.name,bytesLoaded+evt.loaded,fileSize,bytesLoaded+evt.loaded,fileSize);params.OnProgress.call(params.OnProgress,progress)}};var sliceFunc;if(file.slice!==undefined)sliceFunc="slice";else if(file.mozSlice!==undefined)sliceFunc="mozSlice";else if(file.webkitSlice)sliceFunc="webkitSlice";var bytesPerSlice=params.BytesPerSlice;if(sliceFunc===undefined||bytesPerSlice===undefined)bytesPerSlice= 0;var getEndByte=function(startByte){var endByte=startByte+bytesPerSlice;if(endByte<fileSize)return endByte;else return fileSize};var isLastSlice=false;var uploadSlice=function(startByte,streamId){var endByte=getEndByte(startByte);var slice;if(bytesPerSlice>0){slice=file[sliceFunc](startByte,endByte);if(endByte>=fileSize)isLastSlice=true}else{slice=file;isLastSlice=true}var location=params.UploadLocation.WithQueryString("isLastSlice",isLastSlice);if(streamId!==undefined)location=location.WithQueryString("streamId", streamId);location=location.GetUrl();var formData=new FormData;formData.append("fileName",file.name);formData.append("uploadFile",slice);formData.append(D2L.LP.Web.Authentication.Xsrf.GetXsrfTokenParameterName(),D2L.LP.Web.Authentication.Xsrf.GetXsrfToken());xhr=new XMLHttpRequest;D2L.LP.Web.UI.Html.Dom.AddEventListener("progress",xhr.upload,onProgress);D2L.LP.Web.UI.Html.Dom.AddEventListener("load",xhr.upload,onProgress);xhr.onload=function(evt){if(xhr.status==200){bytesLoaded+=slice.size;var json= evt.target.responseText;var response=D2L.LP.Web.Serialization.Json.Deserialize(json);if(response.ResponseCode=="0")if(response.File!==undefined){handle.IsUploading=false;params.OnFileComplete.call(params.OnFileComplete,response.File)}else{startByte=endByte;if(!isLastSlice)uploadSlice(startByte,response.StreamId)}else{handle.IsUploading=false;if(params.OnError!=null)params.OnError.call(params.OnError)}}else{handle.IsUploading=false;if(params.OnError!=null)params.OnError.call(params.OnError)}slice= null};xhr.onerror=function(){handle.IsUploading=false;if(params.OnError!=null)params.OnError.call(params.OnError)};xhr.onabort=function(){handle.IsUploading=false;if(params.OnAbort!=null)params.OnAbort.call(params.OnAbort)};xhr.open("POST",location);xhr.send(formData)};handle.IsUploading=true;if(params.OnFileStarted!=null)params.OnFileStarted.call(params.OnFileStarted,file.name);uploadSlice(0);return handle}};D2L.LP.Web.UI.Html.Files.FileUpload.FileBrowse={}; D2L.LP.Web.UI.Html.Files.FileUpload.FileBrowse.Default={Abort:function(openerId){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(openerId.GetValue());if(node.d2l_fu_handles===undefined)return;for(var i=0;i<node.d2l_fu_handles.length;i++){node.d2l_fu_handles[i].Abort();node.d2l_fu_handles.splice(0,1)}},Browse:function(openerId,settings){var me=D2L.LP.Web.UI.Html.Files.FileUpload.FileBrowse.Default;var inputNode=me.CreateInputNode(openerId,settings);me.ClickInputNode(inputNode)},CreateInputNode:function(openerId, settings){var me=D2L.LP.Web.UI.Html.Files.FileUpload.FileBrowse.Default;var node=D2L.LP.Web.UI.Html.Dom.GetElementById(openerId.GetValue());var inputNode=document.createElement("input");inputNode.className="d2l-fileinput-input";inputNode.type="file";if(settings.IsMultipleAllowed)inputNode.setAttribute("multiple","multiple");var params={BytesPerSlice:settings.BytesPerSlice,ErrorMessages:settings.ErrorMessages,Extensions:settings.Extensions,RestrictedExtensions:settings.RestrictedExtensions,IsMultipleAllowed:settings.IsMultipleAllowed, IsStatusEnabled:settings.IsStatusEnabled,MaxFileSize:settings.MaxFileSize,MaxFileNameLength:settings.MaxFileNameLength,OnFilesStarted:function(){if(settings.OnFilesStarted!==null)settings.OnFilesStarted.call(settings.OnFilesStarted)},OnProgress:function(progress){node.d2l_fu_progress=progress;if(settings.OnProgress!=null)settings.OnProgress.call(settings.OnProgress)},OnFileComplete:function(file){node.d2l_fu_files.push(file);node.d2l_fu_files_queued+=1;if(settings.OnFileComplete!==null)settings.OnFileComplete.call(settings.OnFileComplete)}, OnFilesComplete:function(){if(settings.OnFilesComplete!==null)settings.OnFilesComplete.call(settings.OnFilesComplete)},OnAbort:function(){if(settings.OnAbort!==null)settings.OnAbort.call(settings.OnAbort)},OnError:function(errorNumber){node.d2l_fu_errorNumber=errorNumber;if(settings.OnError!==null)settings.OnError.call(settings.OnError)}};D2L.LP.Web.UI.Html.Dom.AddEventListener("change",inputNode,function(){if(node.d2l_fu_files===undefined)node.d2l_fu_files=[];if(node.d2l_fu_files_queued===undefined)node.d2l_fu_files_queued= 0;if(node.d2l_fu_handles===undefined)node.d2l_fu_handles=[];node.d2l_fu_handles.push(D2L.LP.Web.UI.Html.Files.FileUpload.Upload(settings.UploadLocation,inputNode.files,params))});D2L.LP.Web.UI.Html.Dom.InsertElementAfter(inputNode,node);return inputNode},ClickInputNode:function(inputNode){if(D2L.LP.Web.UI.Daylight.IsEnabled())D2L.LP.Web.UI.Html.Dom.DispatchEvent("click",inputNode,{"cancelable":false});else inputNode.click()},GetErrorNumber:function(openerId){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(openerId.GetValue()); var errorNumber=node.d2l_fu_errorNumber;return errorNumber},GetFile:function(openerId){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(openerId.GetValue());var files=node.d2l_fu_files;if(files.length===0||files.length<node.d2l_fu_files_queued)return;var file=files[files.length-node.d2l_fu_files_queued];node.d2l_fu_files_queued-=1;return file},GetFiles:function(openerId){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(openerId.GetValue());if(node===null)return;var files=node.d2l_fu_files;if(files.length=== 0||files.length<node.d2l_fu_files_queued)return;var queuedFiles=[];var queuedIndex=files.length-node.d2l_fu_files_queued;for(var i=queuedIndex;i<files.length;i++){queuedFiles.push(files[i]);node.d2l_fu_files_queued-=1}return queuedFiles},GetProgress:function(openerId){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(openerId.GetValue());var progress=node.d2l_fu_progress;return progress}};D2L.LP.Web.UI.Html.Files.FileUpload.FileDrop={}; D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-filedrop",function(node){var me=D2L.LP.Web.UI.Html.Files.FileUpload.FileDrop.Default;me.MakeFileDropNode(node)}); D2L.LP.Web.UI.Html.Files.FileUpload.FileDrop.Default={Abort:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(node.d2l_fd_handles===undefined)return;for(var i=0;i<node.d2l_fd_handles.length;i++)node.d2l_fd_handles[i].Abort()},GetVerticalDragPosition:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());if(node.m_verticalDragPosition)return node.m_verticalDragPosition;else return null},GetErrorNumber:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue()); var errorNumber=node.d2l_fd_errorNumber;return errorNumber},GetFile:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var files=node.d2l_fd_files;if(files.length===0||files.length<node.d2l_fd_files_queued)return;var file=files[files.length-node.d2l_fd_files_queued];node.d2l_fd_files_queued-=1;return file},GetFiles:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var files=node.d2l_fd_files;if(files.length===0||files.length<node.d2l_fd_files_queued)return; var queuedFiles=[];var queuedIndex=files.length-node.d2l_fd_files_queued;for(var i=queuedIndex;i<files.length;i++){queuedFiles.push(files[i]);node.d2l_fd_files_queued-=1}return queuedFiles},GetProgress:function(id){var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());var progress=node.d2l_fd_progress;return progress},IsMultipleAllowedByNode:function(node){return node.d2l_fd_isMultipleAllowed},MakeFileDropNode:function(node){var me=D2L.LP.Web.UI.Html.Files.FileUpload.FileDrop.Default;var dropStatus= D2L.LP.Web.UI.Html.Files.FileUpload.Status;var bytesPerSlice=D2L.LP.Web.UI.ObjectRepository.TryGet(node.id,"bytesPerSlice");var maxFileSize=D2L.LP.Web.UI.ObjectRepository.TryGet(node.id,"maxFileSize");var maxFileNameLength=D2L.LP.Web.UI.ObjectRepository.TryGet(node.id,"maxFileNameLength");var extensions=D2L.LP.Web.UI.ObjectRepository.TryGet(node.id,"extensions");var uploadLocation=D2L.LP.Web.UI.ObjectRepository.TryGet(node.id,"uploadLocation");var restrictedExtensions=D2L.LP.Web.UI.ObjectRepository.TryGet(node.id, "x-extensions");var statusIndicator=D2L.LP.Web.UI.ObjectRepository.TryGet(node.id,"statusIndicator");var isMultiple=D2L.LP.Web.UI.ObjectRepository.TryGet(node.id,"isMultipleAllowed");var errorMessages=D2L.LP.Web.UI.ObjectRepository.TryGet(node.id,"errorMessages");var onProgress=D2L.LP.Web.UI.ObjectRepository.TryGet(node.id,"onProgress");var onFileOver=D2L.LP.Web.UI.ObjectRepository.TryGet(node.id,"onFileOver");var onFileEnter=D2L.LP.Web.UI.ObjectRepository.TryGet(node.id,"onFileEnter");var onFileLeave= D2L.LP.Web.UI.ObjectRepository.TryGet(node.id,"onFileLeave");var fileOverCssClass=D2L.LP.Web.UI.ObjectRepository.TryGet(node.id,"fileOverCssClass");var isStatusEnabled=statusIndicator==="auto";node.d2l_fd_isUploading=false;node.d2l_fd_files=[];node.d2l_fd_files_queued=0;node.d2l_fd_handles=[];me.SetIsEnabledByNode(node,true);me.SetIsMultipleAllowedByNode(node,isMultiple);var errorsNode;var progressNode;var progressFileNode;var progressFileNodes;var noopHandler=function(evt){D2L.LP.Web.UI.Html.Dom.CancelEventBubble(evt); D2L.LP.Web.UI.Html.Dom.CancelEventDefaultBehaviour(evt)};var isFileDropValid=function(evt){if(node.d2l_fd_isAllowed&&!node.d2l_fd_isUploading&&evt.dataTransfer!=null&&evt.dataTransfer.types!=null){var dataTypes=evt.dataTransfer.types;for(var i=0;i<dataTypes.length;i++){if(dataTypes[i]=="application/x-moz-file-promise")return false;if(dataTypes[i]=="Files")return true}}return false};var dragEnterCount=0;var onDropFiles=function(evt){dragEnterCount=0;D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-filedrop-drag", node);if(fileOverCssClass)D2L.LP.Web.UI.Html.Dom.RemoveClassName(fileOverCssClass,node);if(onFileLeave)onFileLeave.call(onFileLeave);if(!isFileDropValid(evt))return;var files=evt.dataTransfer.files;if(files==null||files.length==0)return;var resetUpload=function(){node.d2l_fd_isUploading=false};var params={BytesPerSlice:bytesPerSlice,ErrorMessages:errorMessages,Extensions:extensions,RestrictedExtensions:restrictedExtensions,IsMultipleAllowed:isMultiple,IsStatusEnabled:isStatusEnabled,MaxFileSize:maxFileSize, MaxFileNameLength:maxFileNameLength,OnFilesStarted:function(){var onFilesStarted=D2L.LP.Web.UI.ObjectRepository.TryGet(node.id,"onFilesStarted");if(onFilesStarted!=null)onFilesStarted.call(onFilesStarted)},OnProgress:function(progress){node.d2l_fd_progress=progress;if(onProgress!=null)onProgress.call(onProgress)},OnFileComplete:function(file){node.d2l_fd_files.push(file);node.d2l_fd_files_queued+=1;var onFileComplete=D2L.LP.Web.UI.ObjectRepository.TryGet(node.id,"onFileComplete");if(onFileComplete!= null)onFileComplete.call(onFileComplete)},OnFilesComplete:function(){var onFilesComplete=D2L.LP.Web.UI.ObjectRepository.TryGet(node.id,"onFilesComplete");if(onFilesComplete!=null)onFilesComplete.call(onFilesComplete);resetUpload()},OnAbort:function(){var onAbort=D2L.LP.Web.UI.ObjectRepository.TryGet(node.id,"onAbort");if(onAbort!=null)onAbort.call(onAbort);resetUpload()},OnError:function(errorNumber){resetUpload();node.d2l_fd_errorNumber=errorNumber;var onError=D2L.LP.Web.UI.ObjectRepository.TryGet(node.id, "onError");if(onError!=null)onError.call(onError)}};node.d2l_fd_isUploading=true;node.d2l_fd_handles.push(D2L.LP.Web.UI.Html.Files.FileUpload.Upload(uploadLocation,files,params))};D2L.LP.Web.UI.Html.Dom.AddEventListener("dragenter",node,function(evt){dragEnterCount++;if(isFileDropValid(evt)){D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-filedrop-drag",node);if(fileOverCssClass)D2L.LP.Web.UI.Html.Dom.AddClassName(fileOverCssClass,node);if(onFileEnter)onFileEnter.call(onFileEnter)}noopHandler(evt)});D2L.LP.Web.UI.Html.Dom.AddEventListener("dragleave", node,function(evt){node.m_rect=null;dragEnterCount--;if(evt.relatedTarget!=null){var relatedTarget=evt.relatedTarget;if(relatedTarget!=node){var tempNode=D2L.LP.Web.UI.Html.Dom.GetParentElementByClassName("d2l-filedrop-drag",relatedTarget);if(tempNode==null||tempNode!=node){D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-filedrop-drag",node);if(fileOverCssClass)D2L.LP.Web.UI.Html.Dom.RemoveClassName(fileOverCssClass,node);if(onFileLeave)onFileLeave.call(onFileLeave);noopHandler(evt)}}}else if(dragEnterCount== 0){D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-filedrop-drag",node);if(fileOverCssClass)D2L.LP.Web.UI.Html.Dom.RemoveClassName(fileOverCssClass,node);if(onFileLeave)onFileLeave.call(onFileLeave)}});var onDragOverHandler=function(evt){if(onFileOver)if(isFileDropValid(evt)){var cursorPos=D2L.LP.Web.UI.Html.Dom.GetMousePosition(window,evt);if(!node.m_rect)node.m_rect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(node);var topDelta=cursorPos.y-node.m_rect.top;node.m_verticalDragPosition=topDelta/node.m_rect.height; onFileOver.call(onFileOver)}noopHandler(evt)};D2L.LP.Web.UI.Html.Dom.AddEventListener("dragover",node,onDragOverHandler);D2L.LP.Web.UI.Html.Dom.AddEventListener("drop",node,function(evt){noopHandler(evt);onDropFiles(evt);node.m_rect=null})},SetIsEnabled:function(id,isEnabled){var me=D2L.LP.Web.UI.Html.Files.FileUpload.FileDrop.Default;var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id.GetValue());me.SetIsEnabledByNode(node,isEnabled)},SetIsEnabledByNode:function(node,isAllowed){if(!D2L.LP.Web.UI.Html.Dom.HasClassName("d2l-filedrop", node))return;node.d2l_fd_isAllowed=isAllowed;if(isAllowed)D2L.LP.Web.UI.Html.Dom.AddClassName("d2l-filedrop-add",node);else D2L.LP.Web.UI.Html.Dom.RemoveClassName("d2l-filedrop-add",node)},SetIsMultipleAllowedByNode:function(node,isAllowed){node.d2l_fd_isMultipleAllowed=isAllowed}};D2L.LP.Web.UI.Legacy={MasterPages:{}}; D2L.LP.Web.UI.Legacy.MasterPages.Dialog={InstallTitle:function(handle,closeText,titleText){var doc=handle.container.ownerDocument;var nodeWin=handle.frame.contentWindow;var title="";if(typeof titleText==="string")title=titleText;else{var titleNode=D2L.LP.Web.UI.Html.Dom.GetElementById("d_page_title",doc);if(titleNode!==null){titleNode.style.display="none";title=titleNode.innerHTML}}handle.nodes.title=doc.createElement("div");handle.nodes.title.className="d2l-dialog-title";handle.nodes.heading=doc.createElement("h1"); handle.nodes.heading.className="d2l-heading";handle.nodes.heading.id=nodeWin.UI.GetUniqueHtmlId();handle.nodes.heading.innerHTML=title;handle.nodes.title.appendChild(handle.nodes.heading);handle.nodes.close=doc.createElement("a");handle.nodes.close.className="d2l-dialog-close";var closeImg=doc.createElement("span");handle.nodes.close.appendChild(closeImg);var closeTextElem=doc.createElement("span");closeTextElem.className="d2l-offscreen";closeTextElem.appendChild(doc.createTextNode(closeText));closeImg.appendChild(closeTextElem); handle.nodes.title.appendChild(handle.nodes.close);handle.container.insertBefore(handle.nodes.title,handle.container.firstChild)},InstallFooter:function(handle,adapter,buttons){var doc=handle.container.ownerDocument;adapter.m_footerNode=doc.createElement("div");adapter.m_footerNode.className="d2l-dialog-footer";if(buttons.length>0)for(var i=0;i<buttons.length;i++){var buttonAdapter=adapter.AddCustomButton(new D2L.LP.Web.UI.Legacy.MasterPages.Dialog.TextAdapter(buttons[i].Text),0,buttons[i].ResponseType, buttons[i].Param,buttons[i].Key,buttons[i].IsPrimary);buttonAdapter.SetIsEnabled(buttons[i].IsEnabled)}var resize=doc.createElement("span");resize.className="d2l-dialog-resize";adapter.m_footerNode.appendChild(resize);handle.container.appendChild(adapter.m_footerNode);handle.nodes.footer=adapter.m_footerNode},CreateSettings:function(openerId,location,srcCallback,resizeCallback,responseDataKey,width,height,closeText,buttons,forceTriggerOnCancel,titleText){var me=D2L.LP.Web.UI.Legacy.MasterPages.Dialog; var onload=function(handle){var nodeWin=handle.frame.contentWindow;if(nodeWin.D2L===undefined)return;handle.m_forceTriggerOnCancel=forceTriggerOnCancel;me.adapter=new D2L.LP.Web.UI.Legacy.MasterPages.Dialog.DialogAdapter(handle,responseDataKey,srcCallback,resizeCallback);me.InstallTitle(handle,closeText,titleText);me.InstallFooter(handle,me.adapter,buttons);handle.body.style.overflow="auto";nodeWin.UI.SetParentDialog(me.adapter);nodeWin.d2l_Onload()};var preferredSize={PreferredWidth:width!==null? width:undefined,PreferredHeight:height!==null?height:undefined,MinVerticalMargin:60,MinHorizontalMargin:60};var settings={Onload:onload,PreferredSize:preferredSize};return settings},Open:function(opener,location,srcCallback,resizeCallback,responseDataKey,width,height,closeText,buttons,forceTriggerOnCancel,titleText){var me=D2L.LP.Web.UI.Legacy.MasterPages.Dialog;var dialog=D2L.LP.Web.UI.Desktop.MasterPages.Dialog;location=(new D2L.LP.Web.Http.UrlLocation(location.GetUrl())).WithQueryString("d2l_body_type", "2");var settings=me.CreateSettings(opener,location,srcCallback,resizeCallback,responseDataKey,width,height,closeText,buttons,forceTriggerOnCancel,titleText);return dialog.Open(opener,location,settings)},OpenWithParam:function(openerId,location,srcCallback,resizeCallback,responseDataKey,width,height,closeText,buttons,params){var me=D2L.LP.Web.UI.Legacy.MasterPages.Dialog;var dialog=D2L.LP.Web.UI.Desktop.MasterPages.Dialog;location=(new D2L.LP.Web.Http.UrlLocation(location.GetUrl())).WithQueryString("d2l_body_type", "2");var settings=me.CreateSettings(openerId,location,srcCallback,resizeCallback,responseDataKey,width,height,closeText,buttons);return dialog.OpenWithParam(openerId,location,params,settings)},DestroyAdapter:function(){var me=D2L.LP.Web.UI.Legacy.MasterPages.Dialog;if(me.adapter)me.adapter.RemoveButtons();me.adapter=null}}; D2L.LP.Web.UI.Legacy.MasterPages.Dialog.ButtonAdapter=D2L.Class.Create({Construct:function(dialog,srcCallback,win,doc,text,responseType,responseParam,key,isPrimary){if(responseType===undefined)responseType=1;if(responseParam===undefined)responseParam="";this.m_domNode=null;this.m_dialog=dialog;this.m_srcCallback=srcCallback;this.m_win=win;this.m_doc=doc;this.m_text=text;this.m_dialog=dialog;this.m_responseType=responseType;this.m_responseParam=responseParam;this.m_key=key;this.m_isEnabled=true;this.m_isDisplayed= true;this.m_onClick=null;this.m_isPrimary=isPrimary;this.m_isRendered=false},BuildDom:function(){var me=this;var b=D2L.LP.Web.UI.Common.Controls.Button;this.m_onClick=function(){var response=new D2L.LP.Web.UI.Legacy.MasterPages.Dialog.Response(me.m_dialog,me.m_responseType,me.m_responseParam);if(me.m_win[me.m_srcCallback]!==undefined)me.m_win[me.m_srcCallback](response);else me.m_dialog.CallCallback(response)};this.m_domNode=b.Build(this.m_doc);return this.m_domNode},Init:function(){this.m_isRendered= true;var b=D2L.LP.Web.UI.Common.Controls.Button;D2L.LP.Web.UI.Common.Controls.Button.Init(this.m_domNode);b.SetIsPrimaryNode(this.m_domNode,this.m_isPrimary);this.SetIsDisplayed(this.m_isDisplayed);this.SetIsEnabled(this.m_isEnabled);this.SetOnClick(this.m_onClick);this.SetText(this.m_text)},GetDomNode:function(){return this.m_domNode},GetText:function(){return this.m_text},SetIsDisplayed:function(isDisplayed){this.m_isDisplayed=isDisplayed;if(!this.m_isRendered)return;D2L.LP.Web.UI.Common.Controls.Button.SetIsVisibleNode(this.m_domNode, isDisplayed)},SetIsEnabled:function(isEnabled){this.m_isEnabled=isEnabled;if(!this.m_isRendered)return;D2L.LP.Web.UI.Common.Controls.Button.SetIsEnabledNode(this.m_domNode,isEnabled)},SetIsPrimary:function(isPrimary){this.m_isPrimary=isPrimary;if(!this.m_isRendered)return;D2L.LP.Web.UI.Common.Controls.Button.SetIsPrimaryNode(this.m_domNode,isPrimary)},SetText:function(text){this.m_text=text;if(!this.m_isRendered)return;var me=this;this.m_text.GetText().Register(function(val){D2L.LP.Web.UI.Common.Controls.Button.SetTextNode(me.m_domNode, val)})},SetOnClick:function(onClick){this.m_onClick=null;if(!this.m_isRendered)return;D2L.LP.Web.UI.Common.Controls.Button.SetOnClickNode(this.m_domNode,onClick)}}); D2L.LP.Web.UI.Legacy.MasterPages.Dialog.DialogAdapter=D2L.Class.Create({Construct:function(handle,dataKey,srcCallback,resizeCallback){this.m_handle=handle;this.m_footerNode=null;this.m_dataKey=dataKey;this.m_positiveButton=null;this.m_srcCallback=srcCallback;this.m_buttons=[];if(resizeCallback!==undefined){resizeCallback=handle.frame.contentWindow[resizeCallback];if(resizeCallback!==undefined)handle.dialog.OnResize.AddListener(function(){try{resizeCallback()}catch(ex){}})}},AddButton:function(type, responseParam,key,isPrimary){if(responseParam===undefined)responseParam="";var win=this.m_handle.frame.contentWindow;var text=win.D2L.Control.Button.GetTermForType(type);var responseType=1;if(type==1||type==9)responseType=0;else if(type==4)responseType=2;return this.AddCustomButton(text,0,responseType,responseParam,key,isPrimary)},AddCustomButton:function(text,position,responseType,responseParam,key,isPrimary){var doc=this.m_handle.container.ownerDocument;var nodeWin=this.m_handle.frame.contentWindow; var button=new D2L.LP.Web.UI.Legacy.MasterPages.Dialog.ButtonAdapter(this,this.m_srcCallback,this.m_handle.frame.contentWindow,doc,text,responseType,responseParam,key,isPrimary);this.m_buttons.push(button);button.BuildDom();if(responseType===1)this.m_positiveButton=button;var buttonsNode=null;var buttonsNodes=nodeWin.D2L.LP.Web.UI.Html.Dom.GetElementsByClassName("d2l-dialog-buttons",this.m_footerNode);if(buttonsNodes.length===0){buttonsNode=doc.createElement("div");buttonsNode.className="d2l-dialog-buttons"; this.m_footerNode.appendChild(buttonsNode)}else buttonsNode=buttonsNodes[0];buttonsNode.appendChild(button.GetDomNode());button.Init();buttonsNode.appendChild(doc.createTextNode(" "));return button},CallCallback:function(response){var result=[];var dataKeys=[];if(this.m_dataKey.length>0)dataKeys=this.m_dataKey.split(",");for(var j=0;j<dataKeys.length;j++){var itemResult=undefined;var dataItemKeys=dataKeys[j].split(".");if(dataItemKeys.length>0){itemResult=response.GetData(dataItemKeys[0]);if(itemResult!== undefined)for(var i=1;i<dataItemKeys.length;i++)if(itemResult[dataItemKeys[i]]!==undefined)itemResult=itemResult[dataItemKeys[i]]}result.push(itemResult)}if(result.length==0)result=undefined;else if(result.length==1)result=result[0];D2L.LP.Web.UI.Desktop.MasterPages.Dialog.CloseHelperWithHandle(response.GetType()>0,true,result,this.m_handle)},Close:function(){D2L.LP.Web.UI.Desktop.MasterPages.Dialog.CloseHelperWithHandle(true,true,undefined,this.m_handle)},GetButton:function(key){for(var i=0;i<this.m_buttons.length;i++)if(this.m_buttons[i].m_key== key)return this.m_buttons[i];return null},GetButtonCount:function(){return 0},GetContentHeight:function(){return this.m_handle.body.clientHeight},GetPositiveButton:function(){return this.m_positiveButton},GetFooterText:function(){return""},RemoveButton:function(button){for(var i=0;i<this.m_buttons.length;i++)if(this.m_buttons[i]==button){button.m_domNode.parentNode.removeChild(button.m_domNode);this.m_buttons.splice(i,1)}},RemoveButtons:function(){for(var i=0;i<this.m_buttons.length;i++){D2L.LP.Web.UI.Common.Controls.Button.UnbindEvents(this.m_buttons[i].m_domNode); this.m_buttons[i].m_domNode.parentNode.removeChild(this.m_buttons[i].m_domNode)}this.m_buttons=[]},SetFooterText:function(text){},SetSize:function(width,height){D2L.LP.Web.UI.Common.MasterPages.Dialog.SetSize(this.m_handle,width,height)},SetTitle:function(text){}}); D2L.LP.Web.UI.Legacy.MasterPages.Dialog.Response=D2L.Class.Create({Construct:function(dialog,type,param){this.m_data=[];this.m_dialog=dialog;this.m_type=type;this.m_param=param},CallCallback:function(){this.GetDialog().CallCallback(this)},GetData:function(key){return this.m_data[key]},GetDialog:function(){return this.m_dialog},GetParam:function(){return this.m_param},GetType:function(){return this.m_type},SetData:function(key,value){this.m_data[key]=value}}); D2L.LP.Web.UI.Legacy.MasterPages.Dialog.TextAdapter=D2L.Class.Create({Construct:function(text){this.m_text=text},AssignText:function(obj,attrName){obj[attrName]=this.m_text},GetText:function(){var text=this.m_text;return{Register:function(callback){callback(text)}}}});D2L.LP.DocumentViewers={};D2L.LP.DocumentViewers.Legacy={}; D2L.LP.DocumentViewers.Legacy.Container={SetIsDisplayed:function(id,isDisplayed){var node=document.getElementById(id);if(node!=null)node.style.display=isDisplayed?"inline":"none"},SetLocation:function(id,location){if(id===undefined||location===undefined)return;var node=D2L.LP.Web.UI.Html.Dom.GetElementById(id);if(node!==null)node.src=location.GetUrl()}};D2L.LP.Tools={QuickLinks:{Web:{UnavailableLinks:{}}}};D2L.LP.Tools.QuickLinks.Web.UnavailableLinks.GoBack=function(){window.history.go(-1)}; D2L.LP.Web.UI.Desktop.Controls.GooglePlusOne={Init:function(node){var data={"size":"medium","count":"true"};if(D2L.LP.Web.UI.Html.Dom.HasAttribute(node,"data-href"))data["href"]=node.getAttribute("data-href");gapi.plusone.render(node,data)}};D2L.LP.Web.UI.Desktop.Controls.TweetButton={Init:function(node){D2L.LP.Web.UI.Html.Dom.AddEventListener("click",node,function(){var win=window.open(node.getAttribute("href"),"twitterWin","height=420,width=555,menubar=no,toolbar=no");if(win)win.focus()})}}; D2L.LP.Minibar={CourseSelector:{}}; D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-courseselector-wrapper",function(node){var isDaylight=D2L.LP.Web.UI.Daylight.IsEnabled();if(!isDaylight){var $node=$(node);var resizeSelector=function(){var flyoutContents=$node.parents(".d2l-menuflyout-contents");if(flyoutContents.length<=0)return;var divHeight=flyoutContents.css("max-height").replace("px","");var children=$node.children();if(children.length<=0)return;divHeight=divHeight-$(children[0]).outerHeight();$(children[1]).css("max-height", Math.round(divHeight)-5+"px");$(children[1]).css("overflow","auto")};var resizeFlyout=function(){var minibar=$(".d2l-minibar");if(minibar.length<=0)return;var minibarHeight=minibar.height();var viewport=D2L.LP.Web.UI.Html.Dom.GetViewportSize(window);var maxHeight=Math.max(viewport.height-minibarHeight-10,100);var flyoutContents=$node.parents(".d2l-menuflyout-contents");if(flyoutContents.length<=0)return;flyoutContents.css("max-height",maxHeight);resizeSelector()};resizeSelector();$(window).on("resize", resizeFlyout)}var onCoursePinEvent=function(e){var event=isDaylight?e:e.originalEvent;var listItemContent=node.querySelector('[data-org-unit-id="'+event.detail.orgUnitId+'"]');if(!listItemContent)return;var datalistItem=D2L.LP.Web.UI.Html.Dom.GetAncestorElementsByClassName("d2l-datalist-simpleitem",listItemContent)[0];D2L.LP.Web.UI.Desktop.Controls.DataList.SimpleItems.SetIsSelected(D2L.LP.Web.UI.Html.AbsoluteHtmlId.Create(datalistItem.id),event.detail.isPinned);if(event.target.id!=="courseSelectorId"){var toggleItem= datalistItem.querySelector(".d2l-toggle");D2L.LP.Web.UI.Desktop.Controls.Toggle.ToggleFunction(D2L.LP.Web.UI.Html.AbsoluteHtmlId.Create(toggleItem.id))}};if(isDaylight)document.body.addEventListener("d2l-course-pinned-change",onCoursePinEvent);else $(document.body).on("d2l-course-pinned-change",onCoursePinEvent)}); D2L.LP.Minibar.CourseSelector.FirePinEvent=function(id,orgUnitId,isPinned){var target=D2L.LP.Web.UI.Html.Dom.GetElementById(id);if(target){var customEvent=new CustomEvent("d2l-course-pinned-change",{detail:{orgUnitId:orgUnitId,isPinned:isPinned},bubbles:true});target.dispatchEvent(customEvent)}}; D2L.LP.ActivityBar={OnNotification:new D2L.LP.Web.UI.Events.Event,Init:function(pollLocation,pollInterval,bucketClassNameFormat,updateVariableNameFormat){var myWindow=window;var findTopWindow=function(win){try{if(win&&win["D2L"]!==undefined){if(win.parent&&win.parent!=win)return findTopWindow(win.parent);return win}}catch(e){}};var topWindow=findTopWindow(myWindow);if(myWindow!==topWindow||myWindow===null)return;var processPollResponse=function(data){for(var i=0;i<data.length;i++){D2L.LP.ActivityBar.OnNotification.Trigger(data[i]); var bucketClassName=bucketClassNameFormat.replace("{0}",data[i]);var bucket=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName(bucketClassName);if(bucket===null)continue;D2L.LP.ActivityBar.SetAlertStatus(bucketClassName);var updateVariable=updateVariableNameFormat.replace("{0}",data[i]);D2L.VS(updateVariable,true);var messageDisplayed=bucket.m_ariaMessageDisplayed;if(!messageDisplayed){bucket.m_ariaMessageDisplayed=true;var ariaMessage=D2L.LP.Web.UI.ObjectRepository.Get(bucketClassName,"aria-message"); D2L.LP.Web.UI.Html.Aria.LogMessage(ariaMessage)}}};pollInterval=pollInterval*1E3;var supportsVisibilityApi=typeof document.hidden!=="undefined";var shouldImmediatelyPoll=false;var setupNextPoll=function(){shouldImmediatelyPoll=false;setTimeout(poll,pollInterval)};var poll=function(){if(supportsVisibilityApi&&document.hidden){shouldImmediatelyPoll=true;return}var expired=D2L.PT.Auth.SessionTimeout.IsExpired();if(expired){setupNextPoll();return}var rpcEvt=D2L.LP.Web.UI.Rpc.ConnectObject(D2L.LP.Web.UI.Rpc.Verbs.GET, pollLocation,null,{keepAlive:false,failure:function(){return true}});rpcEvt.AddListener(function(data){processPollResponse(data);setupNextPoll()})};setupNextPoll();if(supportsVisibilityApi){var onVisibilityChange=function(){if(!document.hidden&&shouldImmediatelyPoll)poll()};document.addEventListener("visibilitychange",onVisibilityChange,false)}},SetAlertStatus:function(bucketClassName){var bucket=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName(bucketClassName);if(bucket===null)return;var alertImage= D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("Alert",bucket);var openAlertImage=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("OpenAlert",bucket);var bucketId=D2L.LP.Web.UI.ObjectRepository.Get(bucketClassName,"flyout-id");var isOpen=D2L.LP.Web.UI.Desktop.Controls.MenuFlyout.IsOpen(bucketId);D2L.LP.ActivityBar.UpdateTitle(bucketClassName,true);D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(alertImage,!isOpen);D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(openAlertImage,isOpen);var $newIndicator=$(D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-minibar-activity-message-new", bucket));if($newIndicator.hasClass("d2l-hidden"))$newIndicator.toggleClass("d2l-hidden")},OpenBucket:function(bucketClassName){var bucket=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName(bucketClassName);if(bucket===null)return;bucket.m_ariaMessageDisplayed=false;var alertImage=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("Alert",bucket);var openAlertImage=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("OpenAlert",bucket);D2L.LP.ActivityBar.UpdateTitle(bucketClassName,false);D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(alertImage, false);D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(openAlertImage,true);var $newIndicator=$(D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-minibar-activity-message-new",bucket));if(!$newIndicator.hasClass("d2l-hidden"))$newIndicator.toggleClass("d2l-hidden")},CloseBucket:function(bucketClassName){var bucket=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName(bucketClassName);if(bucket===null)return;bucket.m_ariaMessageDisplayed=false;var alertImage=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("Alert", bucket);var openAlertImage=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("OpenAlert",bucket);D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(alertImage,true);D2L.LP.Web.UI.Html.Dom.SetIsDisplayedNode(openAlertImage,false)},UpdateTitle:function(bucketClassName,hasNewAlerts){var bucketId=D2L.LP.Web.UI.ObjectRepository.Get(bucketClassName,"flyout-id");var title;if(hasNewAlerts)title=D2L.LP.Web.UI.ObjectRepository.Get(bucketClassName,"new-alert-title");else title=D2L.LP.Web.UI.ObjectRepository.Get(bucketClassName, "title");D2L.LP.Web.UI.Desktop.Controls.MenuFlyout.SetTitle(bucketId,title)}};D2L.Tools=D2L.Tools||{}; D2L.Tools.Logger=function(){var loggingBaseUrl="/d2l/logging/{logtype}/";var logMessage=function(type,message,callback){if(type===null||type===undefined||message===null||message===undefined||message.length<=0)return;var postUrl=loggingBaseUrl.replace(/{logtype}/,type);var successFunction=null;if(callback!==undefined&&callback!==null)successFunction=function(result){callback(result)};D2L.LP.Web.UI.Rpc.Connect(D2L.LP.Web.UI.Rpc.Verbs.POST,new D2L.LP.Web.Http.UrlLocation(postUrl),{message:message},{success:successFunction})}; return{Error:function(message,callback){logMessage("Error",message,callback)},Warn:function(message,callback){logMessage("Warn",message,callback)},Info:function(message,callback){logMessage("Info",message,callback)}}}();D2L.PT.Auth=D2L.PT.Auth||{}; D2L.PT.Auth.SessionTimeout={InitData:{ExpireIsVisible:false,ExpireFunc:function(){},Extending:false,ExtendFunc:function(){},IsInit:false,LogoutFunc:function(){},NewUserFunc:function(){},DismissNewUserFunc:function(){},RequiresSession:false,SessionTimeout:180*6E4,UserId:0,WarningBuffer:5*6E4,WarningIsVisible:false,WarningMessageId:null,WarningAlertId:null,WarningCheckId:null,WarningTimeoutIntervalIds:[]},SessionManager:null,ApplyTimeoutConstraints:function(oldTimeout){var newTimeout=oldTimeout;if(oldTimeout< 1)newTimeout=1;if(oldTimeout>35796)newTimeout=35796;return newTimeout},Expire:function(sm,expiredState){if(!sm.InitData.RequiresSession||sm.InitData.ExpireIsVisible)return;sm.InitData.ExpireIsVisible=true;D2L.LP.Web.UI.Html.JavaScript.Console.Debug("Session: Expired",expiredState);sm.HideWarning(sm);if(expiredState==="1")sm.InitData.LogoutFunc();else if(expiredState==="2")sm.InitData.ExpireFunc()},ExpiryInit:function(closeDialogFunc){var handleStorageChange=function(e){if(e.Key==="Session.Expired"&& e.NewValue==="0")closeDialogFunc()};D2L.LP.Web.UI.Events.OnStorage.AddListener(handleStorageChange)},FinalizeLogin:function(){if(!window.opener)return;window.close()},FinalizeLoginUsernamePassword:function(){D2L.LP.Web.UI.Html.Dom.Storage.Local.Set("Session.Expired","0")},GetWarningBuffer:function(){var me=D2L.PT.Auth.SessionTimeout;var buffer=10*60*1E3;if(me.InitData.SessionTimeout<=buffer)if(me.InitData.SessionTimeout>6E4)buffer=6E4;else buffer=0;return buffer},HandleSessionStorageChange:function(sm, expired){if(expired==="1"||expired==="2")sm.Expire(sm,expired);else{sm.InitData.ExpireIsVisible=false;D2L.LP.Web.UI.Html.JavaScript.Console.Debug("Session: Resumed");D2L.PT.Auth.SessionTimeout.HideWarning(sm)}},HandleLastAccessedStorageChange:function(sm){if(sm.InitData.SessionTimeout<18E4)return;if(sm.InitData.WarningTimeoutIntervalIds.length>0){sm.HideWarning(sm);for(var i=0;i<sm.InitData.WarningTimeoutIntervalIds.length;i++)clearTimeout(sm.InitData.WarningTimeoutIntervalIds[i])}var timeout=sm.InitData.SessionTimeout- sm.InitData.WarningBuffer;D2L.LP.Web.UI.Html.JavaScript.Console.Debug("Session: Resetting timeout");sm.InitData.WarningTimeoutIntervalIds=[setTimeout(function(){sm.ShowWarning(sm)},timeout)]},HandleUserStorageChange:function(sm,e){D2L.LP.Web.UI.Html.JavaScript.Console.Debug("Session: User change",e.OldValue,e.NewValue);sm.InitData.DismissNewUserFunc();if(e.NewValue!==sm.InitData.UserId)sm.InitData.NewUserFunc()},HideWarning:function(sm){if(!sm.InitData.WarningIsVisible)return;var isExpired=sm.IsExpired(); D2L.LP.Web.UI.Html.JavaScript.Console.Debug("Session: hiding warning");sm.InitData.WarningIsVisible=false;sm.InitData.Extending=false;var timeout=0;if(!isExpired){var $alert=$("#"+sm.InitData.WarningAlertId);var height=$alert.height();$alert.css("display","none");$("#"+sm.InitData.WarningCheckId).css({"height":height+"px","display":"block"});timeout=1E3}setTimeout(function(){D2L.LP.Web.UI.Desktop.MasterPages.PageMessage.Close(sm.InitData.WarningMessageId)},timeout)},IsExpired:function(){var expiredState= D2L.LP.Web.UI.Html.Dom.Storage.Local.Get("Session.Expired");var isExpired=expiredState==="1"||expiredState==="2";return isExpired},Init:function(userId,sessionTimeout,warningBuffer,warningMessageId,warningAlertId,warningCheckId,extendFunc,expireFunc,logoutFunc,newUserFunc,dismissNewUserFunc){var me=D2L.PT.Auth.SessionTimeout;sessionTimeout=me.ApplyTimeoutConstraints(sessionTimeout);me.InitData.ExpireFunc=expireFunc;me.InitData.ExtendFunc=extendFunc;me.InitData.IsInit=true;me.InitData.LogoutFunc=logoutFunc; me.InitData.NewUserFunc=newUserFunc;me.InitData.DismissNewUserFunc=dismissNewUserFunc;me.InitData.RequiresSession=true;me.InitData.SessionTimeout=sessionTimeout*6E4;me.InitData.UserId=userId;me.InitData.WarningBuffer=warningBuffer*6E4;me.InitData.WarningAlertId=warningAlertId;me.InitData.WarningCheckId=warningCheckId;me.InitData.WarningMessageId=warningMessageId;var findSessionManager=function(win){try{if(win&&win.D2L!==undefined){if(win.D2L.PT.Auth.SessionTimeout.InitData.IsInit)me.SessionManager= win.D2L.PT.Auth.SessionTimeout;if(win.parent&&win.parent!=win)findSessionManager(win.parent)}}catch(e){}};findSessionManager(window);if(me.SessionManager===null)return;var expired="0";var lastAccessed="0";if(me.SessionManager!==D2L.PT.Auth.SessionTimeout){D2L.LP.Web.UI.Html.Dom.Storage.Local.Set("Session.LastAccessed",(new Date).getTime().toString());D2L.LP.Web.UI.Html.Dom.Storage.Local.Set("Session.UserId",userId);return}var handleStorageChange=function(e){if(e.Key==="Session.Expired"){if(expired!== e.NewValue){expired=e.NewValue;me.HandleSessionStorageChange(me,expired)}}else if(e.Key==="Session.UserId"){if(userId!==e.NewValue){userId=e.NewValue;me.HandleUserStorageChange(me,e)}}else if(e.Key==="Session.LastAccessed")if(lastAccessed!==e.NewValue){lastAccessed=e.NewValue;me.HandleLastAccessedStorageChange(me)}};var handleClickKey=function(){if(!me.InitData.WarningIsVisible||me.InitData.Extending)return;me.InitData.Extending=true;me.InitData.ExtendFunc()};D2L.LP.Web.UI.Html.Dom.Storage.Local.Set("Session.Expired", expired);D2L.LP.Web.UI.Html.Dom.Storage.Local.Set("Session.UserId",userId);D2L.LP.Web.UI.Events.OnClick.AddListener(handleClickKey);D2L.LP.Web.UI.Events.OnKeyPress.AddListener(handleClickKey);D2L.LP.Web.UI.Events.OnFraUserEvent.AddListener(handleClickKey);D2L.LP.Web.UI.Events.OnStorage.AddListener(handleStorageChange);D2L.LP.Web.UI.Html.Dom.Storage.Local.Set("Session.LastAccessed",(new Date).getTime().toString())},RpcReceivePayloadProvider:function(result){var sm=D2L.PT.Auth.SessionTimeout.SessionManager; if(sm===null)return;D2L.LP.Web.UI.Html.JavaScript.Console.Debug("Session: Rpc update, has expired:",result.HasExpired,"Keep alive:",result.KeepAlive);if(sm.IsExpired()){D2L.LP.Web.UI.Html.JavaScript.Console.Debug("Session: already expired");return}if(result.HasExpired)D2L.LP.Web.UI.Html.Dom.Storage.Local.Set("Session.Expired","2");else if(result.KeepAlive)D2L.LP.Web.UI.Html.Dom.Storage.Local.Set("Session.LastAccessed",(new Date).getTime().toString())},ShowWarning:function(sm){if(sm.InitData.WarningIsVisible|| sm.IsExpired())return;var timeout=5E4;var shake=function(){D2L.LP.Web.UI.Desktop.MasterPages.PageMessage.Shake(sm.InitData.WarningMessageId);sm.InitData.WarningTimeoutIntervalIds.push(setTimeout(shake,timeout));timeout=6E4};D2L.LP.Web.UI.Html.JavaScript.Console.Debug("Session: showing warning");sm.InitData.WarningIsVisible=true;D2L.LP.Web.UI.Desktop.MasterPages.PageMessage.Open(sm.InitData.WarningMessageId);setTimeout(function(){var checkNode=D2L.LP.Web.UI.Html.Dom.GetElementById(sm.InitData.WarningCheckId); if(checkNode)checkNode.style.display="none";var alertNode=D2L.LP.Web.UI.Html.Dom.GetElementById(sm.InitData.WarningAlertId);if(alertNode)alertNode.style.display="block";sm.InitData.WarningTimeoutIntervalIds.push(setTimeout(shake,5E3))},50)}}; D2L.PT.Auth.Logout=function(logoutLocation){var frm=document.createElement("form");frm.target="_top";frm.action=logoutLocation;frm.method="post";var hidden=document.createElement("input");hidden.type="hidden";hidden.name=D2L.LP.Web.Authentication.Xsrf.GetXsrfTokenParameterName();hidden.value=D2L.LP.Web.Authentication.Xsrf.GetXsrfToken();frm.appendChild(hidden);document.dispatchEvent(new CustomEvent("d2l-logout",{bubbles:true}));document.body.appendChild(frm);frm.submit();D2L.LP.Web.UI.Html.JavaScript.Console.Debug("Session: logging out..."); D2L.LP.Web.UI.Html.Dom.Storage.Local.Set("Session.Expired","1",false)};D2L.PT.Navbars={}; D2L.PT.Navbars.Daylight={Init:function(node){D2L.PT.Navbars.Daylight.ShowNavbar().then(function(showNavbar){if(!showNavbar){node.setAttribute("suppressed","suppressed");return}D2L.PT.Navbars.Daylight.Chomper.Init(node);var dropdowns=node.querySelectorAll("d2l-dropdown");for(var i=0;i<dropdowns.length;i++)D2L.PT.Navbars.Daylight.InitDropdown(dropdowns[i]);D2L.PT.Navbars.Daylight.InitPopups(node);D2L.PT.Navbars.Daylight.InitNotifications(node);D2L.PT.Navbars.Daylight.MobileMenu.Init(node)})},InitDropdown:function(dropdown){var opener= dropdown.querySelector(".d2l-dropdown-opener");if(opener===null)return;dropdown.addEventListener("d2l-dropdown-open",function(){opener.setAttribute("data-active","true");if(dropdown.parentNode.classList.contains("d2l-navigation-s-notification"))opener.removeAttribute("notification")});dropdown.addEventListener("d2l-dropdown-close",function(){opener.removeAttribute("data-active")});if(opener.hasAttribute("data-prl")){var first=true;opener.addEventListener("click",function(){if(first){first=false;dropdown.removeAttribute("no-auto-open"); D2L.PT.Navbars.Daylight.PartialDropdown(opener,dropdown)}})}},InitNotifications:function(node){D2L.LP.ActivityBar.OnNotification.AddListener(function(category){var selector='.d2l-navigation-s-notification[data-category="'+category.toLowerCase()+'"]';var notification=node.querySelector(selector);if(notification){var opener=notification.querySelector(".d2l-dropdown-opener");if(opener)opener.setAttribute("notification","");D2L.LP.Web.UI.Html.Aria.LogMessage(notification.getAttribute("data-aria-message"))}})}, InitPopups:function(node){var popups=node.querySelectorAll(".d2l-navigation-s-link-popup");for(var i=0;i<popups.length;i++)D2L.PT.Navbars.Daylight.InitPopup(popups[i])},InitPopup:function(node){node.addEventListener("click",function(e){e.preventDefault();var href=node.getAttribute("href");var width=node.hasAttribute("data-popup-width")?node.getAttribute("data-popup-width"):0;var height=node.hasAttribute("data-popup-height")?node.getAttribute("data-popup-height"):0;D2L.LP.Web.UI.Html.Dom.OpenWindow(href, D2L.LP.Web.Http.UrlLocation.Create(href),width,height,node.hasAttribute("data-popup-menubar"),node.hasAttribute("data-popup-toolbar"),null,true)})},ShowNavbar:function(){if(window===window.parent)return Promise.resolve(true);var win=window;do{win=win.parent;var doc;try{doc=win.document}catch(e){return crossOriginStrategy()}if(documentHasAVisibleNav(doc))return Promise.resolve(false);if(documentHasASuppressionElement(doc))return Promise.resolve(false)}while(win!==win.parent);return Promise.resolve(true); function documentHasAVisibleNav(doc){var navElems=doc.getElementsByClassName("d2l-navigation-s");for(var i=0;i<navElems.length;i++)if(navElems[i].offsetParent)return true;return false}function documentHasASuppressionElement(doc){var suppressedElems=doc.getElementsByClassName("d2l-suppress-nav");return suppressedElems.length>0}function crossOriginStrategy(){return new Promise(function(resolve){var timeout=setTimeout(function(){window.removeEventListener("message",suppressionListener);resolve(true)}, 1E3);var suppressionListener=window.addEventListener("message",function(event){var data;try{data=JSON.parse(event.data)}catch(e){return}if(data.eventType!=="d2l-suppress-nav")return;clearTimeout(timeout);window.removeEventListener("message",suppressionListener);resolve(false)});window.parent.postMessage(JSON.stringify({eventType:"d2l-suppress-nav-question"}),"*")})}},PartialDropdown:function(opener,dropdown){var dropdownContent=dropdown.querySelector("d2l-dropdown-content");if(!dropdownContent)return; var partialRenderLocation=D2L.LP.Web.Http.UrlLocation.Create(opener.getAttribute("data-prl"));var placeholderId=new D2L.LP.Web.UI.Html.AbsoluteHtmlId(opener.getAttribute("data-prid"));dropdownContent.forceRender();D2L.LP.Web.UI.Html.PartialRendering.PartialRender(placeholderId,function(){return D2L.LP.Web.UI.Rpc.ConnectPartial(placeholderId,"GET",partialRenderLocation)}).AddListener(function(){dropdown.toggleOpen()})}}; D2L.PT.Navbars.Daylight.Chomper={Chomp:function(handle){var success=D2L.PT.Navbars.Daylight.Chomper.InitWidths(handle);if(!success)return;var availableWidth=handle.groupNode.clientWidth;if(handle.totalWidth>availableWidth)availableWidth=availableWidth-handle.moreWidth;var moreItemNodes=handle.moreNode.querySelectorAll(".d2l-navigation-s-menu-item-root");var someItemHasFocus=D2L.LP.Web.UI.Html.Dom.IsAncestor(handle.groupNode,document.activeElement);var usedWidth=0;var focusMore=false;for(var i=0;i< handle.itemNodes.length;i++){usedWidth+=handle.itemWidths[i];var itemNode=handle.itemNodes[i];if(usedWidth<availableWidth){itemNode.removeAttribute("data-hidden");if(moreItemNodes.length>i)moreItemNodes[i].classList.add("d2l-hidden")}else{var isFocused=someItemHasFocus&&D2L.LP.Web.UI.Html.Dom.IsAncestor(itemNode,document.activeElement);if(isFocused)focusMore=true;itemNode.setAttribute("data-hidden","1");if(moreItemNodes.length>i)moreItemNodes[i].classList.remove("d2l-hidden")}}if(handle.totalWidth<= availableWidth){var moreIsFocused=someItemHasFocus&&D2L.LP.Web.UI.Html.Dom.IsAncestor(handle.moreNode,document.activeElement);if(moreIsFocused)D2L.PT.Navbars.Daylight.Chomper.FocusItem(handle,handle.itemNodes.length-1);handle.moreNode.setAttribute("data-hidden","1");handle.groupNode.removeAttribute("data-more")}else{handle.moreNode.removeAttribute("data-hidden");handle.groupNode.setAttribute("data-more","1");if(focusMore)D2L.LP.Web.UI.Html.Dom.FocusNode(handle.moreFocusNode)}handle.groupNode.removeAttribute("data-loading")}, FocusItem:function(handle,index){var elem=handle.itemNodes[index].querySelector(".d2l-navigation-s-link");if(elem===null)elem=handle.itemNodes[index].querySelector(".d2l-dropdown-opener");requestAnimationFrame(function(){D2L.LP.Web.UI.Html.Dom.FocusNode(elem)})},Init:function(node){var groupNode=node.querySelector(".d2l-navigation-s-main-wrapper");if(groupNode===null)return;var moreNode=groupNode.querySelector(".d2l-navigation-s-more");var handle={node:node,groupNode:groupNode,itemNodes:groupNode.querySelectorAll(".d2l-navigation-s-item:not(.d2l-navigation-s-more)"), itemWidths:null,moreNode:moreNode,moreFocusNode:moreNode.querySelector(".d2l-dropdown-opener"),moreWidth:null,totalWidth:0};function doChomp(){requestAnimationFrame(function(){D2L.PT.Navbars.Daylight.Chomper.Chomp(handle)})}window.addEventListener("resize",doChomp);doChomp()},InitWidths:function(handle){if(!handle.groupNode.hasAttribute("data-unmeasured"))return true;if(handle.moreNode.offsetParent===null)return false;if(handle.itemWidths===null){handle.itemWidths=[];for(var i=0;i<handle.itemNodes.length;i++){var w= handle.itemNodes[i].offsetWidth+20;handle.totalWidth+=w;handle.itemWidths.push(w)}}if(handle.moreWidth===null){handle.moreNode.removeAttribute("data-hidden");handle.moreWidth=handle.moreNode.offsetWidth;handle.moreNode.setAttribute("data-hidden","1")}handle.groupNode.removeAttribute("data-unmeasured");return true}};D2L.PT.Navbars.Daylight.LinksArea={}; D2L.PT.Navbars.Daylight.LinksArea.ImageBased={CloseTray:function(handle){requestAnimationFrame(function(){var handleAnimationEnd=function(){handle.listNode.removeEventListener("transitionend",handleAnimationEnd);requestAnimationFrame(function(){handle.trayNode.removeAttribute("closing");this.HandleListOverflow(handle)}.bind(this))}.bind(this);handle.listNode.addEventListener("transitionend",handleAnimationEnd);handle.trayNode.removeAttribute("scrollable");handle.trayNode.setAttribute("closing","closing"); handle.trayNode.removeAttribute("opened");handle.listNode.style.maxHeight=""}.bind(this))},GetItems:function(handle){return handle.listNode.parentNode.querySelectorAll(".d2l-navigation-main-ib-list > .d2l-navigation-ib-item")},HandleListOverflow:function(handle){var items=this.GetItems(handle);if(!items||items.length===0)return;requestAnimationFrame(function(){var isOpen=handle.trayNode.hasAttribute("opened");if(isOpen)return;if(handle.itemRect===null){var itemRect=items[0].getBoundingClientRect(); if(itemRect.height===0||itemRect.width===0)return;handle.itemRect={height:itemRect.height,width:itemRect.width}}var listRect=handle.listNode.getBoundingClientRect();if(handle.minListHeight===null)handle.minListHeight=listRect.height;var containerWidth=listRect.width-8;if(handle.itemRect.width<=0)return;var itemsPerRow=Math.floor(containerWidth/handle.itemRect.width);if(itemsPerRow===0)return;var isPullyShown=handle.pullyNode.hasAttribute("shown");var isOverflowing=items.length>itemsPerRow;requestAnimationFrame(function(){if(isOverflowing!== isPullyShown)if(isOverflowing)handle.pullyNode.setAttribute("shown","shown");else handle.pullyNode.removeAttribute("shown");for(var j=0;j<items.length;j++){var item=items[j];if(j<itemsPerRow){item.removeAttribute("overflow-item");item.style.display=""}else{item.setAttribute("overflow-item","overflow-item");item.style.display="none"}}if(isOverflowing){handle.pullyNode.setAttribute("title",handle.pullyNode.getAttribute("data-show-text"));handle.pullyNode.setAttribute("role","button");handle.pullyNode.tabIndex= 0}else{handle.pullyNode.removeAttribute("title");handle.pullyNode.removeAttribute("role");handle.pullyNode.tabIndex=-1}})}.bind(this))},HandleResize:function(handle){this.HandleListOverflow(handle);var isOpen=handle.trayNode.hasAttribute("opened");if(!isOpen)return;requestAnimationFrame(function(){var heightAvailable=this.GetAvailableHeight(handle);requestAnimationFrame(function(){handle.listNode.style.maxHeight=heightAvailable+"px"})}.bind(this))},Init:function(node){var pullyNode=node.querySelector(".d2l-navigation-main-ib-pully"); pullyNode.addEventListener("focus",function(){node.setAttribute("ib-pully-focus","")},true);pullyNode.addEventListener("blur",function(){node.removeAttribute("ib-pully-focus")},true);pullyNode.addEventListener("mouseenter",function(){node.setAttribute("ib-pully-hover","")});pullyNode.addEventListener("mouseleave",function(){node.removeAttribute("ib-pully-hover")});window.D2L.Gestures.Swipe.register(node);var handle={itemRect:null,listNode:null,minListHeight:null,node:node,trayNode:null,pullyNode:pullyNode}; this.InitTray(handle)},InitTray:function(handle){handle.trayNode=handle.node.querySelector(".d2l-navigation-main-ib-tray");handle.listNode=handle.node.querySelector(".d2l-navigation-main-ib-list");handle.pullyNode.addEventListener("click",function(){if(handle.pullyNode.hasAttribute("shown"))this.ToggleOverflow(handle,false)}.bind(this));handle.pullyNode.addEventListener("keypress",function(e){if(e.keyCode===13&&handle.pullyNode.hasAttribute("shown"))this.ToggleOverflow(handle,true)}.bind(this));handle.node.addEventListener("d2l-gesture-swipe", function(e){var isOpen=handle.trayNode.hasAttribute("opened");if(isOpen&&e.detail.direction.vertical==="up")this.CloseTray(handle);else if(!isOpen&&e.detail.direction.vertical==="down")this.OpenTray(handle,false)}.bind(this));window.addEventListener("resize",function(){this.HandleResize(handle)}.bind(this));handle.listNode.addEventListener("scroll",function(){this.ToggleListCaps(handle)}.bind(this));this.HandleListOverflow(handle)},GetAvailableHeight:function(handle){var listRect=handle.listNode.getBoundingClientRect(); var heightAbove=listRect.top+document.body.scrollTop;var availableHeight=window.innerHeight-heightAbove-80;return availableHeight<handle.minListHeight?handle.minListHeight:availableHeight},OpenTray:function(handle,applyFocus){var items=this.GetItems(handle);var firstOverflowItem=handle.listNode.querySelector("[overflow-item]");requestAnimationFrame(function(){for(var i=0;i<items.length;i++)items[i].style.display=""});requestAnimationFrame(function(){var heightAvailable=this.GetAvailableHeight(handle); requestAnimationFrame(function(){var handleAnimationEnd=function(){firstOverflowItem.removeEventListener("animationend",handleAnimationEnd);this.ToggleListCaps(handle);requestAnimationFrame(function(){handle.trayNode.setAttribute("scrollable","scrollable");if(applyFocus){var firstOverflowLink=firstOverflowItem.querySelector(".d2l-navigation-ib-item-link");if(firstOverflowLink)firstOverflowLink.focus()}})}.bind(this);firstOverflowItem.addEventListener("animationend",handleAnimationEnd);handle.listNode.style.maxHeight= heightAvailable+"px";handle.trayNode.setAttribute("opened","opened");handle.pullyNode.setAttribute("title",handle.pullyNode.getAttribute("data-hide-text"))}.bind(this))}.bind(this))},ToggleListCaps:function(handle){requestAnimationFrame(function(){var scrollTop=handle.listNode.scrollTop;var isScrolledTop=scrollTop===0;var isScrolledBottom=handle.listNode.scrollHeight-(scrollTop+handle.listNode.clientHeight)<5;requestAnimationFrame(function(){if(isScrolledTop)handle.trayNode.removeAttribute("overflow-top"); else handle.trayNode.setAttribute("overflow-top","overflow-top");if(isScrolledBottom)handle.trayNode.removeAttribute("overflow-bottom");else handle.trayNode.setAttribute("overflow-bottom","overflow-bottom")}.bind(this))}.bind(this))},ToggleOverflow:function(handle,applyFocus){var isOpen=handle.trayNode.hasAttribute("opened");if(isOpen)this.CloseTray(handle);else this.OpenTray(handle,applyFocus)}}; D2L.PT.Navbars.Daylight.MobileMenu={Init:function(node){var mobileMenu=node.querySelector(".d2l-navigation-s-mobile-menu");var handle={focusTrapEnd:null,focusTrapStart:null,closeButton:null,courseMenuButton:null,courseMenuPartialled:false,first:null,getState:function(){return mobileMenu.getAttribute("data-state")},hideCourseMenuButton:null,itemMenu:null,initialized:false,mobileMenu:mobileMenu,opener:node.querySelector(".d2l-navigation-s-header-open-button-wrapper d2l-navigation-button-notification-icon"), setState:function(state){mobileMenu.setAttribute("data-state",state)}};if(handle.opener){handle.opener.addEventListener("click",function(){D2L.PT.Navbars.Daylight.MobileMenu.Open(handle)});mobileMenu.addEventListener("d2l-organization-consortium-tabs-notification-update",function(e){if(e.detail.hasOrgTabNotifications){handle.opener.setAttribute("notification-text",e.detail.notificationText);handle.opener.setAttribute("notification","notification")}else handle.opener.removeAttribute("notification")})}}, InitOnFirstOpen:function(handle){if(handle.initialized)return;handle.initialized=true;handle.focusTrapStart=handle.mobileMenu.querySelector(".d2l-navigation-s-mobile-menu-focus-trap-start");handle.focusTrapEnd=handle.mobileMenu.querySelector(".d2l-navigation-s-mobile-menu-focus-trap-end");handle.first=handle.mobileMenu.querySelector(".d2l-navigation-s-mobile-menu-first");handle.hideCourseMenuButton=handle.mobileMenu.querySelector(".d2l-navigation-s-mobile-menu-header-course-menu button");handle.courseMenuButton= handle.mobileMenu.querySelector(".d2l-navigation-s-mobile-menu-course-selector d2l-navigation-button-notification-icon");handle.itemMenu=handle.mobileMenu.querySelector(".d2l-navigation-s-mobile-menu-nav d2l-menu");handle.closeButton=handle.mobileMenu.querySelector(".d2l-navigation-s-mobile-menu-mask-close button");handle.orgTabs=handle.mobileMenu.querySelector("d2l-organization-consortium-tabs");handle.closeButton.addEventListener("touchend",function(){D2L.PT.Navbars.Daylight.MobileMenu.Close(handle)}); handle.focusTrapStart.addEventListener("focus",function(){window.D2L.Dom.Focus.getPreviousFocusable(handle.focusTrapEnd).focus()});handle.focusTrapEnd.addEventListener("focus",function(){handle.closeButton.focus()});var mask=handle.mobileMenu.querySelector(".d2l-navigation-s-mobile-menu-mask");if(mask)mask.addEventListener("click",function(){D2L.PT.Navbars.Daylight.MobileMenu.Close(handle)});if(handle.courseMenuButton)handle.courseMenuButton.addEventListener("click",function(){D2L.PT.Navbars.Daylight.MobileMenu.ShowCourseMenu(handle)}); if(handle.hideCourseMenuButton)handle.hideCourseMenuButton.addEventListener("click",function(){D2L.PT.Navbars.Daylight.MobileMenu.HideCourseMenu(handle,false)});if(handle.orgTabs)handle.orgTabs.tryRequestScroll()},Close:function(handle){if(handle.getState()!=="opened")return;handle.setState("transition");document.body.style.overflow="auto";document.body.style.position="static";document.body.style.width="auto";setTimeout(function(){handle.setState("closed");D2L.PT.Navbars.Daylight.MobileMenu.HideCourseMenu(handle, true)},350);handle.opener.focus()},Open:function(handle){if(handle.getState()!=="closed")return;D2L.PT.Navbars.Daylight.MobileMenu.InitOnFirstOpen(handle);handle.setState("transition");document.body.style.overflow="hidden";document.body.style.position="fixed";document.body.style.width="100%";handle.first.focus();if(handle.itemMenu){handle.itemMenu.resize();handle.itemMenu.show()}setTimeout(function(){handle.setState("opened")},50)},HideCourseMenu:function(handle,bypassFocus){handle.mobileMenu.classList.remove("d2l-navigation-s-mobile-menu-show-course-menu"); if(!bypassFocus)handle.courseMenuButton.focus();if(handle.itemMenu)handle.itemMenu.show()},ShowCourseMenu:function(handle){handle.mobileMenu.classList.add("d2l-navigation-s-mobile-menu-show-course-menu");handle.hideCourseMenuButton.focus();if(handle.courseMenuPartialled)return;handle.courseMenuPartialled=true;var partialRenderLocation=D2L.LP.Web.Http.UrlLocation.Create(handle.mobileMenu.getAttribute("data-cprl"));var placeholderId=new D2L.LP.Web.UI.Html.UniqueHtmlId;var placeholder=document.createElement("div"); placeholder.setAttribute("id",placeholderId.GetValue());var parent=handle.mobileMenu.querySelector(".d2l-navigation-s-mobile-menu-course-menu");parent.appendChild(placeholder);D2L.LP.Web.UI.Html.PartialRendering.PartialRender(placeholderId,function(){return D2L.LP.Web.UI.Rpc.ConnectPartial(placeholderId,"GET",partialRenderLocation)})}}; D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-navbar",function(node){D2L.LP.Web.UI.Html.Aria.SetRole(node,"navigation");var isRTL=D2L.LP.Globalization.Locale.GetTextFormatDescriptor().TextDirection==D2L.LP.Globalization.Formatting.Text.TextDirection.RightToLeft;var editLink=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-navbar-edit",node);var manageLink=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-navbar-manage",node);var container=D2L.LP.Web.UI.Html.Dom.GetFirstElementByClassName("d2l-max-width", node);if(editLink===null||container===null)return;var show=function(){var rect=D2L.LP.Web.UI.Html.Dom.GetBoundingRect(container);editLink.style.top=rect.top+25+"px";manageLink.style.top=rect.top+5+"px";var left;if(isRTL){left=rect.right;if(rect.right-13<rect.width)left=left+-13;editLink.style.left=left+"px";editLink.style.right="auto";manageLink.style.left=left+"px";manageLink.style.right="auto"}else{left=rect.left+-13;if(left<0)left=0;editLink.style.left=left+"px";manageLink.style.left=left+"px"}}; var hide=function(){if(isRTL){editLink.style.right="-10000px";manageLink.style.right="-10000px"}else{editLink.style.left="-10000px";manageLink.style.left="-10000px"}};D2L.LP.Web.UI.Html.Dom.AddEventListener("mouseover",node,show);D2L.LP.Web.UI.Html.Dom.AddEventListener("focus",editLink,show);D2L.LP.Web.UI.Html.Dom.AddEventListener("focus",manageLink,show);D2L.LP.Web.UI.Html.Dom.AddEventListener("mouseout",node,hide);D2L.LP.Web.UI.Html.Dom.AddEventListener("blur",editLink,hide);D2L.LP.Web.UI.Html.Dom.AddEventListener("blur", manageLink,hide)});D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-navigation-s",function(node){D2L.PT.Navbars.Daylight.Init(node)});D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-skipnav",function(node){if(D2L.LP.Web.UI.Flags.Flag("skipnav-skip-to-h1s",true))node.addEventListener("click",function(){var elem=document.querySelector("h1")||document.querySelector(".d2l-skipnav-target");if(elem){elem.tabIndex=-1;elem.focus()}})});D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-navigation-main-ib",function(node){D2L.PT.Navbars.Daylight.LinksArea.ImageBased.Init(node)}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-navigation-ib-item-group",function(node){var mobileMenuNode,groupContent;var onCloseGroup=function(){if(mobileMenuNode){mobileMenuNode.style.position="";mobileMenuNode.style.zIndex=""}};var showGroup=function(){if(!mobileMenuNode){var tempNode=node.parentNode;while(tempNode&&tempNode.nodeType!==9){if(tempNode.classList.contains("d2l-navigation-s-mobile-menu")){mobileMenuNode=tempNode;break}tempNode=tempNode.parentNode}}if(!groupContent){groupContent= node.querySelector(".d2l-navigation-ib-item-group-content");if(groupContent===null)return}groupContent=groupContent.cloneNode(true);var itemCount=groupContent.querySelectorAll(".d2l-navigation-ib-item").length;groupContent.classList.add(itemCount<5?"d2l-navigation-ib-item-group-content-2x2":"d2l-navigation-ib-item-group-content-3x3");if(node.parentNode.parentNode.classList.contains("d2l-navigation-mobile-ib-list"))groupContent.classList.add("d2l-navigation-mobile-ib-item-group-content");D2L.PT.Navbars.Daylight.InitPopups(groupContent); groupContent.style.display="";var titleElement=node.querySelector(".d2l-navigation-ib-item-link-text");D2L.LP.Web.UI.Desktop.MasterPages.Dialog.Inline.OpenWithElement(titleElement!==null?titleElement.textContent:"",groupContent,true,null,null,node.getAttribute("data-close-text"),null,null,null,onCloseGroup,node.id,null,null);if(mobileMenuNode){mobileMenuNode.style.position="relative";mobileMenuNode.style.zIndex="1000"}};node.addEventListener("click",function(){showGroup()})}); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-navigation-s-edit-menu",function(node){node.addEventListener("d2l-menu-item-select",function(e){if(e.target.classList.contains("d2l-navigation-s-menu-item-customize-edit")){var customizeEditNode=node.querySelector(".d2l-navigation-s-menu-item-customize-edit");var customizeEditOnSelectHandler=D2L.LP.Web.UI.ObjectRepository.TryGet(customizeEditNode.id);if(customizeEditOnSelectHandler)customizeEditOnSelectHandler.call(customizeEditOnSelectHandler)}if(e.target.classList.contains("d2l-navigation-s-menu-item-edit-shared")){var editSharedNode= node.querySelector(".d2l-navigation-s-menu-item-edit-shared");var editSharedOnSelectHandler=D2L.LP.Web.UI.ObjectRepository.TryGet(editSharedNode.id);if(editSharedOnSelectHandler)editSharedOnSelectHandler.call(editSharedOnSelectHandler)}})});D2L.PT.ExternalUrls={Web:{Desktop:{HtmlEditor:{},Whitelisting:{},XSPL:{IFrame:{}}}}}; D2L.PT.ExternalUrls.Web.Desktop.HtmlEditor.XSPLScript={Initialize:function(){var events={_convertXSPLIFrameToXSPLImagePlaceholder:function(context){var plugin=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin;if(context.content===null||context.content.length===0)return;var tempContent=context.content;var replace=function(match){var originalContent=events._getOriginalContent(match);var originalContentEncoded=plugin.EncodeAllRaw(originalContent);var img='<img style="'+events._getImageStyle()+ '" class="d2l-xspl-image-placehoder" src="/d2l/img/LP/htmlEditor/eq_trans.gif" data-d2l-xspl-original-html="'+originalContentEncoded+'"/>';return img};tempContent=tempContent.replace(events._xsplIFrameRegEx(),replace);context.content=tempContent},_xsplIFrameRegEx:function(){return/<iframe[^>]*class=\"d2l-xspl-box\"[^>]*>(.|\n|\r)*?<\/iframe>/gi},_getImageStyle:function(height,width){return"border:1px solid #333399; background-position:center;"+" height:"+(height||173)+"px;"+"width:"+(width||330)+ "px;"+" background-repeat:no-repeat; background-color:#ffffcc;"+" background-image:url('../../../d2l/img/lp/xspl/50.png');"},_getOriginalContent:function(html){var plugin=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin;var tempContent=html;var replace=function(match){var originalContent=match;var originalContentHtmlEncodedMatch=match.match(/ data-original-html=\"([^\"]*)\"/i);if(originalContentHtmlEncodedMatch&&originalContentHtmlEncodedMatch[1]){var originalContentHtmlEncoded= originalContentHtmlEncodedMatch[1];originalContent=plugin.Decode(originalContentHtmlEncoded);originalContent=events._getOriginalContent(originalContent)}return originalContent};tempContent=tempContent.replace(events._xsplIFrameRegEx(),replace);return tempContent},_convertXSPLImagePlaceholderToOriginalContent:function(context){var plugin=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin;if(context.content===null||context.content.length===0)return;var tempContent=context.content;var replace= function(match){var originalContent=match;var originalContentHtmlEncodedMatch=match.match(/ data-d2l-xspl-original-html=\"([^\"]*)\"/i);if(originalContentHtmlEncodedMatch&&originalContentHtmlEncodedMatch[1]){var originalContentHtmlEncoded=originalContentHtmlEncodedMatch[1];originalContent=plugin.Decode(originalContentHtmlEncoded)}return originalContent};tempContent=tempContent.replace(/<img[^>]*class=\"d2l-xspl-image-placehoder\"[^>]*>/gi,replace);context.content=tempContent},onBeforeSetContent:function(o){events._convertXSPLIFrameToXSPLImagePlaceholder(o); return},onPostProcess:function(o){events._convertXSPLImagePlaceholderToOriginalContent(o);return}};var plugin=D2L.LP.Web.UI.Desktop.Controls.HtmlEditor.WysiwygEditor.Core.Plugin.InitializeScript("Script",{"name":"d2l_xspl","onSetContent":function(obj){events.onBeforeSetContent(obj)},"onGetContent":function(obj){events.onPostProcess(obj)}});return plugin}}; D2L.PT.ExternalUrls.Web.Desktop.Whitelisting.ClearGridEdit=function(idString){var grid=$(".d2l-grid-wrapper");var editTargets=grid.find(".d2l-editable-target");var editables=grid.find(".d2l-editable-padding");var edits=grid.find(".d2l-edit");for(i=0;i<editTargets.length;++i){if(editTargets[i].id===idString)continue;D2L.LP.Web.UI.Desktop.Controls.EditInPlace.Finish(new D2L.LP.Web.UI.Html.AbsoluteHtmlId(editTargets[i].id));D2L.LP.Web.UI.Common.Controls.Edit.SetValue(new D2L.LP.Web.UI.Html.AbsoluteHtmlId(edits[i].id), editables[i].children[0].textContent)}};D2L.PT.ExternalUrls.Web.Desktop.Whitelisting.StripLRM=function(id){var input=id.$();var value=input.val();value=value.replace(/\u200E/g,"");input.val(value)};D2L.PT.ExternalUrls.Web.Desktop.XSPL.ReplaceXSPLWithOriginalHtml=function(url,xsplNode){var originalHtml=D2L.LP.Web.UI.Html.Dom.GetAttribute(xsplNode,"data-original-html");originalHtml=D2L.PT.ExternalUrls.Web.Desktop.XSPL.FixNestedXSPLIFrames(url,originalHtml);if(originalHtml)$(xsplNode).replaceWith(originalHtml)}; D2L.PT.ExternalUrls.Web.Desktop.XSPL.Allow=function(xsplNode,url,blockLinkText){var linkContainer=document.createElement("div");var originalXSPLCode;if(xsplNode.outerHTML!==undefined)originalXSPLCode=xsplNode.outerHTML;else originalXSPLCode=$("<div>").append($(xsplNode).clone()).html();var onClickHandler=function(){originalXSPLCode=D2L.PT.ExternalUrls.Web.Desktop.XSPL.AddUnTrustParam(originalXSPLCode);$(linkContainer).prev().replaceWith(originalXSPLCode);$(linkContainer).remove()};var link=D2L.PT.ExternalUrls.Web.Desktop.XSPL.BuildBlockLink(blockLinkText, onClickHandler);linkContainer.appendChild(link);D2L.LP.Web.UI.Html.Dom.InsertElementAfter(linkContainer,xsplNode);D2L.PT.ExternalUrls.Web.Desktop.XSPL.ReplaceXSPLWithOriginalHtml(url,xsplNode);return true}; D2L.PT.ExternalUrls.Web.Desktop.XSPL.FixNestedXSPLIFrames=function(url,originalXSPLCode){var tempContent=originalXSPLCode;var replace=function(match){var originalContent=match;var src=match.match(/ src=\"([^\"]*)\"/i);if(src&&src[1]&&decodeURIComponent(src[1]).indexOf(url)>=-1){var encodedOriginalContentMatch=match.match(/ data-original-html=\"([^\"]*)\"/i);if(encodedOriginalContentMatch&&encodedOriginalContentMatch[1]){var originalContentHtmlEncoded=encodedOriginalContentMatch[1];originalContent= $("<div/>").html(originalContentHtmlEncoded).text();originalContent=D2L.PT.ExternalUrls.Web.Desktop.XSPL.FixNestedXSPLIFrames(url,originalContent)}}return originalContent};tempContent=tempContent.replace(/<iframe[^>]*class=\"d2l-xspl-box\"[^>]*>(.|\n|\r)*?<\/iframe>/gi,replace);return tempContent}; D2L.PT.ExternalUrls.Web.Desktop.XSPL.BuildBlockLink=function(blockLinkText,onClickHandler){var link=document.createElement("a");link.className="xspl-block-link";if(link.textContent!==undefined)link.textContent=blockLinkText;else if(node.innerText!==undefined)link.innerText=blockLinkText;D2L.LP.Web.UI.Html.Aria.SetRole(link,"button");D2L.LP.Web.UI.Common.Controls.Link.InstallClickable(link);D2L.LP.Web.UI.Html.Dom.AddEventListener("click",link,onClickHandler);return link}; D2L.PT.ExternalUrls.Web.Desktop.XSPL.AddUnTrustParam=function(originalXSPLCode){if(originalXSPLCode.indexOf("/lp/externalUrls/xspl?untrust=1")<0)originalXSPLCode=originalXSPLCode.replace("/lp/externalUrls/xspl?","/lp/externalUrls/xspl?untrust=1&");return originalXSPLCode}; D2L.PT.ExternalUrls.Web.Desktop.XSPL.IFrame.ReplaceMeWithOriginalHtml=function(url){var parentWindow=window.parent;var iframeNode=D2L.PT.ExternalUrls.Web.Desktop.XSPL.IFrame.GetIFrame();parentWindow.D2L.PT.ExternalUrls.Web.Desktop.XSPL.ReplaceXSPLWithOriginalHtml(url,iframeNode)}; D2L.PT.ExternalUrls.Web.Desktop.XSPL.IFrame.Allow=function(url,blockLinkText){var parentWindow=window.parent;var iframeNode=D2L.PT.ExternalUrls.Web.Desktop.XSPL.IFrame.GetIFrame();if(parentWindow.D2L)parentWindow.D2L.PT.ExternalUrls.Web.Desktop.XSPL.Allow(iframeNode,url,blockLinkText);else window.D2L.PT.ExternalUrls.Web.Desktop.XSPL.Allow(iframeNode,url,blockLinkText);var css=".d2l-xspl-box { width: 330px; min-height: 173px; } .xspl-block-link { text-decoration: none; color: #888888 !important; font-size: 0.85em; font-family:arial, helvetica, sans-serif; font-style: italic; cursor: pointer; outline: none !important; background-image:url('../../../d2l/img/lp/xspl/48.png'); background-position: left center; background-repeat: no-repeat; padding-left: 15px; } .xspl-block-link:hover, .xspl-block-link:focus { text-decoration: underline; } .xspl-container { background-color: #F8F8F8; padding: 12px; border: 1px solid #CCCCCC; box-shadow: inset 2px 4px 4px 0px rgba(0,0,0,.08); border-radius: 4px; }"; var style=parentWindow.document.createElement("style");if(style.styleSheet)style.styleSheet.cssText=css;else style.appendChild(parentWindow.document.createTextNode(css));parentWindow.document.getElementsByTagName("head")[0].appendChild(style)};D2L.PT.ExternalUrls.Web.Desktop.XSPL.IFrame.ResizeToContent=function(){var iframeNode=D2L.PT.ExternalUrls.Web.Desktop.XSPL.IFrame.GetIFrame();var height=D2L.LP.Web.UI.Html.Dom.GetPageSize(window).height;iframeNode.style.height=height+"px"}; D2L.PT.ExternalUrls.Web.Desktop.XSPL.IFrame.GetIFrame=function(){var doc=undefined;try{doc=window.parent.document}catch(e){}if(doc===undefined)return null;var iframes=window.parent.document.getElementsByTagName("iframe");for(var i=0;i<iframes.length;i++)if(iframes[i].contentWindow==window)return iframes[i];return null};if(window["D2L"]!==undefined&&D2L.LP.Web.Packaging!==undefined)D2L.LP.Web.Packaging.Register("D2L.LP.Web.Core.default");
resource1/1124/d2l/common/js/7.js
D2L.LE=D2L.LE||{};D2L.LE.Turnitin=D2L.LE.Turnitin||{};D2L.LE.Turnitin.CreationStatus={NotExists:0,Created:1,PendingCallback:2,CreationError:3,CallbackTimedOut:4,NotAttempted:5,Deactivated:6};D2L.LE.Turnitin.SubmissionStatus={NotSubmitted:0,PendingRetrieval:1,Complete:2,Error:3,PendingReport:4,ReportComplete:5};D2L.LE.Turnitin.OriginalityReportStatus={NotSubmitted:0,Pending:1,Complete:2};D2L.LE.Turnitin.SubmissionErrorType={NoError:0,FileError:1,UnknownError:2,ReportTimedOut:3,CallbackTimedOut:4}; D2L.LE=D2L.LE||{};D2L.LE.Turnitin=D2L.LE.Turnitin||{}; if(!D2L.LE.Turnitin.FileSubmission)D2L.LE.Turnitin.FileSubmission={AddOnRefreshHandler:function(handler){var me=D2L.LE.Turnitin.FileSubmission;var event=me._onRefreshEvent;event.RegisterMethod(handler)},AddOnLoadRefresh:function(orgUnitId,dropboxId,submissionId,fileId){var me=D2L.LE.Turnitin.FileSubmission;if(me._onLoadRefreshFiles[fileId])return;me._onLoadRefreshFiles[fileId]=true;setTimeout(function(){me.RefreshSubmission(orgUnitId,dropboxId,submissionId,fileId)},10)},RefreshSubmission:function(orgUnitId, dropboxId,submissionId,fileId){var route=new D2L.LP.Web.Mvc.RouteLocation.Create(this._refreshUrl,null,{orgUnitId:orgUnitId,dropboxId:dropboxId,submissionId:submissionId,fileId:fileId});var callback=function(summary){var me=D2L.LE.Turnitin.FileSubmission;me._onRefreshEvent.Trigger(summary)};D2L.LP.Web.UI.Rpc.Connect(D2L.LP.Web.UI.Rpc.Verbs.GET,route,null,{success:callback})},_refreshUrl:"/d2l/le/dropbox/{orgUnitId}/turnitin/{dropboxId}/submission/{submissionId}/{fileId}/Summary",_onLoadRefreshFiles:{}, _onRefreshEvent:new D2L.EventHandler};D2L.LE=D2L.LE||{};D2L.LE.Turnitin=D2L.LE.Turnitin||{}; D2L.LE.Turnitin.Grademark={RefreshControl:function(fileId){$("#grademarkContentsContainer_"+fileId).addClass("d2l-hidden");$("#grademarkRefreshText_"+fileId).show();var node=$("#grademark_"+fileId);var orgUnitId=node.attr("data-org-unit-id");var dropboxId=node.attr("data-dropbox-id");var submissionId=node.attr("data-submission-id");D2L.LE.Turnitin.FileSubmission.RefreshSubmission(orgUnitId,dropboxId,submissionId,fileId)},OnRefreshHandler:function(summary){var grademark=summary.Grademark;var transferScoreAutomatically= summary.TransferScoreAutomatically;if(!grademark)return;var fileId=summary.FileId;var link=grademark.ViewGrademarkUrl;var grademarkContents=$("#grademarkContentsContainer_"+fileId);if(!link){grademarkContents.addClass("d2l-hidden");return}grademarkContents.removeClass("d2l-hidden");var grademarkEditLink=$("#grademarkEditLink_"+fileId);grademarkEditLink.attr("href",link);grademarkEditLink.attr("target","_blank");var feedbackExists=grademark.FeedbackExists;var feedbackIndicatorIcon=$("#grademarkFeedbackIndicator_"+ fileId);if(feedbackExists)feedbackIndicatorIcon.removeClass("d2l-hidden");else feedbackIndicatorIcon.addClass("d2l-hidden");var score=grademark.Score;var scoreTextContainer=$("#grademarkScoreText_"+fileId);var useScoreContainer=$("#grademarkUseThisScoreLink_"+fileId);if(score===null){useScoreContainer.addClass("d2l-hidden");var langTermNoScore=(new D2L.LP.Text.LangTerm("Dropbox.Turnitin:GradeMarkView.txtNoScore")).GetText();langTermNoScore.Register(function(text){scoreTextContainer.text(text);scoreTextContainer.addClass("d2l-textblock-disabled")})}else{if(useScoreContainer.length&& UI.GetControl("ED_Score")){useScoreContainer.removeClass("d2l-hidden");$("#grademarkScore_"+fileId).val(score)}else useScoreContainer.addClass("d2l-hidden");var langTermScore=(new D2L.LP.Text.LangTerm("Dropbox.Turnitin:GradeMarkView.txtScore",score,grademark.MaxScore)).GetText();langTermScore.Register(function(text){scoreTextContainer.text(text);scoreTextContainer.removeClass("d2l-textblock-disabled")});if(transferScoreAutomatically&&UI.GetControl("ED_Score"))D2L.LE.Turnitin.Legacy.Grademark.CopyScoreToGrades(score, false)}$("#grademarkRefreshText_"+fileId).hide();$("#grademarkContents_"+fileId).removeClass("d2l-hidden")}};D2L.LE.Turnitin.FileSubmission.AddOnRefreshHandler(D2L.LE.Turnitin.Grademark.OnRefreshHandler); D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-grademark",function(node){var orgUnitId=node.getAttribute("data-org-unit-id");var dropboxId=node.getAttribute("data-dropbox-id");var submissionId=node.getAttribute("data-submission-id");var fileId=node.getAttribute("data-file-id");D2L.LE.Turnitin.FileSubmission.AddOnLoadRefresh(orgUnitId,dropboxId,submissionId,fileId)});D2L.LE=D2L.LE||{};D2L.LE.Turnitin=D2L.LE.Turnitin||{}; D2L.LE.Turnitin.OriginalityReport={AdjustAria:function(nodeId){$("#"+nodeId).attr("aria-hidden",true)},SetOnOpenFunction:function(onOpenFunction,fileId){if(typeof onOpenFunction!=="function")onOpenFunction=window[onOpenFunction];if(fileId)this._onOpenFunctions[fileId]=onOpenFunction;else if(!this._onOpenFunction)this._onOpenFunction=onOpenFunction},TriggerOnOpen:function(fileId){var me=D2L.LE.Turnitin.OriginalityReport;var onOpenFunction=me._onOpenFunctions[fileId];if(onOpenFunction)onOpenFunction(fileId); else if(me._onOpenFunction)me._onOpenFunction(fileId)},_onOpenFunction:null,_onOpenFunctions:{}};if(window["D2L"]!==undefined&&D2L.LP.Web.Packaging!==undefined)D2L.LP.Web.Packaging.Register("D2L.LE.Dropbox.Integration.Turnitin.Desktop.default");
resource1/1124/d2l/common/js/8.js
D2L.LP.Web.UI.Html.Dom.AddClassInitializer("d2l-grid-action-wrapper",function(node){node.addEventListener("d2l-button-ghost-click",function(e){if(!e.target||!e.target.firstChild)return;var firstChild=e.target.firstChild;if(firstChild.onclick)try{firstChild.onclick.call(e.target.firstChild)}catch(e){D2L.LP.Web.UI.Html.JavaScript.Console.Warn("d2l-grid-action-wrapper: not able to call onclick",e.data)}else firstChild.dispatchEvent(new MouseEvent("click",{"view":window,"bubbles":true,"cancelable":false}))})}); D2L.Control.Grid=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.nameOrMappedId="";this.type=D2L.Control.Grid.Type.Data;this.activatedKey="";this.pageNum=1;this.pageSize=20;this.sortField="";this.sortDir=1;this.sortFieldForState="";this.sortDirForState=1;this.isUsingDefaultSort=false;this.search=null;this.m_selectionAllowMultiple=true;this.m_treeType=null;this.m_slPgSz1=null;this.m_slPgSz2=null;this.m_slPgNm1=null;this.m_slPgNm2=null;this.m_treeRowsExpanded=true; this.m_treeRowExceptionKeys=[];this.m_isSelectedExceptionKeys=[];this.m_rowIndex=1;this.OnSelectRow=new D2L.EventHandler;this.OnDeleteRow=new D2L.EventHandler;this.OnRestoreRow=new D2L.EventHandler;this.OnPageNumberChange=new D2L.EventHandler;this.OnPageSizeChange=new D2L.EventHandler;WindowEventManager.Transform.Register(this,"RefreshItemRowTrees");Nav.OnBeforeNavigate.Register(this,"OnNav")},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer); this.type=deserializer.GetMember();this.isUsingDefaultSort=deserializer.GetBoolean();this.pageNum=deserializer.GetMember();this.pageSize=deserializer.GetMember();this.m_treeType=deserializer.GetMember();this.m_selectionAllowMultiple=deserializer.GetBoolean();this.sortField=deserializer.GetMember();this.sortDir=deserializer.GetMember();this.m_treeRowsExpanded=deserializer.GetBoolean();this.m_treeRowExceptionKeys=deserializer.GetDictionaryMin();this.m_isSelectedExceptionKeys=deserializer.GetDictionaryMin(); this.data=deserializer.GetMember();this.m_rowIndex=deserializer.GetMember();var activatedKey=deserializer.GetMember();this.nameOrMappedId=deserializer.GetMember();this.m_slPgSz1=UI.GetControl(this.GetMappedId()+"_sl_pgS1");this.m_slPgSz2=UI.GetControl(this.GetMappedId()+"_sl_pgS2");this.m_slPgNm1=UI.GetControl(this.GetMappedId()+"_sl_pg1");this.m_slPgNm2=UI.GetControl(this.GetMappedId()+"_sl_pg2");this.Init();if(activatedKey.length>0)this.Activate(activatedKey)},GetTreeRowsExpanded:function(){return this.m_treeRowsExpanded}, GetTreeExceptionKeys:function(){return this.m_treeRowExceptionKeys},GetTreeExceptionKeysForState:function(){var ret=new Array;var me=this;this.ForEachRow(function(currRow){if(currRow.type=="i"&&currRow.isTreeNode){var key=currRow.GetKey();var defExpanded=me.GetTreeRowsExpanded();if(me.GetTreeExceptionKeys()[key]){if(currRow.isExpanded==defExpanded)ret[ret.length]=key}else if(currRow.isExpanded!=defExpanded)ret[ret.length]=key}});return ret},GetCollapsedKeys:function(){var ret=new Array;var me=this; this.ForEachRow(function(currRow){if(currRow.type=="i"&&currRow.isTreeNode){var key=currRow.GetKey();if(currRow.isExpanded==false)ret[ret.length]=key}});return ret},GetExpandedKeys:function(){var ret=new Array;var me=this;this.ForEachRow(function(currRow){if(currRow.type=="i"&&currRow.isTreeNode){var key=currRow.GetKey();if(currRow.isExpanded==true)ret[ret.length]=key}});return ret},GetIsSelectedExceptionKeys:function(){return this.m_isSelectedExceptionKeys},GetIsSelectedExceptionKeysForState:function(){var ret= new Array;var me=this;this.ForEachRow(function(currRow){if(currRow.type=="i"){var isSelected=currRow.IsSelected();var key=currRow.GetKey();if(me.GetIsSelectedExceptionKeys()[key]){if(!isSelected)ret[ret.length]=key}else if(isSelected)ret[ret.length]=key}});return ret},GetSelectedGroupKeys:function(){return this.GetSelectedKeysForType("g")},GetSelectedKeys:function(){return this.GetSelectedKeysForType("i")},RefreshItemRowTrees:function(){var currRow,currKey;if(this.rowData&&this.rowData.allRows)for(currKey in this.rowData.allRows)currRow= this.rowData.allRows[currKey]},GetSelectedValues:function(){var ret=new Array;var currKey,currRow;if(this.rowData&&this.rowData.allRows)for(currKey in this.rowData.allRows){currRow=this.rowData.allRows[currKey];if(currRow.type=="i"&&currRow.IsSelected())ret.push(currRow.val)}return ret},GetKeys:function(){var underScoreIndex=-1;var ret=new Array;var currKey,currRow;if(this.rowData&&this.rowData.allRows)for(currKey in this.rowData.allRows){currRow=this.rowData.allRows[currKey];if(currRow.type=="i"){underScoreIndex= currKey.indexOf("_");if(underScoreIndex>=0&&underScoreIndex<currKey.length)currKey=currKey.substr(underScoreIndex+1);ret.push(currKey)}}return ret},GetState:function(serializer,stateType,key){if(stateType=="rowshowchanges"){var row=this.GetRow(key);if(row!==null){var changedCells="";for(var i=0;i<row.obj.cells.length;i++)changedCells+=row.changedCells[i]?"1":"0";serializer.AddMember("HasChanged",row.hasChanged);serializer.AddMember("ChangedCells",changedCells)}}else if(stateType=="pagenum")serializer.AddMember("PageNum", this.pageNum);else if(stateType=="tree")serializer.AddMember("ExceptionKeys",this.GetTreeExceptionKeysForState());else if(stateType=="rows"){serializer.AddMember("ActivatedKey",this.GetActivatedKey());serializer.AddMember("ExceptionKeys",this.GetIsSelectedExceptionKeysForState())}else{serializer.AddMember("PageSize",this.pageSize);if(this.isUsingDefaultSort){serializer.AddMember("SortField",this.sortFieldForState);serializer.AddMember("SortDir",this.sortDirForState)}else{serializer.AddMember("SortField", this.sortField);serializer.AddMember("SortDir",this.sortDir)}if(this.search)serializer.AddMember("IsSearchExpanded",this.search.GetIsExpanded())}},GetValues:function(){var ret=new Array;var currKey,currRow;if(this.rowData&&this.rowData.allRows)for(currKey in this.rowData.allRows){currRow=this.rowData.allRows[currKey];if(currRow.type=="i")ret.push(currRow.val)}return ret},GetGroupSelectedKeys:function(){return this.GetSelectedGroupKeys()},GetGroupKeys:function(){var underScoreIndex=-1;var ret=new Array; var currKey,currRow;if(this.rowData&&this.rowData.allRows)for(currKey in this.rowData.allRows){currRow=this.rowData.allRows[currKey];if(currRow.type=="g"){underScoreIndex=currKey.indexOf("_");if(underScoreIndex>=0&&underScoreIndex<currKey.length)currKey=currKey.substr(underScoreIndex+1);ret.push(currKey)}}return ret},GetRowsByValue:function(value){var ret=new Array;var currKey,currRow;if(this.rowData&&this.rowData.allRows)for(currKey in this.rowData.allRows){currRow=this.rowData.allRows[currKey]; if(currRow.type=="i"&&currRow.val==value)ret.push(currRow)}return ret},GetActivatedKey:function(){return this.activatedKey},ForEachRow:function(actionFunc){var currKey,currRow;if(this.rowData&&this.rowData.allRows)for(currKey in this.rowData.allRows){currRow=this.rowData.allRows[currKey];actionFunc(currRow)}},ExpandAllTrees:function(){this.ForEachRow(function(currRow){if(currRow.type=="i"&&currRow.Expand)currRow.Expand()})},CollapseAllTrees:function(){this.ForEachRow(function(currRow){if(currRow.type== "i"&&currRow.Collapse)currRow.Collapse()})},Activate:function(key){if(key===undefined||key===null)key="";key=key.toString();var row=this.GetRow(key);if(row){this.DeActivate();this.activatedKey=key;row.UpdateRowClass();var parent=row.Parent();while(parent!==null){parent.Expand();parent=parent.Parent()}}},DeActivate:function(){var activatedRow=this.GetRow(this.activatedKey);if(activatedRow){this.activatedKey="";activatedRow.UpdateRowClass()}},RegisterSearch:function(s){this.search=s},Enable:function(){this.SetIsEnabled(true)}, Disable:function(){this.SetIsEnabled(false)},SetIsEnabled:function(isEnabled){this.isEnabled=isEnabled;if(!this.cb_sa1)this.cb_sa1=UI.GetById(this.GetMappedId()+"_cb_sa1");if(this.cb_sa1)this.cb_sa1.disabled=!isEnabled;if(!this.cb_sa2)this.cb_sa2=UI.GetById(this.GetMappedId()+"_cb_sa2");if(this.cb_sa2)this.cb_sa2.disabled=!isEnabled;this.ForEachRow(function(row){if(row.cbObj)row.cbObj.disabled=!isEnabled})},SetDisabledState:function(state){this.SetIsEnabled(!state)},GetSelectedKeysForType:function(type){var underScoreIndex= -1;var ret=new Array;var currKey,currRow;if(this.rowData&&this.rowData.allRows)for(currKey in this.rowData.allRows){currRow=this.rowData.allRows[currKey];if(currRow.type==type&&currRow.IsSelected()){underScoreIndex=currKey.indexOf("_");if(underScoreIndex>=0&&underScoreIndex<currKey.length)currKey=currKey.substr(underScoreIndex+1);ret.push(currKey)}}return ret},g_getRow:function(key){if(this.rowData&&this.rowData.allRows&&this.rowData.allRows[key])return this.rowData.allRows[key];return null},GetRow:function(key){var row= this.GetRowByType(key,"i");if(row===null)row=this.GetRowByType(key,"g");return row},GetRowByType:function(key,type){if(this.rowData)if(this.rowData.allRows){var currKey;var currRow;var underScoreIndex;for(currKey in this.rowData.allRows){currRow=this.rowData.allRows[currKey];if(currRow.type==type){underScoreIndex=currKey.indexOf("_");if(underScoreIndex>=0&&underScoreIndex<currKey.length)currKey=currKey.substr(underScoreIndex+1);if(key==currKey)return currRow}}}return null},g_sr:function(key){var row= this.g_getRow(key);this.SelectRow(row,row.cbObj.checked)},g_sd:function(key){var startRow=this.g_getRow(key);startRow.Expand();var currKey;var allSelected=true;for(currKey in startRow.rows){var currRow=startRow.rows[currKey];if(currRow.doChildSelection){if(!currRow.AllDescendantsSelected(true)){this.SelectRow(currRow,true);allSelected=false}}else if(!currRow.IsSelected()){this.SelectRow(currRow,true);allSelected=false}}if(allSelected)for(currKey in startRow.rows){var currRow=startRow.rows[currKey]; this.SelectRow(currRow,false)}},RemoveRow:function(key){var row=this.GetRow(key);if(row===null)return;var me=this;var myAnim=new YAHOO.util.Anim(row.obj,{opacity:{to:0}},0.5,YAHOO.util.Easing.easeOut);myAnim.onComplete.subscribe(function(){WindowEventManager.BubbleRemoveEvent(row.obj);var table=me.IDomNode;if(table){table.deleteRow(row.obj.rowIndex);if(row.dObj)table.deleteRow(row.dObj.rowIndex)}if(me.rowData)me.rowData.RemoveRow(row)});myAnim.animate()},SelectAll:function(){this.g_sa(true)},UnSelectAll:function(){this.g_sa(false)}, g_sa:function(doSelect){var cbArr=UI.GetByName(this.GetMappedId()+"_cb_sa");if(cbArr.checked!==undefined)cbArr.checked=doSelect;else if(cbArr.length==2){cbArr[0].checked=doSelect;cbArr[1].checked=doSelect}var innerRow;var key;for(key in this.rowData.rows){innerRow=this.rowData.rows[key];this.SelectRow(innerRow,doSelect)}},g_te:function(key){var group=this.g_getRow(key);if(group.isExpanded)group.Collapse();else group.Expand()},SelectRow:function(row,doSelect){var key;if(row.type=="i"){if(row.HasSelection()){if(!this.SelectionAllowMultiple()&& doSelect){var me=this;this.ForEachRow(function(eachRow){if(eachRow.IsSelected())me.SelectRow(eachRow,false)})}row.cbObj.checked=doSelect;row.isSelected=doSelect;row.UpdateRowClass();if(!doSelect){var group=row.m_parentGroup;while(group){if(group.hasSelection&&group.m_linkDescendantSelection){group.isSelected=false;group.cbObj.checked=false}group=group.m_parentGroup}}if(!doSelect){var theRow=row.m_parent;while(theRow){if(theRow.HasSelection()&&theRow.LinkDescendantSelection()){theRow.isSelected=false; theRow.cbObj.checked=false;theRow.UpdateRowClass()}theRow=theRow.m_parent}}this.OnSelectRow.Trigger(row)}if(this.SelectionAllowMultiple()&&row.rows&&row.doChildSelection)for(key in row.rows)this.SelectRow(row.rows[key],doSelect)}else if(row.type=="g"){if(row.hasSelection){row.isSelected=doSelect;row.cbObj.checked=doSelect}for(key in row.rows)this.SelectRow(row.rows[key],doSelect)}},Init:function(){if(!this.data)return;this.rowData=new D2L.GridRows(this);var count=this.data.length;var currElem;for(var i= 0;i<count;i++){currElem=this.data[i];if(i+1<count){this.rowData.AddElem(currElem,this.data[i+1]);if(!D2L.Util.JavaScript.IsArray(currElem)&&currElem.charAt(0)==this.rowData.item)i++}else this.rowData.AddElem(currElem);this.m_rowIndex++}var tableElement=this.GetDomNode();var table=this;var sortButtons=tableElement.querySelectorAll("d2l-table-col-sort-button");for(var i=0;i<sortButtons.length;i++)(function(index,field,direction){var onClick=function(){sortButtons[index].removeEventListener("click", onClick);table.Sort(field,direction==="asc",true)};sortButtons[index].addEventListener("click",onClick)})(i,sortButtons[i].dataset.d2lTableSortField,sortButtons[i].dataset.d2lTableNextSortDir)},Sort:function(fldName,isAsc,doReload){if(fldName!=this.sortField)this.pageNum=1;this.sortFieldForState=fldName;this.sortField=fldName;if(isAsc){this.sortDirForState=1;this.sortDir=1}else{this.sortDirForState=2;this.sortDir=2}if(doReload)Nav.Go(new D2L.NavInfo)},SetPageNum:function(pageNum,doReload){var origPageNum= this.pageNum;var me=this;var Set=function(){me.pageNum=pageNum;if(me.m_slPgNm1)me.m_slPgNm1.SelectOption(me.m_slPgNm1.GetOption(pageNum),false);if(me.m_slPgNm2)me.m_slPgNm2.SelectOption(me.m_slPgNm2.GetOption(pageNum),false)};if(doReload){if(me.m_slPgNm1)me.m_slPgNm1.SelectOption(me.m_slPgNm1.GetOption(origPageNum),false);if(me.m_slPgNm2)me.m_slPgNm2.SelectOption(me.m_slPgNm2.GetOption(origPageNum),false);var ni=new D2L.NavInfo;ni.OnNavigate.RegisterMethod(function(){Set();me.OnPageNumberChange.Trigger(pageNum)}); Nav.Go(ni)}else Set()},SetPageSize:function(pageSize,doReload){var origPageSize=this.pageSize;var me=this;var Set=function(){me.pageSize=pageSize;me.pageNum=1;if(me.m_slPgSz1)me.m_slPgSz1.SelectOption(me.m_slPgSz1.GetOption(pageSize),false);if(me.m_slPgSz2)me.m_slPgSz2.SelectOption(me.m_slPgSz2.GetOption(pageSize),false)};if(doReload){if(me.m_slPgSz1)me.m_slPgSz1.SelectOption(me.m_slPgSz1.GetOption(origPageSize),false);if(me.m_slPgSz2)me.m_slPgSz2.SelectOption(me.m_slPgSz2.GetOption(origPageSize), false);var ni=new D2L.NavInfo;ni.OnNavigate.RegisterMethod(function(){Set();me.OnPageSizeChange.Trigger(pageSize)});Nav.Go(ni)}else Set()},GetSearch:function(){return this.search},OnSearchChanged:function(sender){this.pageNum=1},OnNav:function(navInfo){if(navInfo&&navInfo.IsAction()){var valNode=UI.GetById(this.GetMappedId()+"_values");while(valNode.hasChildNodes()){D2L.Util.Dom.Purge(valNode.childNodes[0]);valNode.removeChild(valNode.childNodes[0])}var currRow;if(this.rowData&&this.rowData.allRows)for(var currKey in this.rowData.allRows){currRow= this.rowData.allRows[currKey];if(currRow.type=="i"&&currRow.IsSelected()&&currRow.val!==""){var hdn=document.createElement("input");hdn.type="hidden";hdn.name=this.nameOrMappedId+"_vals";hdn.value=currRow.val;valNode.appendChild(hdn)}}}return true},SelectionAllowMultiple:function(){return this.m_selectionAllowMultiple},GetTreeType:function(){return this.m_treeType}});D2L.Grid=D2L.Control.Grid;D2L.Control.Grid.Type={Data:1,List:2,NoLines:3};D2L.Grid.TreeType={StructureOnly:1,StructureHierarchy:2,StructureHierarchyLines:3}; D2L.GridRows=D2L.Class.extend({Construct:function(g){arguments.callee.$.Construct.call(this);this.item="i";this.details="d";this.header="h";this.group="g";this.summary="s";this.grid=g;this.rows=new Array;this.allRows=new Array;this.treeNodePeekIndex=-1;this.openTreeNodes=new Array;this.groupPeekIndex=-1;this.openGroups=new Array},PeekGroup:function(){if(this.groupPeekIndex<0)return null;else return this.openGroups[this.groupPeekIndex]},PushGroup:function(group){this.groupPeekIndex++;this.openGroups[this.groupPeekIndex]= group},PopGroup:function(){this.groupPeekIndex--},PeekItemTreeNode:function(){if(this.treeNodePeekIndex<0)return null;else return this.openTreeNodes[this.treeNodePeekIndex]},PushItemTreeNode:function(group){this.treeNodePeekIndex++;this.openTreeNodes[this.treeNodePeekIndex]=group},PopItemTreeNode:function(){this.treeNodePeekIndex--},AddRow:function(row){var currGroup=this.PeekGroup();if(currGroup)currGroup.AddRow(row);else this.rows[row.key]=row;if(row.type==this.item){var currTreeNode=this.PeekItemTreeNode(); if(currTreeNode)currTreeNode.AddRow(row)}this.allRows[row.key]=row},RemoveRow:function(row){var currKey,currRow;var newAllRows=new Array;for(currKey in this.allRows){currRow=this.allRows[currKey];if(currRow.key!=row.key)newAllRows[currKey]=currRow}this.allRows=newAllRows;var newRows=new Array;for(currKey in this.rows){currRow=this.rows[currKey];if(currRow.type==this.group)currRow.RemoveRow(row);else if(currRow!=row)newRows[currKey]=currRow}this.rows=newRows},AddElem:function(elem,extra){var type; if(D2L.Util.JavaScript.IsArray(elem)){type=elem[0].charAt(0);var groupElem=elem[0];groupElem=groupElem.substring(1,groupElem.length);var start=1;if(type==this.group)this.OpenGroup(groupElem);else if(type==this.item){this.OpenItemTreeNode(groupElem,elem[1]);start++}var len=elem.length;for(var i=start;i<len;i++){this.grid.m_rowIndex++;if(i+1<len){this.AddElem(elem[i],elem[i+1]);if(!D2L.Util.JavaScript.IsArray(elem[i])&&elem[i].charAt(0)==this.item)i++}else this.AddElem(elem[i])}if(type==this.group)this.CloseGroup(); else if(type==this.item)this.CloseItemTreeNode()}else{type=elem.charAt(0);var rest=elem.substring(1,elem.length);if(type==this.item)this.AddItem(rest,extra);else if(type==this.header)this.AddHeader(rest);else if(type==this.summary)this.AddSummary(rest)}},AddHeader:function(elem){var row=new D2L.GridRow;var key=elem;row.grid=this.grid;row.type=this.header;row.key="h_"+key;row.obj=row.grid.GetDomNode().rows[row.grid.m_rowIndex];this.AddRow(row)},AddSummary:function(elem){var row=new D2L.GridRow;var key= elem;row.type=this.summary;row.key="s_"+key;row.obj=this.grid.IDomNode.rows[this.grid.m_rowIndex];this.AddRow(row)},OpenItemTreeNode:function(elem,extra){var row=this.AddItem(elem,extra);row.rows=new Array;row.isTreeNode=true;if(elem.charAt(2)=="0")row.isExpanded=false;else row.isExpanded=true;if(elem.charAt(4)=="0")row.isChild=false;else row.isChild=true;row.hasChildren=elem.charAt(8)=="1";row.hasSiblings=elem.charAt(9)=="1";row.isTopLevel=elem.charAt(10)=="1";row.isFirstSibling=elem.charAt(11)== "1";row.isLastSibling=elem.charAt(1)=="1";row.ExpandHelper=GridExpandHelper;row.CollapseHelper=GridCollapseHelper;row.SetVisibleHelper=GridRowSetVisible;row.SetVisible=function(isVisible){row.SetVisibleHelper(isVisible)};row.Expand=function(){this.isExpanded=true;this.SetTreeNodeImage();this.ExpandHelper();if(navigator.userAgent.indexOf("MSIE")==-1){this.SetVisible(false);this.SetVisible(true)}};row.Collapse=function(){this.isExpanded=false;this.SetTreeNodeImage();this.CollapseHelper()};row.SetTreeNodeImage= function(){if(this.treObj){var oldImg=this.treObj.childNodes[0];var oldImgSrc=oldImg.src;var t=this.isTopLevel&&!this.isFirstSibling?"t":"";var r="r";var b="";var l=!this.isTopLevel?"l":"";var imageTerm="";var langTerm="";if(this.isExpanded){b=this.hasChildren?"b":"";imageTerm="Framework.Grid.actCollapse";langTerm="Framework.Grid.altCollapseRow"}else{b=this.isTopLevel&&this.hasSiblings?"b":"";imageTerm="Framework.Grid.actExpand";langTerm="Framework.Grid.altExpandRow"}D2L.Images.ImageTerm.Assign(imageTerm, oldImg);var lang=new D2L.LP.Text.LangTerm(langTerm);lang.SetSubject(this.m_subject);lang.AssignText(oldImg,"title");lang.AssignText(oldImg,"alt");if(this.grid.GetTreeType()==D2L.Grid.TreeType.StructureHierarchyLines){var className="d_g_l_"+t+r+b+l;this.treObj.parentNode.parentNode.className=className}}};row.AddRow=function(row){row.m_parent=this;this.rows[row.key]=row};for(var i=0;i<row.obj.cells.length;i++)if(row.obj.cells[i].firstChild)if(row.obj.cells[i].firstChild.className=="d_gt"){row.treObj= row.obj.cells[i].firstChild.firstChild;break}else if(row.obj.cells[i].firstChild.className=="d_gts"){row.treObj=row.obj.cells[i].firstChild;break}this.PushItemTreeNode(row)},CloseItemTreeNode:function(){this.PopItemTreeNode()},AddItem:function(elem,extra){var row=new D2L.GridRow;row.type=this.item;row.grid=this.grid;row.m_subject=extra[0];row.val=extra[1];if(elem.charAt(0)=="1")row.hasSelection=true;else row.hasSelection=false;if(elem.charAt(1)=="1")row.hasDetails=true;else row.hasDetails=false;if(elem.charAt(3)== "1")row.isSelected=true;else row.isSelected=false;if(elem.charAt(5)=="1")row.doChildSelection=true;else row.doChildSelection=false;if(elem.charAt(6)=="1")row.isAlt=true;else row.isAlt=false;row.m_linkDescendantSelection=elem.charAt(13)=="1";var index1=elem.indexOf("_");var index2=elem.lastIndexOf("_");var key=elem.substring(index1+1,index2);row.key=key;row.obj=row.grid.GetDomNode().rows[row.grid.m_rowIndex];this.AttachObject(row.obj,"rowObj",row);if(row.hasSelection)for(var i=0;i<row.obj.cells.length;i++)if(row.obj.cells[i].firstChild&& row.obj.cells[i].firstChild.name&&row.obj.cells[i].firstChild.name==this.grid.nameOrMappedId+"_cb"){row.cbObj=row.obj.cells[i].firstChild;break}if(row.hasDetails){row.dObj=row.obj.nextSibling;row.grid.m_rowIndex++}var showChangesFlag=elem.charAt(7);if(showChangesFlag=="2")row.HandleOnChange(new D2L.ChangeEvent(row.obj));else if(showChangesFlag=="1"){this.AttachObject(row.obj,"ID2LOnChange",new D2L.EventHandler);row.obj.ID2LOnChange.Register(row,"HandleOnChange")}for(var i=index2+1;i<elem.length;i+= 2){var showChanges=elem.charAt(i);if(showChanges=="1"){var cellIndex=(i-(index2+1))/2;var hasChanged=elem.charAt(i+1);if(hasChanged=="1")row.HandleCellOnChange(new D2L.ChangeEvent(row.obj.cells[cellIndex]));else{this.AttachObject(row.obj.cells[cellIndex],"ID2LOnChange",new D2L.EventHandler);row.obj.cells[cellIndex].ID2LOnChange.Register(row,"HandleCellOnChange")}}}if(row.IsSelected())row.UpdateRowClass();this.AddRow(row);return row},OpenGroup:function(elem){var row=new D2L.GridGroup;if(elem.charAt(0)== "1")row.hasSelection=true;if(elem.charAt(1)=="0")row.isExpanded=false;if(elem.charAt(2)=="1")row.m_linkDescendantSelection=true;var key=elem.substring(3,elem.length);row.type=this.group;row.key=key;row.obj=this.grid.IDomNode.rows[this.grid.m_rowIndex];row.cbObj=UI.GetById(this.grid.GetMappedId()+"_cb"+key);row.exObj=UI.GetById(this.grid.GetMappedId()+"_ex"+key);this.AddRow(row);this.PushGroup(row)},CloseGroup:function(){this.PopGroup()}}); D2L.GridRow=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.m_isDeleted=false;this.grid=null;this.hasChanged=false;this.changedCells=[];this.m_hiddenChanged=null;this.m_hiddenDeleted=null;this.val="";this.m_parentGroup=null;this.m_parent=null;this.isSelected=false;this.m_initialClass=null;this.m_linkDescendantSelection=false;this.m_hasSpecifiedKey=false;this.m_subject="";FormManager.OnChangeReset.Register(this,"HandleOnChangeReset")},GetSubject:function(){return this.m_subject}, LinkDescendantSelection:function(){return this.m_linkDescendantSelection},HasSelection:function(){return this.hasSelection},UpdateRowClass:function(){if(this.m_initialClass===null)this.m_initialClass=this.obj.className;var isActivated=this.grid.activatedKey.length>0&&this.GetKey().length>0&&this.grid.activatedKey==this.GetKey();if(isActivated){this.obj.classList.add("d_ga");if(D2L.LP.Web.UI.Daylight.IsEnabled())D2L.LP.Web.UI.Html.Dom.SetAttribute(this.obj,"active","")}else{this.obj.classList.remove("d_ga"); if(D2L.LP.Web.UI.Daylight.IsEnabled())D2L.LP.Web.UI.Html.Dom.RemoveAttribute(this.obj,"active")}if(this.hasChanged)this.obj.classList.add("d_gc");else this.obj.classList.remove("d_gc");if(this.IsSelected()){this.obj.classList.add("d_gs");if(D2L.LP.Web.UI.Daylight.IsEnabled())D2L.LP.Web.UI.Html.Dom.SetAttribute(this.obj,"selected","");if(this.hasDetails){this.dObj.classList.add("d_gs");if(D2L.LP.Web.UI.Daylight.IsEnabled())D2L.LP.Web.UI.Html.Dom.SetAttribute(this.dObj,"selected","")}}else{this.obj.classList.remove("d_gs"); if(D2L.LP.Web.UI.Daylight.IsEnabled())D2L.LP.Web.UI.Html.Dom.RemoveAttribute(this.obj,"selected");if(this.hasDetails){this.dObj.classList.remove("d_gs");if(D2L.LP.Web.UI.Daylight.IsEnabled())D2L.LP.Web.UI.Html.Dom.RemoveAttribute(this.dObj,"selected")}}if(this.IsDeleted())this.obj.classList.add("d_gdel");else this.obj.classList.remove("d_gdel")},SetTextFormat:function(format){var f=format.toLowerCase();var oldClass=this.obj.className;if(f=="normal"){if(oldClass.indexOf("d_dbold")>=0){this.obj.className= oldClass.replace("d_dbold","");if(this.m_initialClass)this.m_initialClass=this.m_initialClass.replace("d_dbold","")}}else if(f=="bold")if(oldClass.indexOf("d_dbold")<0){this.obj.className+=" d_dbold";if(this.m_initialClass)this.m_initialClass+=" d_dbold"}},SetIsUnread:function(value){var oldClass=this.obj.className;if(value&&oldClass.indexOf("d2l-grid-row-unread")<0){this.obj.className+=" d2l-grid-row-unread";if(this.m_initialClass)this.m_initialClass+=" d2l-grid-row-unread"}else if(oldClass.indexOf("d2l-grid-row-unread")>= 0){this.obj.className=oldClass.replace("d2l-grid-row-unread","");if(this.m_initialClass)this.m_initialClass=this.m_initialClass.replace("d2l-grid-row-unread","")}},HandleOnChange:function(event){if(!event.hasChangeBeenShown){if(!this.hasChanged){this.hasChanged=true;this.UpdateRowClass()}event.hasChangeBeenShown=true}if(this.m_hiddenChanged===null){this.m_hiddenChanged=document.createElement("input");this.m_hiddenChanged.type="hidden";this.m_hiddenChanged.value=this.GetKey();this.obj.firstChild.appendChild(this.m_hiddenChanged)}this.m_hiddenChanged.name= this.grid.nameOrMappedId+"_ckeys"},HandleCellOnChange:function(event){if(!event.hasChangeBeenShown){var node=event.source;var prevNode=null;while(node!=this.obj){prevNode=node;node=node.parentNode}this.hasChanged=true;this.changedCells[prevNode.cellIndex]=true;prevNode.className+=" d_gch"}},HandleOnChangeReset:function(){this.hasChanged=false;this.UpdateRowClass()},HasSpecifiedKey:function(){return this.m_hasSpecifiedKey},GetKey:function(){var underScoreIndex=this.key.indexOf("_");if(underScoreIndex>= 0&&underScoreIndex<this.key.length)return this.key.substr(underScoreIndex+1);return""},GetValue:function(){return this.val},SetVisible:GridRowSetVisible,Delete:function(){if(!this.IsDeleted()){if(this.m_hiddenDeleted===null){this.m_hiddenDeleted=document.createElement("input");this.m_hiddenDeleted.type="hidden";this.m_hiddenDeleted.value=this.GetKey();this.obj.firstChild.appendChild(this.m_hiddenDeleted)}this.m_hiddenDeleted.name=this.grid.nameOrMappedId+"_dkeys";this.m_isDeleted=true;this.UpdateRowClass(); WindowEventManager.BubbleChangeEvent(this.obj);this.grid.OnDeleteRow.Trigger(this)}},IsDeleted:function(){return this.m_isDeleted},IsSelected:function(){return this.isSelected},HasSelectedDescendant:function(considerRootNode){if(considerRootNode&&this.IsSelected())return true;for(var currKey in this.rows){var currRow=this.rows[currKey];if(currRow.HasSelectedDescendant(true))return true}return false},AllDescendantsSelected:function(considerRootNode){if(considerRootNode&&!this.IsSelected())return false; for(var currKey in this.rows){var currRow=this.rows[currKey];if(!currRow.AllDescendantsSelected(true))return false}return true},Restore:function(){if(this.IsDeleted()){this.m_hiddenDeleted.name="";this.m_isDeleted=false;this.UpdateRowClass();this.grid.OnRestoreRow.Trigger(this)}},SetIsDeleted:function(isDeleted){if(!this.IsDeleted()&&isDeleted)this.Delete();else if(this.IsDeleted()&&!isDeleted)this.Restore()},ToggleIsDeleted:function(){this.SetIsDeleted(!this.IsDeleted())},SetDoChildSelection:function(doChildSelection){this.doChildSelection= doChildSelection},DoChildSelection:function(){return this.doChildSelection},Parent:function(){return this.m_parent},SetBackgroundColour:function(colour){var row=this.obj;row.style.backgroundColor=colour},GetCellByIndex:function(index){var cells=this.obj.getElementsByTagName("td");for(var i=0;i<cells.length;i++){var cell=cells[i];if(cell.parentNode==this.obj)if(index==0)return cell;else index--}return null},SetCellBackgroundColour:function(index,colour){var cell=this.GetCellByIndex(index);cell.style.backgroundColor= colour},SetCellOnMouseOver:function(index,func){var cell=this.GetCellByIndex(index);cell.onmouseover=func},SetCellOnMouseOut:function(index,func){var cell=this.GetCellByIndex(index);cell.onmouseout=func},SetCellOnMouseClick:function(index,func){var cell=this.GetCellByIndex(index);cell.onclick=func},SetCellProperty:function(index,propName,propValue){var cell=this.GetCellByIndex(index);cell[propName]=propValue}}); D2L.GridGroup=D2L.Class.extend({Construct:function(){arguments.callee.$.Construct.call(this);this.rows=new Array;this.doChildSelection=true;this.itemRows=new Array;this.m_linkDescendantSelection=false;this.m_parentGroup=null;this.isSelected=false},SetVisible:GridRowSetVisible,ExpandHelper:GridExpandHelper,CollapseHelper:GridCollapseHelper,Expand:function(){if(this.exObj)this.exObj.innerHTML='<img style="border:none;" src="../../../d2l/tools/img/51.gif" width="6" height="8" alt="Collapse Group" title="Collapse Group">'; this.isExpanded=true;this.ExpandHelper()},Collapse:function(){if(this.exObj)this.exObj.innerHTML='<img style="border:none;" src="../../../d2l/tools/img/52.gif" width="6" height="8" alt="Expand Group" title="Expand Group">';this.isExpanded=false;this.CollapseHelper()},AddRow:function(row){row.m_parentGroup=this;this.rows[row.key]=row},IsSelected:function(){return this.isSelected},RemoveRow:function(row){var newRows=new Array;for(currKey in this.rows){currRow=this.rows[currKey];if(currRow.type==this.group)currRow.RemoveRow(row); else if(currRow!=row)newRows[currKey]=currRow}this.rows=newRows}}); function GridExpandHelper(){for(var key in this.rows){var row=this.rows[key];row.SetVisible(true);if(row.obj.classList.contains("d_lastRow"))this.obj.classList.remove("d_lastRow");if(D2L.LP.Web.UI.Daylight.IsEnabled())if(D2L.LP.Web.UI.Html.Dom.HasAttribute(row.obj,"last-row"))D2L.LP.Web.UI.Html.Dom.RemoveAttribute(this.obj,"last-row");if(row.type==="g"||row.type==="i"&&row.rows)if(row.isExpanded)row.ExpandHelper()}WindowEventManager.Transform.Trigger()} function GridCollapseHelper(){for(var key in this.rows){var row=this.rows[key];row.SetVisible(false);if(row.type==="g"||row.type==="i"&&row.rows)row.CollapseHelper();if(row.obj.classList.contains("d_lastRow"))this.obj.classList.add("d_lastRow");if(D2L.LP.Web.UI.Daylight.IsEnabled())if(D2L.LP.Web.UI.Html.Dom.HasAttribute(row.obj,"last-row"))D2L.LP.Web.UI.Html.Dom.SetAttribute(this.obj,"last-row","")}WindowEventManager.Transform.Trigger()} function GridRowSetVisible(isVisible){this.isVisible=isVisible;D2L.LP.Web.UI.Html.Dom.ToggleClassName("d_g_display_none",this.obj,!isVisible)} function GridRemoveErrorBalloon(balloon,resizeFunction){if(resizeFunction!==null&&resizeFunction!==undefined)window.removeEventListener("resize",resizeFunction);if(balloon!==null&&balloon!==undefined&&balloon.lastChild.className.indexOf("vui-validation-bubble-hide")<0){balloon.lastChild.className+=" vui-validation-bubble-hide";setTimeout(function(){if(balloon!==null&&balloon!==undefined&&balloon.parentNode!==null&&balloon.parentNode!==undefined)balloon.parentNode.removeChild(balloon)},200)}} function GridActionErrorHandler(event){var gridContainer=event.target||event.srcElement;while(gridContainer!==null&&gridContainer!==undefined&&(gridContainer=gridContainer.parentElement)&&gridContainer.className.indexOf("d2l-grid-container")<0);if(gridContainer===null||gridContainer===undefined||!D2L.LP.Web.UI.Daylight.IsEnabled()||gridContainer.querySelector("tr[selected]")!==null&&gridContainer.querySelector("tr[selected]")!==undefined)return;var balloons=gridContainer.querySelector(".vui-validation-bubble-show"); if(balloons!==null&&balloons!==undefined)if(balloons.constructor!==Array)GridRemoveErrorBalloon(balloons);else for(var i=0;i<balloons.length;i++)GridRemoveErrorBalloon(balloons[i]);var buttonAnchor=event.target||event.srcElement;while(buttonAnchor!=undefined&&buttonAnchor.tagName!=="A"&&buttonAnchor.tagName!=="D2L-BUTTON-SUBTLE"&&buttonAnchor.tagName!=="D2L-BUTTON-ICON")buttonAnchor=buttonAnchor.parentElement;if(buttonAnchor===null||buttonAnchor===undefined)return;var container=gridContainer.querySelector(".d2l-grid-actions-container"); GridActionErrorBalloon(buttonAnchor,container)} function GridActionErrorBalloonResize(balloon,buttonAnchor,container){var hoverTarget=buttonAnchor;if(buttonAnchor.style.display==="none")hoverTarget=container.querySelector("d2l-buttons-menu");var balloonDiv=balloon.lastChild;var left=hoverTarget.offsetLeft+hoverTarget.offsetWidth/2-balloonDiv.offsetWidth/2;if(left<0){left=hoverTarget.offsetLeft+hoverTarget.offsetWidth/2-34;if(balloonDiv.className.indexOf("vui-validation-bubble-left")<0)balloonDiv.className+=" vui-validation-bubble-left"}else if(left+ balloonDiv.offsetWidth>container.offsetWidth){left=left-balloonDiv.offsetWidth/2+34;if(balloonDiv.className.indexOf("vui-validation-bubble-right")<0)balloonDiv.className+=" vui-validation-bubble-right"}else{balloonDiv.className=balloonDiv.className.replace("vui-validation-bubble-left","");balloonDiv.className=balloonDiv.className.replace("vui-validation-bubble-right","")}if(document.body.dir==="rtl")left=left-container.offsetWidth+balloonDiv.offsetWidth;balloonDiv.style.left=left+"px"} function GridActionErrorBalloon(buttonAnchor,container){if(buttonAnchor===undefined||buttonAnchor===null||container===undefined||container===null)return;var balloon=D2L.Validation.CreateErrorBalloon(new D2L.Language.Term("Classlist.classlist.jsNoItemSelectedSecondary"));balloon.lastChild.setAttribute("role","alert");container.insertBefore(balloon,container.firstChild);var resizeFunction=function(){GridActionErrorBalloonResize(balloon,buttonAnchor,container)};window.addEventListener("resize",resizeFunction); GridActionErrorBalloonResize(balloon,buttonAnchor,container);setTimeout(function(){GridRemoveErrorBalloon(balloon,resizeFunction)},3E3)} D2L.Control.GridActionSubtle=D2L.Control.extend({Construct:function(){arguments.callee.$.Construct.call(this)},IntegrateControlMin:function(deserializer){arguments.callee.$.IntegrateControlMin.call(this,deserializer)},SetIsDisplayed:function(isDisplayed){if(this.IsRendered()){var parent=this.GetDomNode().parentNode;if(!isDisplayed)parent.style.display="none";else parent.style.display="inline-block"}}});if(window["D2L"]!==undefined&&D2L.LP.Web.Packaging!==undefined)D2L.LP.Web.Packaging.Register("D2L.LP.Web.Controls.Grid.default");
resource1/1124/d2l/common/viewFile.d2lfile/Database/MTU5Mjk4/IM3003_C_Clark.pptx
HEALTH SYSTEM PERFORMANCE COMPARISON
Constance Hope Clark
,Walden University
COURSE IM3003: Clinical Data Evaluation
The Johns Hopkins Hospital and Cleveland Clinic
Health is clearly one of the precious treasures things that people have.
Studies show that health systems are not the main origin of our health, though they play integral role in helping people improve and maintain their own health.
Thus, that’s why it is very important to ensure that health systems perform at their epitome or best. Besides, for an excellence performance, it is necessary for one to understand how these systems work and their goal in performance assessment.
The Johns Hopkins Hospital is on of the best hospitals in United States with explicit health services in nose, throat and ear.
In terms of operations, the Johns Hopkins Hospital and its medicine schools are considered as the main founders of modern American birthplace and medicine.
Cleveland Clinic on the other hand is known for its explicit medical breakthroughs such as bypass surgery and coronary artery (Scott, 2017).
2
Potential Factors for Differences in Performance Measures
Cost and resources used
According to White, Dudley-Brown & Terhaar, (2019), different hospitals have different charges on services that they offer. This in turn validate a consistent outcome that can be measured for quality purposes. The available resources also determine that patient outcome thus can be evaluated for quality purposes.
Affordability and access
Affordability and access to Johns Hopkins Hospital makes it more suitable for standard services as compared to the latter which has certain inhibitions to be considered for a consistent and stable outcome. Rationally, how access Johns Hopkins Hospital is makes it lucrative and liked by many.
Nursing-sensitive care
The Johns Hopkins Hospital has standard indicators and measures that processes, restructures and validates the nursing outcomes. The measures reflect the effect of nursing care.
Potential Factors for Differences in Performance Measures
Population health
According to population health refers to the health outcomes obtained from individual groups and their distributions. In the John Hopkins Hospital the focus here is to promote explicit patient engagement. The hospital as compared to Cleveland Clinic focuses on empowering patients so that the can manage their health adequately.
Patient safety
According to White, Dudley-Brown & Terhaar, 2019), patient safety is the prevention of harm that can be implicated to patients. The emphasis is based on the care delivery system that has the ability of preventing errors and building safety culture which is unified. In the Cleveland Clinic the rationale is prevalent and the success of most of their operations and services are dependent on this factors. The renewed version is evident in the John Hopkins Hospitals with vast surgencies seen in other associated correspondences.
Impact of Performance Measures to Nursing Practice
In John Hopkins Hospital
First, the difference in performance measures between John Hopkins Hospital and Cleveland Clinic will distinguish what appears to be taking place in the centres and what is really happening. As a result, they can be used to validate practices that are valuable for the success of the hospitals.
Additionally, the differences in performance measures will determine the decisions made in nursing practices of the two hospitals especially on important initiations that need t be put in place to verify the health outcomes.
Moreover, they will allow easy comparisons of different performance across sites while monitoring changes for sustained improvements. In terms of reflective measures of the patient flow process, the performance measures will help the hospital achieve similar nursing practice benefits while evaluating its targets, businesses, and performances for clinical outcomes (Frymoyer & Wiesel, 2014).
Impact of Performance Measures to Nursing Practice
In Cleveland Clinic
According to Scott (2017), the difference will establish a baseline; that is, an explicit measures that is initiated before any forms of improvements are initiated. The end result will validate the significances and values of all the initiated practices and their values towards the success of the health practices and other associated correspondences that can be seen in them.
It also improved infrastructure and data collection for improved quality in nursing practices. Studies reveal that in the department of Zielony Institute where performance measures facilitates the improvement of outcomes in health services as well as promote nursing care quality.
Additionally, they assure patient satisfaction through ensuring implementation of focused patient’s rounding operations within the hospital as well as establishing proper pain education program that will be used to address pertinent issues.
Hospital Quality Measures
Performance measurements affects nursing practices in hospitals, directly or indirectly due to the following initiative;
Early identification of the needs of patients for standardisation of education.
According to Lindenauer et al. (2017), electronic medical records initiatives for corporation of education templates for the enhancement of medication reconciliation process.
Development of major measures on education for health professionals while sharing best practices associated with increased care practices.
Implementation of focused hourly patient practices across all hospitals and establishment of pain education programs for boosting the educational programs that will be of great value in planning for better and quality services.
Timely and Effective Care
Similarities
In both John Hopkins Hospital and Cleveland Clinic are timely and effective. Nurses in these sectors are motivated for a competitive and interactive health services.
The delivery of health services are based on their urgencies and usefulness to the patients. Nurses control the ability of other health providers to obtain the needed technologies and performances. The majority of operations are done within specified time frame.
In both Cleveland and John Hopkins Hospital, health care is valued and treated with in-depth focus and attention. Factors in the sectors are used for the improvement of early disease detection and screening as well as other management practices that are aimed at creating sound outcomes.
The Medicare coverage in the two is approximately 13% of the population, while the Medicaid is 11% of the entire population in both hospitals.
Access to both insured and uninsured care services are affected by cost sharing and copayments requirements.
Timely and Effective Care
Differences
Johns Hopkins medicine is diverse and inclusive as compared to Cleveland Clinic. It educates healthcare professionals, students and scientist as well as conduct several biomedical researches that are valuable for timely and effective care systems.
Secondly, Cleveland Clinic implores multiple approaches in treating different disease and responding to them as compared to Johns Hopkins Hospital that only use such approaches in specific diseases. Teamwork is embraced in the latter as the only way to address key issues and variables to be discussed.
Publicly Reported Data on the Quality and Safety
Cleveland Clinic
Safety and quality indicators in the hospital include;
Communication openness
Teamwork
Staffing
Management support for safety
Error reporting and prevention
Transitions and handoffs
Continuous improvement and organizational learning
Publicly Reported Data on the Quality and Safety
John Hopkins Hospital
At Johns Hopkins Children’s Center, safety and quality are our the main important priorities.
The research outcome from nineteen studies carried out between 1999 and 2015, reveal that the errors in the hospital has adversely reduced as seen in the administrative database.
Of the twenty-one measures and research conducted it is evident that safety and quality standards are based specific nursing guidelines.
Approximately, eighty percent of health practices are based on new inventions that are geared towards attainment of quality services and nursing practices.
Overall, the certificate programs in John Hopkins Hospital are open to all people who are trying to peruse further studies for safety and quality services to their patients. The minimum operational knowledge for all practices are dependent of how nurses ascertain their goals.
Cornerstone for Good Outcomes
Teamwork and organized body
The rate of hospital-acquired infections or surgical complications.
Safety standards
Healthcare timeliness
Healthcare effectiveness
Healthcare efficiency
Healthcare equitability
Healthcare patient-centeredness
Conclusion
Quality and safety improvements in hospitals and other associated healthcare sectors play significant role in enhancing efficiency, safety, and effectiveness in the hospitals. Redesigning these aspects in healthcare sectors across the world has seen most nursing practices turning to be of great value for the success of the inhibited health goals. In Johns Hopkins Hospital and Cleveland Clinic the inhibition of teamwork, modem technologies, robust health practices, and efficient health practices, significant improvements have been evident as they focus in boosting their operations to make them the best in the world.
References
Frymoyer, J. W., & Wiesel, S. W. (Eds.). (2014). The adult and pediatric spine (Vol. 1). Lippincott Williams & Wilkins.
Lindenauer, P. K., Remus, D., Roman, S., Rothberg, M. B., Benjamin, E. M., Ma, A., & Bratzler, D. W. (2017). Public reporting and pay for performance in hospital quality improvement. New England Journal of Medicine, 356(5), 486-496.
Scott, E. (2017, March). Chemo hormonal therapy in metastatic hormone-sensitive prostate cancer. Sweeney CJ, Chen YH, Carducci M, Liu G, Jarrard DF, Eisenberger M, Wong YN, Hahn N, Kohli M, Cooney MM, Dreicer R, Vogelzang NJ, Picus J, Shevrin D, Hussain M, Garcia JA, DiPaola RS. Department of Medicine; Department of Biostatistics and Computational Biology; Dana-Farber Cancer Institute, Boston; Harvard Medical School, Boston; Johns Hopkins University, Baltimore; University of Wisconsin Carbone Cancer Center; School of Medicine .... In Urologic Oncology: Seminars and Original Investigations (Vol. 35, No. 3, p. 123). Elsevier.
White, K. M., Dudley-Brown, S., & Terhaar, M. F. (Eds.). (2019). Translation of evidence into nursing and healthcare. Springer Publishing Company.
resource1/1124/d2l/lms/grades/static/css/4.css
.d2l-grades-score { display: inline-block; }
resource1/1124/d2l/lms/grades/static/include/9.js
D2L.LE.Grades = D2L.LE.Grades || {}; D2L.LE.Grades.ScoreDisplayControl = D2L.LE.Grades.ScoreDisplayControl || {}; D2L.LE.Grades.ScoreDisplay = D2L.Class.extend({ Construct: function () { arguments.callee.$.Construct.call(this); this.Symbol = ''; this.Colour = ''; this.Score = ''; this.OutOf = ''; this.ShowSymbol = false; this.ShowColour = false; this.ShowScore = false; }, Deserialize: function (deserializer) { this.Symbol = deserializer.GetMember('Symbol'); this.Colour = deserializer.GetMember('Colour'); this.Score = deserializer.GetMember('Score'); this.OutOf = deserializer.GetMember('OutOf'); this.ShowSymbol = deserializer.GetMember('ShowSymbol'); this.ShowColour = deserializer.GetMember('ShowColour'); this.ShowScore = deserializer.GetMember('ShowScore'); } }); D2L.LE.Grades.ScoreDisplayControl.Refresh = function (hasScore, score, outOf, gradeId) { var callback = function (response) { if (response.GetResponseType() != D2L.Rpc.ResponseType.Success) { return; } var i; var scoreDisplay = response.GetResult(D2L.LE.Grades.ScoreDisplay); var scoreLabels = UI.GetControls('lblScore'); for (i = 0; i < scoreLabels.length; i++) { scoreLabels[i].SetText(new D2L.LP.Text.IText(scoreDisplay.Score)); } var outOfLabels = UI.GetControls('lblOutOf'); for (i = 0; i < outOfLabels.length; i++) { outOfLabels[i].SetText(new D2L.LP.Text.IText(scoreDisplay.OutOf)); } var pointsDisplayGroups = UI.GetControls('DG_Score'); for (i = 0; i < pointsDisplayGroups.length; i++) { pointsDisplayGroups[i].SetIsDisplayed(scoreDisplay.ShowScore); } var symbolLabels = UI.GetControls('lblSymbol'); for (i = 0; i < symbolLabels.length; i++) { symbolLabels[i].SetText(new D2L.LP.Text.IText(scoreDisplay.Symbol)); } var symbolDisplayGroups = UI.GetControls('DG_Symbol'); for (i = 0; i < symbolDisplayGroups.length; i++) { symbolDisplayGroups[i].SetIsDisplayed(scoreDisplay.ShowSymbol); } var separatorDisplayGroups = UI.GetControls('DG_Separator'); for (i = 0; i < separatorDisplayGroups.length; i++) { separatorDisplayGroups[i].SetIsDisplayed(scoreDisplay.ShowScore && scoreDisplay.ShowSymbol); } var colourContainers = UI.GetControls('CNT_Dot'); for (i = 0; i < colourContainers.length; i++) { colourContainers[0].SetBackgroundColour(scoreDisplay.Colour); } var colourDisplayGroups = UI.GetControls('DG_Colour'); for (i = 0; i < colourDisplayGroups.length; i++) { colourDisplayGroups[i].SetIsDisplayed( scoreDisplay.ShowColour ); } }; D2L.Rpc.Create('GetScoreDisplayFromValues', callback, '/d2l/lms/grades/controls/score_display_control.d2l').Call(hasScore, score, outOf, gradeId); }; D2L.LE.Grades.ScoreDisplayControl.ShowDisplayOverrideDialog = function (gradeId, refreshScoreDisplayFunction) { if (gradeId == 0) { var errorDialog = new D2L.Dialog.Error(UI.GetUniqueHtmlId(), new D2L.LP.Text.LangTerm('Grades.ScoreDisplayControl.errNoGradeToOverrideDisplaySettings')); errorDialog.Open(); return; } var outerCallback = function (response) { if (response.GetType() == D2L.Dialog.ResponseType.Positive) { refreshScoreDisplayFunction(); } response.GetDialog().Close(); }; var dialog = new D2L.Dialog('displayOverrideDialog'); dialog.SetTitle(new D2L.LP.Text.LangTerm('Grades.ScoreDisplayControl.titDisplayOverrides')); dialog.AddPrimaryButton(D2L.Control.Button.Type.Save); dialog.AddSecondaryButton(D2L.Control.Button.Type.Cancel); dialog.SetCallback(outerCallback); dialog.SetSrc('/d2l/lms/grades/admin/manage/item_display_overrides_dialog.d2l', 'SaveDisplayOverridesCallback'); dialog.SetSrcParam('gradeObjectId', gradeId); dialog.SetSize( 600, 310 ); dialog.Open(); };
resource1/1124/d2l/lms/dropbox/static/include/5.css
/* instructions submission text */ .daylight .d2l-dropbox-submissiontext { max-width: 732px; } /* assignment submission comments */ .daylight .d2l-htmlblock-assignments-comments .d2l-htmlblock { white-space: normal; } .daylight .d2l-htmlblock-assignments-comments .d2l-htmlblock p { margin-top: 0 !important; margin-bottom: 0 !important; } /* late assignment text */ .daylight .d2l-dropbox-latetext { line-height: normal; } .d2l-foldername .dco_c { display: flex; align-items: center; } /* assignment folder name */ .daylight .d2l-foldername a, .daylight .d2l-foldername label { white-space: normal; } /* assignment folder list in grid */ .daylight .d2l-folder-list-grid tr.d_gh th.d_gc { min-width:350px; } .daylight .d2l-folder-list-grid tr.d_gh th.d_gc ~ th.d_gc { min-width:inherit; } .daylight .d2l-folder-list-grid tr.d_gh th.d_gc ~ th.d_gc:last-child { min-width:170px; } .daylight .d2l-dropbox-feedback .dcs_cf { padding-left: 0px; padding-right: 0px; } /* folder_user_mark */ .daylight .d2l-assignment-mark-user .dsl_p_m, .daylight .d2l-assignment-mark-user .dsl_pmv, .daylight .d2l-assignment-mark-user .dsl_m, .daylight .d2l-assignment-mark-user .dsl_pmh { overflow: visible; } .daylight .d2l-assignment-mark-user .dsl_p_m { height: calc(100vh - 145px); } .daylight .d2l-assignment-mark-user.has-assessment-iterator .dsl_p_m { height: calc(100vh - 208px); } .daylight .d2l-assignment-mark-user #z_bg, .daylight .d2l-assignment-mark-user #z_v, .daylight .d2l-assignment-mark-user #z_s { background-color: #f9fbff; /* regolith */ } .daylight .d2l-sticky-button-area { position: sticky; background-color: white; bottom: 0; padding-top: 12px; padding-bottom: 12px; box-shadow: 0 -2px 4px 0 rgba(73,76,78,.2); /* ferrite */ border-top: 1px solid #cdd5dc; /* mica */ } .sticky-assessment-navigation { position: fixed; background-color: white; width: 100%; z-index: 1; top: 3.3rem; } .d2l-assignment-mark-user.has-assessment-iterator { margin-top: 2.6rem; } @media (max-width: 615px) { .sticky-assessment-navigation { top: 3rem; } } .feedback-container { padding-top: 8px; } .feedback-container .fct_w { padding-bottom: 24px !important; max-width: 600px !important; } .feedback-container .d2l-label { padding-bottom: 18px !important; width: 600px !important; white-space: pre-wrap; font-size: 0.8rem; font-weight: 700; line-height: 1.2rem } .feedback-container p { margin: 0 !important; } .feedback-container div { max-width: 600px !important; } .feedback-container table.d_FG td.fl_n { padding-top: 0px !important; } .feedback-container tr:nth-of-type(2) td { padding-bottom: 0px !important; }
resource1/1124/d2l/img/lp/10.gif
resource1/1124/d2l/img/lp/dragDrop/13.gif
resource1/1124/d2l/img/lp/rating/14.png
resource1/1124/d2l/img/lp/rating/15.png
resource1/1124/d2l/img/lp/rating/16.png
resource1/1124/d2l/img/lp/rating/17.gif
resource1/1124/d2l/img/lp/rating/18.gif
resource1/1124/d2l/img/lp/rating/19.png
resource1/1124/d2l/img/lp/rating/20.png
resource1/1124/d2l/img/lp/progressBar/21.gif
resource1/1124/d2l/img/lp/progressBar/22.gif
resource1/1124/d2l/img/lp/progressBar/23.gif
resource1/1124/d2l/img/lp/progressBar/24.gif
resource1/1124/d2l/img/lp/progressBar/25.gif
resource1/1124/d2l/img/lp/progressBar/26.gif
resource1/1124/d2l/img/lp/progressBar/27.gif
resource1/1124/d2l/img/lp/28.gif
resource1/1124/d2l/img/lp/Dialog/29.gif
resource1/1124/d2l/img/lp/Dialog/39.png
resource1/1124/d2l/img/lp/Dialog/42.png
resource1/1124/d2l/img/lp/Dialog/43.png
resource1/1124/d2l/img/lp/Dialog/44.gif
resource1/1124/d2l/img/lp/actions/30.gif
resource1/1124/d2l/img/lp/instructions/31.gif
resource1/1124/d2l/img/lp/mobile/32.gif
resource1/1124/d2l/img/lp/imageCheckbox/33.gif
resource1/1124/d2l/img/lp/imageCheckbox/34.gif
resource1/1124/d2l/img/lp/imageCheckbox/35.gif
resource1/1124/d2l/img/lp/imageCheckbox/36.gif
resource1/1124/d2l/img/lp/imageCheckbox/37.gif
resource1/1124/d2l/img/lp/imageCheckbox/38.gif
resource1/1124/d2l/img/lp/upDownVote/40.png
resource1/1124/d2l/img/lp/upDownVote/41.png
resource1/1124/d2l/img/lp/fileDrop/45.gif
resource1/1124/d2l/img/lp/share/46.png
resource1/1124/d2l/img/lp/share/47.png
resource1/1124/d2l/img/lp/xspl/48.png
resource1/1124/d2l/img/lp/xspl/50.png
resource1/1124/d2l/img/lp/grid/49.png
resource1/1124/d2l/img/0/12.png
resource1/1124/d2l/le/dropbox/12454/turnitin/1124/submission/107639/159298/11
resource1/1124/d2l/tools/img/51.gif
resource1/1124/d2l/tools/img/52.gif
resource1/1124/index.html
| Submission Feedback | |
| Overall Feedback | |
|
Hope, Terrific start! Please see my comments on the grading rubric for my feedback. If you have any questions, please let me know. |
Rubric Name: IM3003 Rubric
| Score | |
| / - Not Yet Achieved | |
| Feedback Date | |
| Sep 3, 2020 10:45 AM |
| Assignment | ||||||||
| IM3003 Assessment Submission (Attempt 1) |
||||||||
|
manifest.xml